public void ShowMaterialProperty(string goodsInfor) { List <View_GoodsModel> goodsList = bllView_Goods.GetModelByGoosInfo(goodsInfor); ViewDataManager.GOODSVIEWDATA.GoodsListData.Clear(); if (goodsList == null) { return; } //ViewDataManager.GOODSVIEWDATA.GoodsListData.Clear(); foreach (View_GoodsModel goods in goodsList) { GoodsDataModel gsdModel = new GoodsDataModel(); gsdModel.单位 = goods.Goods_Unit; gsdModel.启用 = goods.Goods_Flag; gsdModel.规格型号 = goods.Goods_Model; gsdModel.物料编码 = goods.Goods_Code; gsdModel.物料类别 = goods.Goods_Category; gsdModel.物料名称 = goods.Goods_Name; gsdModel.物料内部编码 = goods.Goods_ID.ToString(); ViewDataManager.GOODSVIEWDATA.GoodsListData.Add(gsdModel); } }
public ActionResult Add() { GoodsDataModel model = new GoodsDataModel(); model.WarehouseList = GetWarehouseList(); model.GoodTypeList = _commonController.GetGoodsTypeList(); return(View(model)); }
public ActionResult Add(GoodsDataModel model) { if (ModelState.IsValid) { GoodsData Goods = model.MapTo <GoodsDataModel, GoodsData>(); _goodsDataService.Insert(Goods); return(RedirectToAction("Index")); } model.WarehouseList = GetWarehouseList(); model.GoodTypeList = _commonController.GetGoodsTypeList(); return(View(model)); }
public ActionResult Edit(GoodsDataModel model) { if (ModelState.IsValid) { GoodsData goodsData = model.MapTo <GoodsDataModel, GoodsData>(); _goodsDataService.Update(goodsData); SuccessNotification($"{_localizationService.GetResource("UpdateSuccess") + model.GoodsName}"); return(RedirectToAction("Index")); } model.WarehouseList = GetWarehouseList(); model.GoodTypeList = _commonController.GetGoodsTypeList(); return(View(model)); }
public void QueryPlan(string goodsInfor) { List <View_GoodsModel> goodsList = bllViewGoods.GetModelByGoosInfo(goodsInfor); ViewDataManager.PALLETWITHOUTPLANDATA.PalletGoodsData.Clear(); if (goodsList == null) { return; } //ViewDataManager.GOODSVIEWDATA.GoodsListData.Clear(); foreach (View_GoodsModel goods in goodsList) { GoodsDataModel gsdModel = new GoodsDataModel(); gsdModel.单位 = goods.Goods_Unit; gsdModel.启用 = goods.Goods_Flag; gsdModel.物料编码 = goods.Goods_Code; gsdModel.物料类别 = goods.Goods_Category; gsdModel.物料名称 = goods.Goods_Name; gsdModel.物料内部编码 = goods.Goods_ID.ToString(); gsdModel.规格型号 = goods.Goods_Model; ViewDataManager.STOCKADJUSTVIEWDATA.PalletGoodsData.Add(gsdModel); } }