Esempio n. 1
0
        public ActionResult EditWizard(string id)
        {
            try
            {
                if (Utility.VerifyConfirmNumber(id))
                {
                    IECCFOrder eccfOrder = new ECCFOrderRepository();
                    //IClientLab clientLabRepository = new ClientLabRepository();

                    ECCFOrderListItem eccfOrderListItem = eccfOrder.GetECCFOrderListItem(id);

                    EditECCFOrderWizardViewModel eccfWizard = new EditECCFOrderWizardViewModel(eccfOrderListItem);

                    ViewBag.id = id;
                    return(View(eccfWizard));
                }
                else
                {
                    return(RedirectToAction("Index", "Dashboard"));
                }
            }
            catch (Exception e)
            {
                Utility.Log(NLogLogger.LogLevel.Error, "Error in EditWizard in ECCFOrderController", GetType().FullName, e);
                ErrorSignal.FromCurrentContext().Raise(e); // Send error to ELMAH for logging purposes
                return(RedirectToAction("Index", "Dashboard"));
            }
        }
Esempio n. 2
0
        public ActionResult GetPartialViewECCFOrderListItem(string orderConfirmationNum)
        {
            ECCFOrderCriterion eccfOrderCriterion = new ECCFOrderCriterion();
            IECCFOrder         eccfOrder          = new ECCFOrderRepository();

            try
            {
                //if (!UserIsAuthorized())
                //    return new HttpStatusCodeResult(401, "Custom Error Message 1"); // Unauthorized
                if (!ModelState.IsValid)
                {
                    return(new HttpStatusCodeResult(400, "Bad Request. Try again. If the problem persists contact the web administrator.")); // Bad Request
                }
                ECCFOrderListItem eccfOrderListItem = eccfOrder.GetECCFOrderListItem(OrderConfirmationNumber: orderConfirmationNum);

                return(PartialView("_ECCFOrderModalConfirmation", eccfOrderListItem));
            }
            catch (Exception ex)
            {
                ErrorSignal.FromCurrentContext().Raise(ex);                                                                              // Send error to ELMAH for logging purposes
                Utility.Log(NLogLogger.LogLevel.Error, "Error in GetPartialViewECCFOrderListItem in ECCFOrderController", GetType().FullName, ex);
                return(new HttpStatusCodeResult(400, "Bad Request. Try again. If the problem persists contact the web administrator.")); // Bad Request
            }
        }