예제 #1
0
 public ActionResult SizeRequests()
 {
     try
     {
         var model = SizeRequestService.GroupedRequests();
         return(View(model));
     }
     catch (Exception ex)
     {
         return(RedirectToAction("Index", "Response", new { Message = ex.Message, Code = 400, Type = "Error" }));
     }
 }
예제 #2
0
 public ActionResult DenySize(int id)
 {
     try
     {
         SizeRequestService.Respond(id, Request.QueryString["email"], RequestStatus.Denied);
         return(RedirectToAction("SizeRequests"));
     }
     catch (Exception ex)
     {
         return(RedirectToAction("Index", "Response", new { Message = ex.Message, Code = 400, Type = "Error" }));
     }
 }
예제 #3
0
 public ActionResult SizeRequest([Bind(Include = "Username, AdditionalSize")] SizeRequestViewModel vm)
 {
     try
     {
         SizeRequestService.Request(vm.Username, vm.AdditionalSize);
         return(RedirectToAction("Index", "Response", new { Message = "Request send successfully", Code = 200, Type = "Success" }));
     }
     catch (Exception ex)
     {
         return(RedirectToAction("Index", "Response", new { Message = ex.Message, Code = 400, Type = "Error" }));
     }
 }