自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(14)
  • 收藏
  • 关注

原创 C# 访问拥有账号密码的共享文件夹

C# 通过用户名和密码获取共享文件夹访问权限局域网共享文件夹需要用户名和密码才能访问,通过程序怎样才能获得文件夹访问权限呢?这里主要利用了DOS命令中的“NET USE”命令来实现。public static void GetAccessControl(string path,string user,string pwd){ Process p = new Process(); p.StartInfo.FileName =

2021-06-03 13:51:14 2359 1

原创 Oracle中where条件判断区分大小写问题。

Oracle中where条件判断区分大小写,区分大小写,区分大小写。重要的事情说三遍!

2021-05-07 16:19:16 666

原创 C#查询DataSet中的符合要求的数据,以及DataSet中in修饰符的使用

c#获取DataSet中符合要求的数据user表id user name password1 张三 张三 1234562 李四 李四

2021-04-14 14:03:56 1701 2

转载 C# 将DataGridView中显示的数据导出到CSV

创建类using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Windows.Forms;using System.IO;using System.Diagnostics;using System.Runtime.InteropServices;namespace Export{ pub

2021-02-26 09:38:13 999

原创 c#中将datagridview中的数据生成为excel文件

开发环境:vs2019语言:c# private void output_excel_Click(object sender, EventArgs e) { if (dataGridView1.Rows.Count == 0) { MessageBox.Show("DataGridView中内容为空,请先导入数据!", "提示", MessageBoxButtons.OK, MessageBoxIcon.W

2021-02-26 09:30:37 230

原创 c#将datagridview中数据生成为xml文件

开发环境:vs2019没多b话直接上代码 private void button1_Click(object sender, EventArgs e) { DataTable dt = GetDataGridView(dataGridView1); DataSet ds = new DataSet(); ds.Tables.Add(dt); ds.WriteXml(F

2021-02-26 09:27:28 1159 1

原创 C#选择本地csv文件读取

开发环境:VS 2019语言:c#窗口:winform private void button2_Click(object sender, EventArgs e) { OpenFileDialog open = new OpenFileDialog() { Filter = "*|*.csv" }; open.ShowDialog(); dataGridView1.DataSource = Load

2021-02-26 09:24:17 634

原创 在winfrom选择某个excel文件读取到DataGridView控件中

开发环境:Visual Studio 20191.需要在项目引用中引用Microsoft office object LIbrary方法2.3.在winform窗体中放入一个botton控件,datagridview,和combox控件4.在botton的单击事件中进行操作 DataTableCollection tableCollection; private void btnbrowse_Click(object sender, EventArgs e) {

2021-02-26 09:13:11 222

转载 C# 获取指定文件夹中所有的文件(包括子文件夹的文件)

using System;using TopDAL;using System.IO;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Data;namespace ConsoleApplication{ class Program { static void Main(string[]

2021-02-26 08:57:59 2183 1

原创 把数据绑定到文本框并且不可选中

在界面传来ID protected void Button1_Command(object sender, CommandEventArgs e) { int id = Convert.ToInt32(e.CommandArgument.ToString()); Response.Redirect("updated.aspx?id=" + id); }在ui界面接收数据```csharp先获取一个数据public

2020-10-20 13:44:24 232 1

原创 html跳转窗口和文本框提示

跳转窗口window.location.href="需要跳转的界面";文本框提示再文本中输入元素placeholderplaceholder="需要提示的 文字" 全选与反选 $(function() { $("#c1").click(function() { $("#dv1 :checkbox").attr("checked", true); }); $("#btn1").click(function() { $("#dv1 :checkbox

2020-10-16 08:45:30 734

原创 vs自带验证控件的 使用

添加酒电用户信息DAL层 public static int add(Model.VIP model) { string sql = string.Format("insert into VIP values('{0}','{1}','{2}','{3}','{4}','{5}','{6}',null)", model.VIP_name, model.Sex, model.Pid, model.Tel, model.Rzjl, model.Address, m

2020-10-15 09:09:16 1034

原创 用vs实现注册登录

public static UserInfo GetUser(string name, string pwd) { //填写搜索姓名和密码的sql语句 string sql = string.Format("select * from UserInfo where LoginName='{0}' and Password='{1}'", name, pwd); DataTable dt = DBHelper.ExcuteTab.

2020-10-13 08:12:54 6409

原创 thickbox控件和jqzoom控件的使用

thickbox控件引用jqery文件以及thickbox组件的css文件 <a href="img/yzm.png" class="thickbox"> <img src="img/yzm.png" /> </a>`用a标签把需要放大的图片包起来 class引用thickbox类``jqzoom控件```html<script src="jqzoom/jqzoom.pack.1.0.1.js"></script

2020-10-06 13:36:43 245 1

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除