public ActionResult ViewFrd(string Id, int V) { if (Functions.NoSession()) { return(RedirectToAction("Login", "Authentication")); } Frd File = DB_Functions.CheckForFrd(ASCIIEncoding.UTF8.GetString(Convert.FromBase64String(Id))); if (File == null) { //Error page return(new HttpNotFoundResult()); } if (V != 0) { File.LatestVersion = V; File.Panel0.LatestVersion = V; } Frd s = ActiveFrdProcessor.Process(File, V); s.Type = Frd.TypesEnum.Closed; ViewBag.helpMessage = "This FRD can not be edited and can only be viewed from the archive of versions. \n"; return(View("View_NoEdit", s)); }
public ActionResult ReceivedFrd(string Id, string error = null) { ViewBag.message = error; if (Functions.NoSession()) { return(RedirectToAction("Login", "Authentication")); } Frd File = DB_Functions.CheckReceived(ASCIIEncoding.UTF8.GetString(Convert.FromBase64String(Id))); if (File == null) { //Error page return(RedirectToAction("Received")); } Frd viewModel = ActiveFrdProcessor.Process(File); //viewModel.Type = Frd.TypesEnum.ReceivedManager; if (viewModel.Type == Frd.TypesEnum.ReceivedManagerPending || viewModel.Type == Frd.TypesEnum.ReceivedManagerActive) { ViewBag.helpMessage = "This FRD is waiting for your approval. \n" + "You can approve or reject this FRD."; return(View("View_NoEdit", viewModel));//Manager Approval } viewModel.Upload_Token = DB_Functions.NewUploadToken(DB_Functions.UploadTokenType.Received); ViewBag.helpMessage = "This FRD is sent to you by the owner and is waiting for your feedback. \n" + "You can submit your feedback in the form of an approval, rejection, or by commenting and adding files and then submitting updates"; return(View(viewModel)); }
public ActionResult ClosedFrd(string Id) { if (Functions.NoSession()) { return(RedirectToAction("Login", "Authentication")); } Frd File = DB_Functions.CheckClosed(ASCIIEncoding.UTF8.GetString(Convert.FromBase64String(Id))); if (File == null) { //Error page return(RedirectToAction("Closed")); } Frd s = ActiveFrdProcessor.Process(File); ViewBag.helpMessage = "This FRD can not be edited and can only be viewed from the archive of versions. \n"; return(View("View_NoEdit", s)); }
public ActionResult PendingFrd(string Id) { if (Functions.NoSession()) { return(RedirectToAction("Login", "Authentication")); } Frd File = DB_Functions.CheckPending(ASCIIEncoding.UTF8.GetString(Convert.FromBase64String(Id))); if (File == null) { //Error page return(RedirectToAction("Active")); } Frd viewModel = ActiveFrdProcessor.Process(File); ViewBag.helpMessage = "This FRD you submitted is still awaiting approval by your manager. \n" + "Once approved, you will receive a notification and the FRD will be moved to the 'Active FRDs' page."; return(View("View_NoEdit", viewModel)); }
public ActionResult ActiveFrd(string Id, string error = null) { ViewBag.message = error; if (Functions.NoSession()) { return(RedirectToAction("Login", "Authentication")); } Frd File = DB_Functions.CheckActive(ASCIIEncoding.UTF8.GetString(Convert.FromBase64String(Id))); if (File == null) { //Error page return(RedirectToAction("Active")); } Frd viewModel = ActiveFrdProcessor.Process(File); ViewBag.helpMessage = "This FRD has been approved by your manager and is now awaiting the recepients' feedback and approval/rejection. \n" + "FRDs that you have created and are still awaiting approval can be found in the 'pending requests' page."; viewModel.Upload_Token = DB_Functions.NewUploadToken(DB_Functions.UploadTokenType.Active); return(View(viewModel)); }