public ActionResult UserRegistration() { AccountCodeFile acf = new AccountCodeFile(); UserRegistration obj = new UserRegistration(); string email = obj.uname = Request.Form.Get("_uname"); obj.phn = Request.Form.Get("_phn"); obj.email = Request.Form.Get("_email"); obj.pass = Request.Form.Get("_pass"); obj.advisor = Request.Form.Get("_advisor"); string check = acf.checkExistingUserByMail(email); if (check == "" || check == null) { int i = Convert.ToInt32(acf.UserRegistration(obj)); if (i > 0) { return(Json("Success", JsonRequestBehavior.AllowGet)); } else { return(Json("Not done", JsonRequestBehavior.AllowGet)); } } else { return(Json("already exist", JsonRequestBehavior.AllowGet)); } }
public ActionResult checkUser() { AccountCodeFile acf = new AccountCodeFile(); UserRegistration obj = new UserRegistration(); obj.email = Request.Form.Get("_email"); obj.pass = Request.Form.Get("_pass"); DataTable dt = (acf.CheckUser(obj)); if (dt.Rows.Count > 0) { FormsAuthentication.SetAuthCookie(dt.Rows[0]["ClientCode"] + "|" + dt.Rows[0]["User_Email"] + "|" + dt.Rows[0]["Password"] + "|" + dt.Rows[0]["UserName"] + "|" + dt.Rows[0]["User_City"] + "|" + dt.Rows[0]["User_Pincode"] + "|" + dt.Rows[0]["User_State"] + "|" + dt.Rows[0]["User_Country"] + "|" + dt.Rows[0]["User_PanNo"] + "|" + dt.Rows[0]["User_Mobile"] + "|" + dt.Rows[0]["GuardianName"], false); return(Json("Success", JsonRequestBehavior.AllowGet)); } else { return(Json("Not done", JsonRequestBehavior.AllowGet)); } }