コード例 #1
0
        public ActionResult Logon(MemberModel model)
        {
            ModelState.Remove("IndustryId");
            ModelState.Remove("Name");
            ModelState.Remove("Company");
            ModelState.Remove("CompanyNo");
            ModelState.Remove("CompanyNum");
            ModelState.Remove("CompanyTypeList");
            ModelState.Remove("Email");
            ModelState.Remove("RegDate");
            ModelState.Remove("CheckPassword");
            ModelState.Remove("ReceiveEpaperInfo");
            string captcha = AccountUtil.GetCaptcha();
            if (!captcha.Equals(model.ConfirmationCode, StringComparison.OrdinalIgnoreCase))
            {
                ModelState.AddModelError("ConfirmationCode", "驗證碼錯誤");
            }
            else
            {
                model.DoLogon();
            }

            if (model.SendOrderOk)
            {
                return View("LogOff", model);
            }
            else
            {
                return View(model);
            }
        }
コード例 #2
0
        public ActionResult Join(MemberModel model)
        {            
            ModelState.Remove("RegDate");
            string captcha = AccountUtil.GetCaptcha();
            if (!captcha.Equals(model.ConfirmationCode, StringComparison.OrdinalIgnoreCase))
            {                
                ModelState.AddModelError("ConfirmationCode", "驗證碼錯誤");
            }
            else if (model.Password != model.CheckPassword)
            {
                ModelState.AddModelError("Password", "");
                ModelState.AddModelError("CheckPassword", "登入密碼與確認密碼不一樣");
            }
            else
            {
                if (model.IsValid())
                {
                    model.SendOrder();
                }
            }

            if (model.SendOrderOk)
            {
                return View("LogOff", model);
            }
            else
            {
                return View(model);
            }
        }
コード例 #3
0
 public ActionResult Edit(MemberModel model, string cdts)
 {
     GetConditions(cdts);
     model.Update();
     return RedirectToAction("AdminIndex", new { Page = model.Page, Cdts = cdts });
 }
コード例 #4
0
        public ActionResult CheckLoginId(string loginId)
        {
            bool isExistMember = new MemberModel().CheckLoginId(loginId);

            return Json(isExistMember);
        }
コード例 #5
0
 public ActionResult Create(MemberModel model, string cdts)
 {
     GetConditions(cdts);
     model.Insert();
     return View("AdminIndex");
 }