Exemplo n.º 1
0
 public ActionResult CheckMyOrderStatus(string email, string ordernumber)
 {
     try
     {
         if (customerAccountService.ValidateCustomerUsingOrderNumber(email, ordernumber))
         {
             var customerData = customerAccountService.GetCustomerByEmail(email);
             authentication.Signin(email, customerData);
             return(RedirectToAction("OrdersStatus", "Checkout",
                                     new RouteValueDictionary()
             {
                 { "orderNumber", ordernumber }
             }));
         }
         var viewModel = new CheckMyOrderStatusViewModel();
         viewModel.HasError = true;
         return(View(viewModel));
     }
     catch (Exception)
     {
         //TODO add the error view here
         var viewModel = new CheckMyOrderStatusViewModel();
         viewModel.HasError = true;
         return(View(viewModel));
     }
 }