摘要: DataTable dt3 = dtb.Clone(); for (int i = 0; i < dta.Columns.Count; i++) { dt3.Columns.Add(dta.Columns[i].ColumnName); } object[] obj = new object[dt3 阅读全文
posted @ 2018-04-04 10:51 微笑! 阅读(246) 评论(0) 推荐(0) 编辑
摘要: C# 获取时间,日期 //C# 里内置的 DateTime 基本上都可以实现这些功能,巧用 DateTime 会使你处理这些事来变轻松多了 // 今天 DateTime.Now.Date.ToShortDateString(); // 昨天,就是今天的日期减一 DateTime.Now.AddDay 阅读全文
posted @ 2018-03-31 20:14 微笑! 阅读(2180) 评论(0) 推荐(0) 编辑
摘要: public void ExportTOExcel(DataGridView dView) { /*用的三层结构,调用了一个类*/ using (BLLConnect a = new BLLConnect()) { DataTable myDt = GetDgvToTable(dView); Sav 阅读全文
posted @ 2018-03-22 14:47 微笑! 阅读(129) 评论(0) 推荐(0) 编辑
摘要: public DataTable GetDgvToTable(DataGridView dgv) { DataTable dt = new DataTable(); for (int count = 0; count < dgv.Columns.Count; count++) { DataColum 阅读全文
posted @ 2018-03-22 14:46 微笑! 阅读(94) 评论(0) 推荐(0) 编辑