Пример #1
0
        public ActionResult Page5(ViewModels.vmPage5 vmPage5, string GUID)
        {
            string buttonValue = Request.Form["submit"];

            if (ModelState.IsValid)
            {
                Models.Application application = db.Applications
                                                 .Where(e => e.GUID == GUID)
                                                 .FirstOrDefault();
                application.SubmittedDate = DateTime.Now;
                //The AppId becomes the next submitted AppId
                TempData["SendEmail"] = true;
                if (application.AppID == null)
                {
                    application.AppID     = db.Applications.Max(e => e.AppID) + 1;
                    TempData["SendEmail"] = true;
                }
                else
                {
                    TempData["SendEmail"] = false;
                }
                db.SaveChanges();

                return(RedirectToAction("Confirm", new { id = application.AppID }));
            }
            return(View(vmPage5));
        }
Пример #2
0
        //GET:  Page5
        public ActionResult Page5(string GUID)
        {
            ViewModels.vmPage5 vmPage5 = new ViewModels.vmPage5();

            return(View(vmPage5));
        }