/// <summary> /// 获得数据列表 /// </summary> public List <MobileSoft.Model.WorkFlow.Tb_WorkFlow_NoticeUserTemp> DataTableToList(DataTable dt) { List <MobileSoft.Model.WorkFlow.Tb_WorkFlow_NoticeUserTemp> modelList = new List <MobileSoft.Model.WorkFlow.Tb_WorkFlow_NoticeUserTemp>(); int rowsCount = dt.Rows.Count; if (rowsCount > 0) { MobileSoft.Model.WorkFlow.Tb_WorkFlow_NoticeUserTemp model; for (int n = 0; n < rowsCount; n++) { model = new MobileSoft.Model.WorkFlow.Tb_WorkFlow_NoticeUserTemp(); if (dt.Rows[n]["InfoId"].ToString() != "") { model.InfoId = int.Parse(dt.Rows[n]["InfoId"].ToString()); } if (dt.Rows[n]["InstanceId"].ToString() != "") { model.InstanceId = int.Parse(dt.Rows[n]["InstanceId"].ToString()); } model.Tb_Dictionary_InstanceType_DictionaryCode = dt.Rows[n]["Tb_Dictionary_InstanceType_DictionaryCode"].ToString(); model.Tb_Sys_User_UserCode = dt.Rows[n]["Tb_Sys_User_UserCode"].ToString(); model.Tb_Dictionary_NoticeMethod_DictionaryCode = dt.Rows[n]["Tb_Dictionary_NoticeMethod_DictionaryCode"].ToString(); model.NoticeContent = dt.Rows[n]["NoticeContent"].ToString(); modelList.Add(model); } } return(modelList); }
/// <summary> /// 更新一条数据 /// </summary> public void Update(MobileSoft.Model.WorkFlow.Tb_WorkFlow_NoticeUserTemp model) { dal.Update(model); }
/// <summary> /// 增加一条数据 /// </summary> public int Add(MobileSoft.Model.WorkFlow.Tb_WorkFlow_NoticeUserTemp model) { return(dal.Add(model)); }