Example #1
0
        public ActionResult GetAllLots()
        {
            dynamic lots = 0;

            try
            {
                if (ModelState.IsValid)
                {
                    PurchaseServiceClient purchaseServiceClient = new PurchaseServiceClient();
                    lots = purchaseServiceClient.GetAllLots();
                }
            }
            catch (Exception e)
            {
                ModelState.AddModelError("error", "Something Wrong");
                lots = null;
                throw e;
            }
            return(Json(lots, JsonRequestBehavior.AllowGet));
        }