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