/// <summary> /// 获得数据列表 /// </summary> public List <DTcms.Model.AllotGoods> DataTableToList(DataTable dt) { List <DTcms.Model.AllotGoods> modelList = new List <DTcms.Model.AllotGoods>(); int rowsCount = dt.Rows.Count; if (rowsCount > 0) { DTcms.Model.AllotGoods model; for (int n = 0; n < rowsCount; n++) { model = new DTcms.Model.AllotGoods(); if (dt.Rows[n]["AllotOrderId"].ToString() != "") { model.AllotOrderId = int.Parse(dt.Rows[n]["AllotOrderId"].ToString()); } if (dt.Rows[n]["Id"].ToString() != "") { model.Id = int.Parse(dt.Rows[n]["Id"].ToString()); } if (dt.Rows[n]["StoreInOrderId"].ToString() != "") { model.StoreInOrderId = int.Parse(dt.Rows[n]["StoreInOrderId"].ToString()); } if (dt.Rows[n]["GoodsId"].ToString() != "") { model.GoodsId = int.Parse(dt.Rows[n]["GoodsId"].ToString()); } if (dt.Rows[n]["StoreInGoodsStoreInOrderId"].ToString() != "") { model.StoreInGoodsStoreInOrderId = int.Parse(dt.Rows[n]["StoreInGoodsStoreInOrderId"].ToString()); } if (dt.Rows[n]["StoreInGoodsId"].ToString() != "") { model.StoreInGoodsId = int.Parse(dt.Rows[n]["StoreInGoodsId"].ToString()); } model.Remark = dt.Rows[n]["Remark"].ToString(); if (dt.Rows[n]["Count"].ToString() != "") { model.Count = decimal.Parse(dt.Rows[n]["Count"].ToString()); } if (dt.Rows[n]["Status"].ToString() != "") { model.Status = int.Parse(dt.Rows[n]["Status"].ToString()); } modelList.Add(model); } } return(modelList); }
/// <summary> /// 获得数据列表 /// </summary> public List<DTcms.Model.AllotGoods> DataTableToList(DataTable dt) { List<DTcms.Model.AllotGoods> modelList = new List<DTcms.Model.AllotGoods>(); int rowsCount = dt.Rows.Count; if (rowsCount > 0) { DTcms.Model.AllotGoods model; for (int n = 0; n < rowsCount; n++) { model = new DTcms.Model.AllotGoods(); if (dt.Rows[n]["Id"].ToString() != "") { model.Id = int.Parse(dt.Rows[n]["Id"].ToString()); } if (dt.Rows[n]["AllotOrderId"].ToString() != "") { model.AllotOrderId = int.Parse(dt.Rows[n]["AllotOrderId"].ToString()); } if (dt.Rows[n]["StoreInOrderId"].ToString() != "") { model.StoreInOrderId = int.Parse(dt.Rows[n]["StoreInOrderId"].ToString()); } if (dt.Rows[n]["StoreInGoodsId"].ToString() != "") { model.StoreInGoodsId = int.Parse(dt.Rows[n]["StoreInGoodsId"].ToString()); } model.Remark = dt.Rows[n]["Remark"].ToString(); if (dt.Rows[n]["Count"].ToString() != "") { model.Count = decimal.Parse(dt.Rows[n]["Count"].ToString()); } if (dt.Rows[n]["Status"].ToString() != "") { model.Status = int.Parse(dt.Rows[n]["Status"].ToString()); } modelList.Add(model); } } return modelList; }
public void AddAllotGoods(AllotGoods allotGoods) { _allotGoods.Add(allotGoods); }
public void AddAllotGoods(AllotGoods allotGoods) { _allotGoods.Add(allotGoods); }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(DTcms.Model.AllotGoods model) { return(dal.Update(model)); }
/// <summary> /// 增加一条数据 /// </summary> public int Add(DTcms.Model.AllotGoods model) { return(dal.Add(model)); }
/// <summary> /// 增加一条数据 /// </summary> public void Add(DTcms.Model.AllotGoods model) { dal.Add(model); }