摘要: using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.IO; namespa... 阅读全文
posted @ 2019-03-02 10:44 崇尚技术 阅读(523) 评论(0) 推荐(0) 编辑
摘要: DataGridView控件中的各种事件都无法直接响应Cell中内容的变化,包括KeyPress等事件,可以采用下面方法 无法响应Cell中的回车键 private void dataGridViewBarcode_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e) { if (e.C... 阅读全文
posted @ 2019-03-01 22:02 崇尚技术 阅读(1102) 评论(0) 推荐(0) 编辑
摘要: 1 Aspose.Cells.License li = new Aspose.Cells.License(); 2 li.SetLicense("Aspose.Cells.lic"); 3 Aspose.Cells.Workbook wk = new Aspose.Cells.Workbook(); 4 W... 阅读全文
posted @ 2019-02-28 21:37 崇尚技术 阅读(1564) 评论(0) 推荐(1) 编辑
摘要: C# -- 文件的压缩与解压(GZipStream) 文件的压缩与解压 需引入 System.IO.Compression; 1.C#代码(入门案例) 1 Console.WriteLine("压缩文件..............."); 2 using (FileStream fr = File.OpenRead("d:\\test.txt"... 阅读全文
posted @ 2019-02-27 22:12 崇尚技术 阅读(601) 评论(0) 推荐(0) 编辑
摘要: private void button1_Click_1(object sender, EventArgs e) { Form2 form = new Form2(); form.FormBorderStyle = FormBorderStyle.None; form.TopLevel = false; ... 阅读全文
posted @ 2019-02-21 21:43 崇尚技术 阅读(310) 评论(0) 推荐(0) 编辑
摘要: //遍历TextBox控件 foreach (Control item in this.Controls) { if (item is TextBox) { item.Text = ""; } } 阅读全文
posted @ 2019-02-20 22:46 崇尚技术 阅读(1627) 评论(0) 推荐(0) 编辑
摘要: 序列化对象 public string SerializeObject(object obj) { IFormatter formatter = new BinaryFormatter(); string result = string.Empty; using (MemoryStream stream = new MemoryStream(... 阅读全文
posted @ 2019-02-17 14:13 崇尚技术 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 简单点的数据表: 实体类: using System;using System.Collections.Generic;using System.Linq;using System.Text; namespace 省市联动{ public class tblArea { public int AreaId { get; set; } public st... 阅读全文
posted @ 2019-02-13 14:32 崇尚技术 阅读(266) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Data.SqlCli... 阅读全文
posted @ 2019-02-13 11:10 崇尚技术 阅读(332) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Data;using System.Data.SqlClient;using System.Configuration; namespace _001{ public static class SqlHe... 阅读全文
posted @ 2019-02-13 11:09 崇尚技术 阅读(298) 评论(0) 推荐(0) 编辑