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