/// <summary> /// 获得数据列表 /// </summary> public List <Maticsoft.Model.User_WK> DataTableToList(DataTable dt) { List <Maticsoft.Model.User_WK> modelList = new List <Maticsoft.Model.User_WK>(); int rowsCount = dt.Rows.Count; if (rowsCount > 0) { Maticsoft.Model.User_WK model; for (int n = 0; n < rowsCount; n++) { model = new Maticsoft.Model.User_WK(); if (dt.Rows[n]["WU_ID"] != null && dt.Rows[n]["WU_ID"].ToString() != "") { model.WU_ID = decimal.Parse(dt.Rows[n]["WU_ID"].ToString()); } if (dt.Rows[n]["WK"] != null && dt.Rows[n]["WK"].ToString() != "") { model.WK = dt.Rows[n]["WK"].ToString(); } if (dt.Rows[n]["ClassType"] != null && dt.Rows[n]["ClassType"].ToString() != "") { model.ClassType = dt.Rows[n]["ClassType"].ToString(); } if (dt.Rows[n]["JobNum"] != null && dt.Rows[n]["JobNum"].ToString() != "") { model.JobNum = dt.Rows[n]["JobNum"].ToString(); } if (dt.Rows[n]["Name"] != null && dt.Rows[n]["Name"].ToString() != "") { model.Name = dt.Rows[n]["Name"].ToString(); } if (dt.Rows[n]["Remarks"] != null && dt.Rows[n]["Remarks"].ToString() != "") { model.Remarks = dt.Rows[n]["Remarks"].ToString(); } modelList.Add(model); } } return(modelList); }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(Maticsoft.Model.User_WK model) { return(dal.Update(model)); }
/// <summary> /// 增加一条数据 /// </summary> public decimal Add(Maticsoft.Model.User_WK model) { return(dal.Add(model)); }