//
 public JsonResult UpdateUserProfileData(NewUserRegistration newdata)
 {
     int count = 0;
     try
     {
         _paytmBo.EditUserProfileData(newdata);
         count = 1;
         return Json(count, JsonRequestBehavior.AllowGet);
     }
     catch (Exception ex)
     {
         count = 0;
         return Json(count, JsonRequestBehavior.AllowGet);
     }
 }
        //New User Registration
        public JsonResult NewSignUpData(NewUserRegistration SignupData)
        {
            var count = 0;
            try
            {
                //Retreving Existing Userinfo
                var loginStatus = _paytmBo.GetAllUserRegistration().ToList();
                loginStatus = (from u in loginStatus where u.EmailId == SignupData.EmailId select u).ToList();

                if (loginStatus.Count > 0)
                {
                    count = 0;
                    return Json(count, JsonRequestBehavior.AllowGet);
                }
                else
                {
                    _paytmBo.NewSignUp(SignupData);
                    count = 1;
                    return Json(count, JsonRequestBehavior.AllowGet);
                }
            }
            catch (Exception ex)
            {
                count = 0;
                return Json(count, JsonRequestBehavior.AllowGet);
            }
        }
Пример #3
0
 //SignUp
 public void NewSignUp(NewUserRegistration SignUp)
 {
     _unitOfWork.Repository<NewUserRegistration>().Insert(SignUp);
     _unitOfWork.Save();
 }
        //LoginUser Checking
        public JsonResult LoginUser(NewUserRegistration login)
        {
            var loginStatus = _paytmBo.GetAllUserRegistration().ToList();

            loginStatus = (from u in loginStatus
                           where u.EmailId == login.EmailId && u.Password == login.Password
                           //where u.Password == login.Password
                           select u).ToList();
            return Json(loginStatus, JsonRequestBehavior.AllowGet);
        }
Пример #5
0
 //Edit UserProfile data
 public void EditUserProfileData(NewUserRegistration newdata)
 {
     _unitOfWork.Repository<NewUserRegistration>().Update(newdata);
     _unitOfWork.Save();
 }