/// <summary> /// 获得数据列表 /// </summary> public List <DTcms.Model.StoreOutGoods> DataTableToList(DataTable dt) { List <DTcms.Model.StoreOutGoods> modelList = new List <DTcms.Model.StoreOutGoods>(); int rowsCount = dt.Rows.Count; if (rowsCount > 0) { DTcms.Model.StoreOutGoods model; for (int n = 0; n < rowsCount; n++) { model = new DTcms.Model.StoreOutGoods(); if (dt.Rows[n]["StoreOutOrderId"].ToString() != "") { model.StoreOutOrderId = int.Parse(dt.Rows[n]["StoreOutOrderId"].ToString()); } if (dt.Rows[n]["Id"].ToString() != "") { model.Id = int.Parse(dt.Rows[n]["Id"].ToString()); } if (dt.Rows[n]["GoodsId"].ToString() != "") { model.GoodsId = int.Parse(dt.Rows[n]["GoodsId"].ToString()); } if (dt.Rows[n]["StoreInOrderId"].ToString() != "") { model.StoreInOrderId = int.Parse(dt.Rows[n]["StoreInOrderId"].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]["StoringOutTime"].ToString() != "") { model.StoringOutTime = DateTime.Parse(dt.Rows[n]["StoringOutTime"].ToString()); } if (dt.Rows[n]["FactStoringOutTime"].ToString() != "") { model.FactStoringOutTime = DateTime.Parse(dt.Rows[n]["FactStoringOutTime"].ToString()); } if (dt.Rows[n]["Status"].ToString() != "") { model.Status = int.Parse(dt.Rows[n]["Status"].ToString()); } if (dt.Rows[n]["Count"].ToString() != "") { model.Count = decimal.Parse(dt.Rows[n]["Count"].ToString()); } modelList.Add(model); } } return(modelList); }
/// <summary> /// 获得数据列表 /// </summary> public List<DTcms.Model.StoreOutGoods> DataTableToList(DataTable dt) { List<DTcms.Model.StoreOutGoods> modelList = new List<DTcms.Model.StoreOutGoods>(); int rowsCount = dt.Rows.Count; if (rowsCount > 0) { DTcms.Model.StoreOutGoods model; for (int n = 0; n < rowsCount; n++) { model = new DTcms.Model.StoreOutGoods(); if (dt.Rows[n]["Id"].ToString() != "") { model.Id = int.Parse(dt.Rows[n]["Id"].ToString()); } if (dt.Rows[n]["StoreOutOrderId"].ToString() != "") { model.StoreOutOrderId = int.Parse(dt.Rows[n]["StoreOutOrderId"].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()); } if (dt.Rows[n]["Status"].ToString() != "") { model.Status = int.Parse(dt.Rows[n]["Status"].ToString()); } if (dt.Rows[n]["Count"].ToString() != "") { model.Count = decimal.Parse(dt.Rows[n]["Count"].ToString()); } modelList.Add(model); } } return modelList; }
public void AddStoreOutGoods(StoreOutGoods storeOutGoods) { _storeOutGoods.Add(storeOutGoods); }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(DTcms.Model.StoreOutGoods model) { return(dal.Update(model)); }
/// <summary> /// 增加一条数据 /// </summary> public void Add(DTcms.Model.StoreOutGoods model) { dal.Add(model); }
/// <summary> /// 增加一条数据 /// </summary> public int Add(DTcms.Model.StoreOutGoods model) { return(dal.Add(model)); }