08 2012 档案
摘要:this.repositoryItemComboBox1.Items.Clear(); DataTable dt = (DataTable)bindingSource_DayProp.DataSource; for (int i = 0; i < dt.Rows.Count; i++) { string str = dt.Rows[i][1].ToString(); this.repositoryItemComboBox1.Items.Add(str); }
阅读全文
摘要:在项目中经常用到DataTable,如果DataTable使用得当,不仅能使程序简洁实用,而且能够提高性能,达到事半功倍的效果,现对DataTable的使用技巧进行一下总结。 一、DataTable简介(1)构造函数DataTable() 不带参数初始化DataTable 类的新实例。DataTable(string tableName) 用指定的表名初始化DataTable 类的新实例。DataTable(string tableName, string tableNamespace) 用指定的表名和命名空间初始化DataTable 类的新实例。(2) 常用属性CaseSensitive 指
阅读全文
摘要:http://blog.csdn.net/sage425/article/details/6600772
阅读全文
摘要:#region 初始化资料查询界面 public void InitFeelsInfoGrid() { EatGood.Model.FoodManage.SearchFeelKind model = new EatGood.Model.FoodManage.SearchFeelKind(); model.FShopId = fshopid.ToString(); #region 动态组织SQL语句 string stre = null; for (int i = 0; i < checkedListBox2.Items.Count; i++) { if (checkedListBox2.
阅读全文
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace EatGood.Model.FoodManage{ /// <summary> /// 食法要求查询:动态查询Model /// 郑松涛 /// </summary> public class SearchFeelKind { #region 筛选参数 private string _ShopId = null; private string _Kindname = null; priva
阅读全文
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace EatGood.BLL.FoodManage{ public class GetCNSpell { /// <summary> /// 提取汉字首字母 /// </summary> 施彪 /// <param name="strText">需要转换的字</param> /// <returns>转换结果</returns>
阅读全文
摘要:public static void ToExcelSheet(DataSet ds, string fileName) { //int testnum = ds.Tables.Count-1; SaveFileDialog saveDialog = new SaveFileDialog(); saveDialog.DefaultExt = "xls"; saveDialog.Filter = "Excel文件|*.xls"; saveDialog.FileName = fileName; saveDialog.ShowDialog(); fileNam
阅读全文