コード例 #1
0
 public ActionResult CheckMyOrderStatus()
 {
     if (authentication.IsSignedIn())
     {
         return RedirectToAction("Index");
     }
     var viewModel = new CheckMyOrderStatusViewModel();
     return View(viewModel);
 }
コード例 #2
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);
     }
 }