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); } }
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); } }
public ActionResult Edit(MemberModel model, string cdts) { GetConditions(cdts); model.Update(); return RedirectToAction("AdminIndex", new { Page = model.Page, Cdts = cdts }); }
public ActionResult CheckLoginId(string loginId) { bool isExistMember = new MemberModel().CheckLoginId(loginId); return Json(isExistMember); }
public ActionResult Create(MemberModel model, string cdts) { GetConditions(cdts); model.Insert(); return View("AdminIndex"); }