/// <summary> /// 获得数据列表 /// </summary> public List <MobileSoft.Model.Order.Tb_Order_RegistWare> DataTableToList(DataTable dt) { List <MobileSoft.Model.Order.Tb_Order_RegistWare> modelList = new List <MobileSoft.Model.Order.Tb_Order_RegistWare>(); int rowsCount = dt.Rows.Count; if (rowsCount > 0) { MobileSoft.Model.Order.Tb_Order_RegistWare model; for (int n = 0; n < rowsCount; n++) { model = new MobileSoft.Model.Order.Tb_Order_RegistWare(); if (dt.Rows[n]["RegistWareID"].ToString() != "") { model.RegistWareID = new Guid(dt.Rows[n]["RegistWareID"].ToString()); } //model.ReleaseID=dt.Rows[n]["ReleaseID"].ToString(); if (dt.Rows[n]["Count"].ToString() != "") { model.Count = decimal.Parse(dt.Rows[n]["Count"].ToString()); } model.RegistID = dt.Rows[n]["RegistID"].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(MobileSoft.Model.Order.Tb_Order_RegistWare model) { dal.Update(model); }
/// <summary> /// 增加一条数据 /// </summary> public void Add(MobileSoft.Model.Order.Tb_Order_RegistWare model) { dal.Add(model); }