public IActionResult ActiveUser(ActivateDTO model) { if (ModelState.IsValid) { var fim_user = this._context.table_visual_fim_user.Where(w => w.cu_pplid == model.cu_pplid).FirstOrDefault(); if (fim_user == null) { ModelState.AddModelError("cu_pplid", "ไม่พบข้อมูลรหัสบัตรประชาชนที่ระบุ"); return(View(model)); } fim_user = this._context.table_visual_fim_user.Where(w => w.cu_jobcode == model.cu_jobcode & w.cu_pplid == model.cu_pplid).FirstOrDefault(); if (fim_user == null) { ModelState.AddModelError("cu_jobcode", "รหัสนักศึกษาไม่ถูกต้อง"); return(View(model)); } return(RedirectToAction("ResetPassword", new { u = DataEncryptor.Encrypt(fim_user.basic_uid) })); } return(View(model)); }
public IActionResult ActiveUser() { var model = new ActivateDTO(); return(View(model)); }