예제 #1
0
        // GET: IssueMaterialMachine
        public ActionResult Index(string Company)
        {
            if (Session["User"] == null)
            {
                Session["From"] = "IssueMaterialMachine";
                return(RedirectToAction("Login", "Home"));
            }


            IssueMaterialMachineModel entity = new IssueMaterialMachineModel();

            entity.Company = Session["Company"].ToString();
            //HttpResponseMessage response = GlobalVariables.WebApiClient.PostAsJsonAsync("IssueMaterialValidatePart", entity).Result;

            // return View(lstEnts);
            return(View(entity));
        }
예제 #2
0
        public ActionResult ValidateLot(IssueMaterialMachineModel obj)
        {
            string msg = string.Empty;
            IssueMaterialMachineModel objReturn = new IssueMaterialMachineModel();
            HttpResponseMessage       response  = GlobalVariables.WebApiClient.PostAsJsonAsync("IssueMaterialMachineValidateLot", obj).Result;

            objReturn = response.Content.ReadAsAsync <IssueMaterialMachineModel>().Result;

            if (objReturn.TranStatus != "Success")
            {
                msg = objReturn.TranStatus;
                return(Json(new { Message = msg }, JsonRequestBehavior.AllowGet));
            }
            else
            {
                return(Json(new { Data = objReturn }, JsonRequestBehavior.AllowGet));
            }
        }
예제 #3
0
        public ActionResult Save(IssueMaterialMachineModel obj)
        {
            string msg = string.Empty;
            IssueMaterialMachineModel objReturn = new IssueMaterialMachineModel();
            HttpResponseMessage       response  = GlobalVariables.WebApiClient.PostAsJsonAsync("IssueMaterialMachineConfirm", obj).Result;

            objReturn = response.Content.ReadAsAsync <IssueMaterialMachineModel>().Result;

            if (objReturn.TranStatus != "Success")
            {
                msg = objReturn.TranStatus;
                //return Json(new { Message = msg }, JsonRequestBehavior.AllowGet);
                return(Json(new { success = false, Message = msg }, JsonRequestBehavior.AllowGet));
            }
            else
            {
                //return Json(new { Data = objReturn }, JsonRequestBehavior.AllowGet);
                return(Json(new { success = true, Message = "Sucessfully Updated!" }, JsonRequestBehavior.AllowGet));
            }
        }