/// <summary> /// 获得数据列表 /// </summary> public List <DigiPower.Onlinecol.Standard.Model.T_Field_MDL> DataTableToList(DataTable dt) { List <DigiPower.Onlinecol.Standard.Model.T_Field_MDL> modelList = new List <DigiPower.Onlinecol.Standard.Model.T_Field_MDL>(); int rowsCount = dt.Rows.Count; if (rowsCount > 0) { DigiPower.Onlinecol.Standard.Model.T_Field_MDL model; for (int n = 0; n < rowsCount; n++) { model = new DigiPower.Onlinecol.Standard.Model.T_Field_MDL(); if (dt.Rows[n]["FieldID"].ToString() != "") { model.FieldID = int.Parse(dt.Rows[n]["FieldID"].ToString()); } model.table_name = dt.Rows[n]["table_name"].ToString(); model.table_chn_name = dt.Rows[n]["table_chn_name"].ToString(); model.column_name = dt.Rows[n]["column_name"].ToString(); model.column_chn_name = dt.Rows[n]["column_chn_name"].ToString(); if (dt.Rows[n]["column_order"].ToString() != "") { model.column_order = int.Parse(dt.Rows[n]["column_order"].ToString()); } model.note = dt.Rows[n]["note"].ToString(); modelList.Add(model); } } return(modelList); }
/// <summary> /// 查询 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnSearch_Click(object sender, EventArgs e) { Model.T_Field_MDL model = new DigiPower.Onlinecol.Standard.Model.T_Field_MDL(); Search(this.tblSearch, model); this.BindGridView(1); }
/// <summary> /// 更新一条数据 /// </summary> public void Update(DigiPower.Onlinecol.Standard.Model.T_Field_MDL model) { dal.Update(model); }
/// <summary> /// 增加一条数据 /// </summary> public int Add(DigiPower.Onlinecol.Standard.Model.T_Field_MDL model) { return(dal.Add(model)); }