06 2013 档案

摘要:public bool ExportFile(System.Data.DataTable dt){ SaveFileDialog sfd = new SaveFileDialog(); sfd.Filter = "Excel文件(*.xls)|*.xls|所有文件(*.*)|*.*"; sfd.Title = "Excel文件导出"; string fileName = ""; if (sfd.ShowDialog() == DialogResult.OK) { fileName = sfd.FileName; Excel.Appli 阅读全文
posted @ 2013-06-28 14:19 pnljs 阅读(4616) 评论(0) 推荐(0) 编辑
摘要:private void button2_Click(object sender, EventArgs e){ string file = ""; OpenFileDialog openFileDialog = new OpenFileDialog(); openFileDialog.InitialDirectory = "c:\\";//注意这里写路径时要用c:\\而不是c:\ openFileDialog.Filter = "Html|*.html|Mht|*.mht|htm|*.htm"; openFileDialog.Rest 阅读全文
posted @ 2013-06-28 13:09 pnljs 阅读(395) 评论(0) 推荐(0) 编辑
摘要:--存储数据:List<string> keyList = new List<string> { "a", "b", "c" };foreach (string key in keyList){ AppDomain.CurrentDomain.SetData(key, key + key);}--取数据foreach (string key in keyList){ object obj = AppDomain.CurrentDomain.GetData(key); Console.WriteLine(obj. 阅读全文
posted @ 2013-06-04 12:19 pnljs 阅读(147) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示