public ActionResult PostCapNhat(RegistrationInterviewDTO registrationInterviewDTO)
        {
            RegistrationInterview registrationInterview = registrationInterviewRepository.UpdateRegistrationInterview(registrationInterviewDTO);

            if (registrationInterview == null)
            {
                return(Json(new ResponseResult(403, "Something went wrong when updated", null)));
            }
            return(Json(new ResponseResult(200, "success", null)));
        }
Beispiel #2
0
        public ActionResult IsvalidRegistration(RegistrationInterviewDTO registrationInterviewDTO)
        {
            Account usersession = (Account)Session[CommonConstants.USER_SESSION];

            if (usersession == null || usersession.RoleId != 4 && usersession.RoleId != 2)
            {
                Session.RemoveAll();
                return(RedirectToRoute("login", null));
            }
            registrationInterviewDTO.ReviewedBy = usersession.Id;
            RegistrationInterview registrationInterview = registrationInterviewRepository.UpdateRegistrationInterview(registrationInterviewDTO);

            if (registrationInterview == null)
            {
                return(Json(new ResponseResult(403, "Something went wrong when updated", null)));
            }
            return(Json(new ResponseResult(200, "success", null)));
        }
        public ActionResult PostCapNhat(RegistrationInterviewDTO registrationInterviewDTO)
        {
            //if (!ModelState.IsValid)
            //{
            //    return Json(new ResponseResult(403, ModelState.Values.SelectMany(s => s.Errors).Select(s => s.ErrorMessage).ToString(), null));
            //}
            RegistrationInterview registrationInterview = registrationInterviewRepository.UpdateRegistrationInterview(registrationInterviewDTO);

            if (registrationInterview == null)
            {
                return(Json(new ResponseResult(403, "Something went wrong when updated", null)));
            }
            var registrationInterviewJson = JsonConvert.SerializeObject(registrationInterview,
                                                                        Formatting.None,
                                                                        new JsonSerializerSettings()
            {
                ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore
            });

            return(Json(new ResponseResult(200, "success", registrationInterviewJson)));
        }