public ActionResult SendOrder(EpaperExaminationModel model)
        {
            ModelState.Remove("PostDate");
            ModelState.Remove("Question10");
            ModelState.Remove("Question11");
            ModelState.Remove("Question12");
            string captcha = AccountUtil.GetCaptcha();

            if (!captcha.Equals(model.ConfirmationCode, StringComparison.OrdinalIgnoreCase))
            {
                ModelState.AddModelError("ConfirmationCode", "驗證碼錯誤");
            }
            else
            {
                if (model.IsValid())
                {
                    model.Insert();
                    model.SendOrderOk = true;
                }
            }
            if (model.SendOrderOk)
            {
                return(View("SendOrderOK"));
            }
            else
            {
                return(View("Index", model));
            }
        }
Ejemplo n.º 2
0
 public ActionResult Create(EpaperExaminationModel model, string cdts)
 {
     GetConditions(cdts);
     model.Insert();
     return(View("AdminIndex"));
 }