Beispiel #1
0
        public JsonResult FetchWIP(string reclaimType)
        {
            var model = new Models.TPOReclaimWIPModel();

            using (TPOReclaimWIPService svc = new TPOReclaimWIPService())
            {
                model = Mapper.Map <TPOReclaimWIPDto, TPOReclaimWIPModel>(
                    svc.GetByPlantAndType(CurrentPlantId, reclaimType)
                    );
            }
            return(Json(model, JsonRequestBehavior.AllowGet));
        }
Beispiel #2
0
        public JsonResult Save(float Wip, string ReclaimType, string AdjustmentType)
        {
            TPO.Web.Core.ResponseMessage responseMessage;

            try
            {
                using (TPOReclaimWIPService svc = new TPOReclaimWIPService())
                {
                    svc.Update(CurrentPlantId, ReclaimType, AdjustmentType, CurrentUser, Wip.ToString());
                }

                responseMessage = SetResponseMesssage(ActionTypeMessage.SuccessfulSave);
            }
            catch (Exception exc)
            {
                responseMessage = SetResponseMesssage(ActionTypeMessage.FailedSave, exc.Message);
            }

            return(Json(responseMessage, JsonRequestBehavior.AllowGet));
        }