/// <summary> /// 获得数据列表 /// </summary> public List <HM.Model.Qm.Tb_Qm_ObjectDetail> DataTableToList(DataTable dt) { List <HM.Model.Qm.Tb_Qm_ObjectDetail> modelList = new List <HM.Model.Qm.Tb_Qm_ObjectDetail>(); int rowsCount = dt.Rows.Count; if (rowsCount > 0) { HM.Model.Qm.Tb_Qm_ObjectDetail model; for (int n = 0; n < rowsCount; n++) { model = new HM.Model.Qm.Tb_Qm_ObjectDetail(); model.Id = dt.Rows[n]["Id"].ToString(); model.ObjId = dt.Rows[n]["ObjId"].ToString(); model.StandardId = dt.Rows[n]["StandardId"].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_ObjectDetail model) { dal.Update(model); }
/// <summary> /// 增加一条数据 /// </summary> public void Add(HM.Model.Qm.Tb_Qm_ObjectDetail model) { dal.Add(model); }