Example #1
0
        public ActionResult DeletePurchaseLot(string ID)
        {
            int id = 0;

            if (ID != "0")
            {
                id = Convert.ToInt32(Helpers.CommonMethods.Decrypt(HttpUtility.UrlDecode(ID)));
            }
            Lots lot = new Lots();

            lot.iLotID = id;

            try
            {
                if (ModelState.IsValid)
                {
                    PurchaseServiceClient purchaseServiceClient = new PurchaseServiceClient();
                    lot = purchaseServiceClient.GetLots(id);
                }
            }
            catch (Exception e)
            {
                ModelState.AddModelError("error", "something went wrong");
                lot = null;
                throw e;
            }
            return(View("DeletePurchaseLot", lot));
        }