随笔分类 - C#
C#
摘要:public DataSet TransExcelToDataSet(string fileName, List sheetNames) { OleDbConnection objConn =null; DataSet data =new DataSet(); //创建读取excel连接 ...
阅读全文
摘要:在JS中将JSON的字符串解析成JSON数据格式,一般有两种方式:1. 一种为使用eval()函数。2. 使用Function对象来进行返回解析 一、使用eval()函数 系统后台代码 eval解析 JS解析Json 数组 二、解析json数组即对JSONArray的遍历 2.1、对于标准的json
阅读全文
摘要:在作应用系统开发时,管理配置是必不可少的。例如数据库服务器的配置、安装和更新配置等等。由于Xml的兴起,现在的配置文件大都是以xml文档来存储。比如Visual Studio.Net自身的配置文件Mashine.config,Asp.Net的配置文件Web.Config,包括我在介绍Remoting
阅读全文
摘要:查询语句 selectdb.SHAPE.SDO_gtype as SDO_gtype, db.shape.sdo_srid as sdo_srid, db.shape.sdo_point.x as point_x, db.shape.sdo_point.y as point_y, db.shape.
阅读全文
摘要:最近在做一个程序,需要在程序中对Word内容做些处理。从网上查了很多资料,发现,许多都是重复的。更有许多知识,根本没有讲到。为了以后使用方便。将所有的这些知识,加以总结,以备后来人使用。 1、引用 需要引用 COM库:Microsoft word 11.0 Object Library. 不同的版本
阅读全文
摘要:public partial class BaseForm : Form { private Timer timer; int x, y; DateTime start; bool ff = true; public BaseForm() { timer =...
阅读全文
摘要:#region 移除数组中重复数据 /// /// 移除数组中重复数据 /// /// 需要除重的数组 /// 不重复数组 public static string[] DelRepeatData(string[] array) { return ar...
阅读全文
摘要:Excel文件导入导出,需引用Microsoft Excel 11.0 Object Library
阅读全文
摘要:1、当dataset中包含了html等特殊字符用这个处理 2. 3.
阅读全文
摘要://获取当天的数据 DrawRecordDA _recordDA = new DrawRecordDA(); var query = _recordDA.GetQuery(); //筛选 当天 //query = query.Where(q=>SqlFunctions.Dat...
阅读全文
摘要:protected void btnUpload_Click(object sender, EventArgs e) { HttpFileCollection Files = HttpContext.Current.Request.Files; for (int i = 0; i 0) ...
阅读全文
摘要:private static string GetMD5HashFromFile(string fileName) { try { FileStream file = new FileStream(fileName, FileMode.Open); Sy...
阅读全文
摘要:System.Data.OleDb; //导入名空间 private Button1_Click(object sender,System.EventArgs e) { if(TextBox1.Text.ToString().Trim()!=""||TextBox1.Text.ToString().Trim()!=String.Empty()) { OleDbCo...
阅读全文
摘要:SqlConnection conn = new SqlConnection("uid=sa;pwd=*;database=login;server=server"); SqlCommand myCom = conn.CreateCommand(); myCom.CommandType = CommandType.Text; if(txtB_user.Text.Leng...
阅读全文
摘要:string password = txtPassword.Text.ToString(); string name = txtUserName.SelectedItem.ToString(); string connecitonString = "server=(local);" + "intetrated securi...
阅读全文
浙公网安备 33010602011771号