예제 #1
0
 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));
 }
예제 #2
0
        public IActionResult ActiveUser()
        {
            var model = new ActivateDTO();

            return(View(model));
        }