/// <summary> /// 获得数据列表 /// </summary> public List <HM.Model.Qm.Tb_Qm_TaskPoint> DataTableToList(DataTable dt) { List <HM.Model.Qm.Tb_Qm_TaskPoint> modelList = new List <HM.Model.Qm.Tb_Qm_TaskPoint>(); int rowsCount = dt.Rows.Count; if (rowsCount > 0) { HM.Model.Qm.Tb_Qm_TaskPoint model; for (int n = 0; n < rowsCount; n++) { model = new HM.Model.Qm.Tb_Qm_TaskPoint(); model.Id = dt.Rows[n]["Id"].ToString(); model.TaskId = dt.Rows[n]["TaskId"].ToString(); model.PointIds = dt.Rows[n]["PointIds"].ToString(); model.Pictures = dt.Rows[n]["Pictures"].ToString(); model.AddPId = dt.Rows[n]["AddPId"].ToString(); if (dt.Rows[n]["AddTime"].ToString() != "") { model.AddTime = DateTime.Parse(dt.Rows[n]["AddTime"].ToString()); } model.Remark = dt.Rows[n]["Remark"].ToString(); if (dt.Rows[n]["IsDelete"].ToString() != "") { model.IsDelete = int.Parse(dt.Rows[n]["IsDelete"].ToString()); } modelList.Add(model); } } return(modelList); }
/// <summary> /// 更新一条数据 /// </summary> public void Update(HM.Model.Qm.Tb_Qm_TaskPoint model) { dal.Update(model); }
/// <summary> /// 增加一条数据 /// </summary> public void Add(HM.Model.Qm.Tb_Qm_TaskPoint model) { dal.Add(model); }