示例#1
0
        //
        // GET: /MaterialManagement/MaterialPostReceptionInput/
        public ActionResult Index()
        {
            var model = new MaterialPostReceptionInputViewModel
            {
                Grid = GenerateGrid()
            };

            return(View(model));
        }
示例#2
0
        //[HttpPost]
        public ActionResult PostReception(string materialCode, string materialName, string shelfNo, string palletNo)
        {
            var model = new MaterialPostReceptionInputViewModel
            {
                F33_MaterialCode = materialCode,
                F01_MaterialDsp  = materialName,
                ShelfNo          = shelfNo,
                F33_PalletNo     = palletNo
            };

            return(PartialView("MaterialPostReceptionInput/_PartialViewPostReception", model));
        }
示例#3
0
        public ActionResult SavePostReception(MaterialPostReceptionInputViewModel model)
        {
            var item = Mapper.Map <MaterialPostReceptionInputItem>(model);
            //Check total quantity
            var checkedTotal = _materialPostReceptionInputDomain.CheckTotalQuantity(item);

            if (!checkedTotal)
            {
                return(Json(new{ Success = false, Message = Resources.MaterialResource.MSG5 }));
            }
            var result = _materialPostReceptionInputDomain.SavePostReception(item);

            if (result.IsSuccess)
            {
                return(Json(new{ Success = true, Message = MessageResource.MSG9 }, JsonRequestBehavior.AllowGet));
            }
            return(Json(new{ Success = false }));
        }