03 2014 档案
摘要:#region 接口返回的Xml转换成DataSet /// <summary> /// 返回的Xml转换成DataSet /// </summary> /// <param name="text">Xml字符</param> /// <returns></returns> private Data
阅读全文
摘要:using System; using System.Collections.Generic; using System.Data; using System.Drawing; namespace Code { class BarCode { public class Code128 { priva
阅读全文
摘要:在实际的工作需要中,我们有时候需将大量的数据导入到数据库中。这时候我们不得不考虑的就是效率问题。本文我们就介绍了一种将大量数据高效地导入SQL Server数据库的方法,该方法是使用BULK INSERT来实现的,接下来就让我们来一起了解一下这部分内容。 源数据(文本文件) 下载了大量的股票历史数据
阅读全文
摘要:SQLite包含了如下时间/日期函数: datetime().......................产生日期和时间 date()...........................产生日期 time()...........................产生时间 strftime()...
阅读全文
摘要:(1)自定义纸张设置 控制面板->打印机和传真->右键->服务器属性->创建新的格式 (2)自定义纸张使用 this.printDocument1.DefaultPageSettings.PaperSize = new System.Drawing.Printing.PaperSize("NewPrint", iWidth, iHeight); NewPrint:制...
阅读全文
摘要://write txt StringBuilder builder = new StringBuilder(); FileStream fs = new FileStream(saveFileName, FileMode.Create); StreamWriter sw = new StreamWr
阅读全文
摘要://C# 的串口通信,是采用serialPort控件,下面是对serialPort控件(也是串口通信必备信息)的配置如下代码: serialPort1.PortName = commcomboBox1.Text; serialPort1.BaudRate = int.Parse(baudcomboBox2.Text); serialPort1.Parity = (Parity)Enum.Par...
阅读全文
摘要://重启主程序 //System.Diagnostics.Process.Start(System.Reflection.Assembly.GetExecutingAssembly().Location); #region 读存app.config字段值 public static string G
阅读全文
摘要:using System; using System.Collections.Generic; using System.Text; namespace MacPrinter { public class ZPL_Command { /// (^EF)<summary> /// 清除设定 (已包含起
阅读全文
摘要:using System; using System.Collections.Generic; using System.Text; using System.Runtime.InteropServices; namespace BarCodeLibrary { public class Zebra
阅读全文
摘要://读配置文件 方法(1) //ConfigurationManager.RefreshSection("appSettings"); //强制重新载入 string settingValue = ConfigurationManager.AppSettings.Get("setting1"); /
阅读全文
摘要:sqlite常用sql语句 --返回UTC时间 select CURRENT_TIMESTAMP; --返回本地时间 select datetime(CURRENT_TIMESTAMP,'localtime'); --时间转换,时间转换时要求: yyyy-MM-dd,例如: 2008-08-09 S
阅读全文
摘要:public string passText { get { return textBox1.Text; } } //Form1中还有个按钮button1在其点击事件中有: private void button1_Click(object sender, EventArgs e) { Form2
阅读全文
摘要:private void button1_Click(object sender, EventArgs e) { //Sqlite使用事务批量操作 极大的提高速度 DateTime starttime = DateTime.Now; using (SQLiteConnection con = new
阅读全文