public ActionResult EditUser(UserDetails model)
        {
            bool   successed = false;
            string messages  = "";

            try
            {
                UserDetailsRepository repo = new UserDetailsRepository();

                successed = repo.EditUserDetail(model);

                if (!successed)
                {
                    messages = "Email already exists!";
                }
            }
            catch (Exception ex)
            {
                messages = ex.Message;
            }

            return(Json(new { successed = successed, messages = messages, newUser = model }, JsonRequestBehavior.DenyGet));
        }