コード例 #1
0
 public IActionResult OnPost()
 {
     formData.Add(Form);
     //Form = formData.Update(Form);
     formData.Commit();
     TempData["Message"] = "Form Sent";
     return(RedirectToPage("./List"));
 }
コード例 #2
0
        public IActionResult OnPost()
        {
            string buttonClicked = Request.Form["SubmitButton"];

            if (buttonClicked == "Accept")
            {
                Form.Accepted = true;
            }
            else if (buttonClicked == "Decline")
            {
                Form.Accepted = false;
            }



            formData.Update(Form);
            //Form = formData.Update(Form);
            formData.Commit();
            //TempData["Message"] = "Form Sent";
            return(RedirectToPage("./List"));
        }