public ActionResult SaveContactUs(tblContactDetails tbl) { Error obje = new Error(); bool test = objUser.Save(tbl); obje.ErrorMessage = SettingsHelper.SendMail(tbl.MailId, tbl.Name, true); return(Json(obje, JsonRequestBehavior.AllowGet)); }
public ActionResult RegisterUser(RegisterViewModel model) { tblUser user = null; if (SettingsManager.Instance.Branding == "SINDHI") { user = objUser.GetUser().Where(p => p.MobileNo.ToUpper() == model.MobileNo.ToUpper()).FirstOrDefault(); if (user == null) { model.RoleName = "User"; int userid = objUser.Save(model); if (userid > 0) { user = objUser.GetUser().Where(p => p.UserName.ToUpper() == model.UserName.ToUpper()).FirstOrDefault(); model.UserId = userid; PendingUsersController pending = new PendingUsersController(); pending.SendSMS(userid); SessionManager.GetInstance.ActiveUser = new STP_GetUserDetail() { UserId = user.UserId, Password = user.Password, FirstName = user.FirstName, MName = user.MName, LName = user.LName, MailId = user.MailId, MobileNo = user.MobileNo, UserType = user.UserType, Gender = model.Gender }; //objUser.SendOTP(model); return(Json(new ResponseModel() { Status = true, ErrorMessage = SettingsManager.Instance.Branding == "SINDHI" ? Resources.SPMOResources.RegistrationPage : "उमेदवार माहिती यशस्वीपणे जतन केले आहे." }, JsonRequestBehavior.AllowGet)); } else { return(Json(new ResponseModel() { Status = false, ErrorMessage = SettingsManager.Instance.Branding == "SINDHI" ? Resources.SPMOResources.RegistrationFailed : "उमेदवार नोंदणी करणे अशक्य." }, JsonRequestBehavior.AllowGet)); } } else { return(Json(new ResponseModel() { Status = false, ErrorMessage = SettingsManager.Instance.Branding == "SINDHI" ? Resources.SPMOResources.SameUserExist : "लॉग-इन नाव आधीपासून दुसर्या उमेदवार वापरले." }, JsonRequestBehavior.AllowGet)); } } else { user = objUser.GetUser().Where(p => p.UserName.ToUpper() == model.UserName.ToUpper()).FirstOrDefault(); if (user == null) { model.RoleName = "User"; int userid = objUser.Save(model); if (userid > 0) { user = objUser.GetUser().Where(p => p.UserName.ToUpper() == model.UserName.ToUpper()).FirstOrDefault(); model.UserId = userid; PendingUsersController pending = new PendingUsersController(); pending.SendSMS(userid); SessionManager.GetInstance.ActiveUser = new STP_GetUserDetail() { UserId = user.UserId, Password = user.Password, FirstName = user.FirstName, MName = user.MName, LName = user.LName, MailId = user.MailId, MobileNo = user.MobileNo, Gender = user.Gender }; //objUser.SendOTP(model); return(Json(new ResponseModel() { Status = true, ErrorMessage = SettingsManager.Instance.Branding == "SINDHI" ? Resources.SPMOResources.RegistrationPage : "उमेदवार माहिती यशस्वीपणे जतन केले आहे." }, JsonRequestBehavior.AllowGet)); } else { return(Json(new ResponseModel() { Status = false, ErrorMessage = SettingsManager.Instance.Branding == "SINDHI" ? Resources.SPMOResources.RegistrationFailed : "उमेदवार नोंदणी करणे अशक्य." }, JsonRequestBehavior.AllowGet)); } } else { return(Json(new ResponseModel() { Status = false, ErrorMessage = SettingsManager.Instance.Branding == "SINDHI" ? Resources.SPMOResources.SameUserExist : "लॉग-इन नाव आधीपासून दुसर्या उमेदवार वापरले." }, JsonRequestBehavior.AllowGet)); } } }