/// <summary> /// 获得数据列表 /// </summary> public List <MobileSoft.Model.WorkFlow.Tb_WorkFlow_GeneralAdjunct> DataTableToList(DataTable dt) { List <MobileSoft.Model.WorkFlow.Tb_WorkFlow_GeneralAdjunct> modelList = new List <MobileSoft.Model.WorkFlow.Tb_WorkFlow_GeneralAdjunct>(); int rowsCount = dt.Rows.Count; if (rowsCount > 0) { MobileSoft.Model.WorkFlow.Tb_WorkFlow_GeneralAdjunct model; for (int n = 0; n < rowsCount; n++) { model = new MobileSoft.Model.WorkFlow.Tb_WorkFlow_GeneralAdjunct(); model.GeneralAdjunctCode = dt.Rows[n]["GeneralAdjunctCode"].ToString(); if (dt.Rows[n]["GeneralCode"].ToString() != "") { model.GeneralCode = new Guid(dt.Rows[n]["GeneralCode"].ToString()); } model.AdjunctName = dt.Rows[n]["AdjunctName"].ToString(); model.FilPath = dt.Rows[n]["FilPath"].ToString(); model.FileExName = dt.Rows[n]["FileExName"].ToString(); if (dt.Rows[n]["FileSize"].ToString() != "") { model.FileSize = decimal.Parse(dt.Rows[n]["FileSize"].ToString()); } if (dt.Rows[n]["msrepl_tran_version"].ToString() != "") { model.msrepl_tran_version = new Guid(dt.Rows[n]["msrepl_tran_version"].ToString()); } modelList.Add(model); } } return(modelList); }
/// <summary> /// 更新一条数据 /// </summary> public void Update(MobileSoft.Model.WorkFlow.Tb_WorkFlow_GeneralAdjunct model) { dal.Update(model); }
/// <summary> /// 增加一条数据 /// </summary> public void Add(MobileSoft.Model.WorkFlow.Tb_WorkFlow_GeneralAdjunct model) { dal.Add(model); }