/// <summary> /// 获得数据列表 /// </summary> public List <CLDC_StartUpDispatcher.Model.DSPTCH_DIC_VIEW> DataTableToList(DataTable dt) { List <CLDC_StartUpDispatcher.Model.DSPTCH_DIC_VIEW> modelList = new List <CLDC_StartUpDispatcher.Model.DSPTCH_DIC_VIEW>(); int rowsCount = dt.Rows.Count; if (rowsCount > 0) { CLDC_StartUpDispatcher.Model.DSPTCH_DIC_VIEW model; for (int n = 0; n < rowsCount; n++) { model = new CLDC_StartUpDispatcher.Model.DSPTCH_DIC_VIEW(); model.PK_VIEW_NO = dt.Rows[n]["PK_VIEW_NO"].ToString(); model.AVR_CHECK_NAME = dt.Rows[n]["AVR_CHECK_NAME"].ToString(); model.AVR_TABLE_NAME = dt.Rows[n]["AVR_TABLE_NAME"].ToString(); model.AVR_COL_NAME = dt.Rows[n]["AVR_COL_NAME"].ToString(); model.AVR_COL_SHOW_NAME = dt.Rows[n]["AVR_COL_SHOW_NAME"].ToString(); modelList.Add(model); } } return(modelList); }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(CLDC_StartUpDispatcher.Model.DSPTCH_DIC_VIEW model) { return(dal.Update(model)); }
/// <summary> /// 增加一条数据 /// </summary> public void Add(CLDC_StartUpDispatcher.Model.DSPTCH_DIC_VIEW model) { dal.Add(model); }