Example #1
0
        public ActionResult RcvStock(int id)
        {
            bool status = false;

            try
            {
                if (ModelState.IsValid)
                {
                    PurchaseServiceClient purchaseServiceClient = new PurchaseServiceClient();
                    status = purchaseServiceClient.RcvStock(id);
                }
            }
            catch (Exception e)
            {
                ModelState.AddModelError("error", "Something Went Wrong!");
                status = false;
                throw e;
            }

            return(new JsonResult {
                Data = new { status = status }
            });
        }