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" })); } }
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" })); } }
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" })); } }