上一页 1 ··· 4 5 6 7 8 9 10 11 下一页
摘要: public static void CreateXml(string path) { XmlDocument xmldoc = new XmlDocument(); XmlTextWriter writer = new XmlTextWriter(path, Encoding.UTF8); writer.WriteStartDocument(); /*根节点*/ writer.WriteStartElement("User");//根节点 /*n... 阅读全文
posted @ 2013-11-06 09:11 JasonGu0 阅读(387) 评论(0) 推荐(0) 编辑
摘要: 定义一个重新启动的类: class Relogin { public void Restart() { Thread thtmp = new Thread(new ParameterizedThreadStart(run)); object appName = Application.ExecutablePath; Thread.Sleep(1000); thtmp.Start(appName); } private void run(Objec... 阅读全文
posted @ 2013-11-04 15:49 JasonGu0 阅读(1065) 评论(0) 推荐(0) 编辑
摘要: 自定义一个生成日志文件的类using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.IO;using PrintDatas;using System.Windows.Forms;namespace PrintDatas.Functionlayer{ public class Log { /// /// 日志系统文件(下载) /// /// 处于什么位置 /// 店铺名称 ... 阅读全文
posted @ 2013-11-01 10:54 JasonGu0 阅读(1837) 评论(0) 推荐(1) 编辑
摘要: 自定义一个序列化类using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.IO;using System.Runtime.Serialization.Formatters.Binary;using System.Windows.Forms;namespace PrintDatas.Functionlayer{ class SerializableOperate { /// /// 序列化Font /// ... 阅读全文
posted @ 2013-11-01 10:38 JasonGu0 阅读(159) 评论(0) 推荐(0) 编辑
摘要: public string GetPYString(string str) { string tempStr = ""; foreach (char c in str) { if ((int)c >= 33 && (int)c /// 取单个字符的拼音声母 /// /// 要转换的单个汉字 /// 拼音声母 string GetPYChar(string c) { byte... 阅读全文
posted @ 2013-10-29 17:02 JasonGu0 阅读(442) 评论(0) 推荐(0) 编辑
摘要: static ArrayList Sheets(string filepath) { ArrayList al = new ArrayList(); string strconn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + filepath + ";Extended Properties=Excel 8.0;"; OleDbConnection conn = new OleDbConnection(strconn); conn.Op... 阅读全文
posted @ 2013-10-29 15:11 JasonGu0 阅读(503) 评论(0) 推荐(0) 编辑
摘要: private static void DataTableToSQLServer(DataTable dt) { string connectionString = "";//GetConnectionString(); using (SqlConnection destinationConnection = new SqlConnection(connectionString)) { destinationConnection.Open(); us... 阅读全文
posted @ 2013-10-28 14:26 JasonGu0 阅读(671) 评论(0) 推荐(0) 编辑
摘要: static void Main(string[] args) {//442048086191605,140454 aa("442048086191605'--", ""); } static void aa(string username, string pwd) { string sql = @"select * from boby_info where tid=@use and intBobyInfoID=@pwd"; SqlConnection conn = ne... 阅读全文
posted @ 2013-10-26 10:46 JasonGu0 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 在Program里写入代码: static class Program { /// /// 应用程序的主入口点。 /// [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); // Application.Run(new FnFather()); ... 阅读全文
posted @ 2013-10-23 09:37 JasonGu0 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 首先,定义一个带object参数的方法,代码如下: public void ThreadMethod(object ParObject) { List stid = null; SqlConnection con = null; SqlCommand cmd = null; toExport_Mutex.whatOperation optin = new toExport_Mutex.whatOperation(); try { ... 阅读全文
posted @ 2013-10-22 13:33 JasonGu0 阅读(739) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 下一页