/// <summary> /// 获得数据列表 /// </summary> public List <DigiPower.Onlinecol.Standard.Model.T_WorkFlowBtn_MDL> DataTableToList(DataTable dt) { List <DigiPower.Onlinecol.Standard.Model.T_WorkFlowBtn_MDL> modelList = new List <DigiPower.Onlinecol.Standard.Model.T_WorkFlowBtn_MDL>(); int rowsCount = dt.Rows.Count; if (rowsCount > 0) { DigiPower.Onlinecol.Standard.Model.T_WorkFlowBtn_MDL model; for (int n = 0; n < rowsCount; n++) { model = new DigiPower.Onlinecol.Standard.Model.T_WorkFlowBtn_MDL(); if (dt.Rows[n]["WorkFlowBtnID"].ToString() != "") { model.WorkFlowBtnID = int.Parse(dt.Rows[n]["WorkFlowBtnID"].ToString()); } if (dt.Rows[n]["WorkFlowID"].ToString() != "") { model.WorkFlowID = int.Parse(dt.Rows[n]["WorkFlowID"].ToString()); } model.BtnCode = dt.Rows[n]["BtnCode"].ToString(); model.BtnName = dt.Rows[n]["BtnName"].ToString(); if (dt.Rows[n]["EnabledFlag"].ToString() != "") { if ((dt.Rows[n]["EnabledFlag"].ToString() == "1") || (dt.Rows[n]["EnabledFlag"].ToString().ToLower() == "true")) { model.EnabledFlag = true; } else { model.EnabledFlag = false; } } modelList.Add(model); } } return(modelList); }
/// <summary> /// 更新一条数据 /// </summary> public void Update(DigiPower.Onlinecol.Standard.Model.T_WorkFlowBtn_MDL model) { dal.Update(model); }
/// <summary> /// 增加一条数据 /// </summary> public int Add(DigiPower.Onlinecol.Standard.Model.T_WorkFlowBtn_MDL model) { return(dal.Add(model)); }