public IActionResult SignUp() { SignUpModel usi = new SignUpModel(); usi.Countries = LookUpDB.GetLookupDetails(13, GetConfiguration().GetConnectionString(DEFAULT_CONNECTION)); return(View(usi)); }
public IActionResult Getlookups(int lang = 1, int LookupId = 0) { QAResponse <IList <LookUpDetails> > response = new QAResponse <IList <LookUpDetails> >(); response.Content = LookUpDB.GetLookUpDetails(LookupId, lang, GetConfiguration().GetConnectionString(DEFAULT_CONNECTION)); return(Json(response)); }
public IActionResult GetTutorQuestionsDDL(int lang = 1) { // 36 is the lookupId for tutorQuestionDDL QAResponse <IList <LookUpDetails> > response = new QAResponse <IList <LookUpDetails> >(); response.Content = LookUpDB.FillTutorQuestionDropDown(36, lang, GetConfiguration().GetConnectionString(DEFAULT_CONNECTION)); return(Json(response)); }
static AppController()//just for testing but later to be instances { LoginModel.AllCountries = AppContentDB.GetCountries(Startup.StaticConfig.GetConnectionString(DEFAULT_CONNECTION)); LoginModel.InstituteTypes = LookUpDB.GetInstituteTypes(Startup.StaticConfig.GetConnectionString(DEFAULT_CONNECTION)); LoginModel.Curriculums = LookUpDB.GetAllCurriculum(Startup.StaticConfig.GetConnectionString(DEFAULT_CONNECTION)); LoginModel.Classes = LookUpDB.GetAllClasses(Startup.StaticConfig.GetConnectionString(DEFAULT_CONNECTION)); LoginModel.AllLanguages = AppContentDB.GetLanguages(Startup.StaticConfig.GetConnectionString(DEFAULT_CONNECTION)); LoginModel.Subjects = LookUpDB.GetAllSubjects(Startup.StaticConfig.GetConnectionString(DEFAULT_CONNECTION)); LoginModel.TutorService = LookUpDB.GetAllTutorServices(Startup.StaticConfig.GetConnectionString(DEFAULT_CONNECTION)); }
public IActionResult Preferences() { TutorModel tutorModel = base.TutorModel; if (tutorModel != null) { if (Request.QueryString != null && Request.QueryString.HasValue) { long userId = Request.Query["user"].Equals(string.Empty) ? 0 : long.Parse(Request.Query["user"]); long tutorId = Request.Query["tutor"].Equals(string.Empty) ? 0 : long.Parse(Request.Query["tutor"]); if (userId > 0 && tutorId > 0) { bool isTeacher = bool.Parse(Request.Query["alreadyTeacher"]); TutorPreferences pref = new TutorPreferences { TutorId = tutorId, IsTeacher = isTeacher, TeachingInstitute = isTeacher ? Request.Query["school"].ToString() : null, HasCertification = isTeacher && Request.Query["hasCert"].Equals(string.Empty) ? false : bool.Parse(Request.Query["hasCert"]), YearsOfExperience = isTeacher ? Request.Query["yearsOfExperience"].Equals(string.Empty) ? 0 : int.Parse(Request.Query["yearsOfExperience"]) : 0, TutoringTypes = Request.Query["typeOfStudents"], LessonTypes = Request.Query["lessonTypes"], RewardingPoints = Request.Query["rewardings"], HasCar = bool.Parse(Request.Query["alreadyTeacher"]), IsInterested = bool.Parse(Request.Query["onlineTutoringInterest"]), OutsideTutoringWeekHrs = Request.Query["hrsOutsideINTO"].Equals(string.Empty) ? 0 : int.Parse(Request.Query["hrsOutsideINTO"]), Language = int.Parse(Request.Query["lang"]), StepId = int.Parse(Request.Query["step"]), EntityType = (EntityType)byte.Parse(Request.Query["entityType"]) }; int rows = TutorDB.SavePreferences(pref, userId, GetConfiguration().GetConnectionString(DEFAULT_CONNECTION)); if (rows > 0) { RegistrationStep step = StepsDB.NextRegStep(userId, pref.StepId, (byte)pref.EntityType, pref.Language, GetConfiguration().GetConnectionString(DEFAULT_CONNECTION)); if (step != null) { return(RedirectToAction(step.UIName, "Tutor")); } } } } try { tutorModel.Resources = LookUpDB.GetTranslation("Pages.Preferences", 1, GetConfiguration().GetConnectionString(DEFAULT_CONNECTION)); tutorModel.Globals = LookUpDB.GetTranslation("Global", 1, GetConfiguration().GetConnectionString(DEFAULT_CONNECTION)); tutorModel.TutoringTypes = LookUpDB.GetLookupDetails(15, GetConfiguration().GetConnectionString(DEFAULT_CONNECTION)); tutorModel.LessonTypes = LookUpDB.GetLookupDetails(16, GetConfiguration().GetConnectionString(DEFAULT_CONNECTION)); tutorModel.RewardingPoints = LookUpDB.GetLookupDetails(17, GetConfiguration().GetConnectionString(DEFAULT_CONNECTION)); } catch (Exception ex) { /*GetLogger().Log(LogLevel.Error, ex.Message);*/ } return(View(tutorModel)); } return(base.AssureLogin(this.CurrentController, this.CurrentAction)); }
public IActionResult HowINTOWorks() { TutorModel tutorModel = base.TutorModel; if (tutorModel != null) { try { tutorModel.Resources = LookUpDB.GetTranslation("Pages.HowINTOWorks", 1, GetConfiguration().GetConnectionString(DEFAULT_CONNECTION)); tutorModel.Globals = LookUpDB.GetTranslation("Global", 1, GetConfiguration().GetConnectionString(DEFAULT_CONNECTION)); } catch (Exception ex) { /*GetLogger().Log(LogLevel.Error, ex.Message);*/ } return(View(tutorModel)); } return(base.AssureLogin(this.CurrentController, this.CurrentAction)); }
public IActionResult BasicInformation() { TutorModel tutorModel = base.TutorModel; if (tutorModel != null) { try { tutorModel.Resources = LookUpDB.GetTranslation("Pages.BasicInformation", 1, GetConfiguration().GetConnectionString(DEFAULT_CONNECTION)); tutorModel.Globals = LookUpDB.GetTranslation("Global", 1, GetConfiguration().GetConnectionString(DEFAULT_CONNECTION)); return(View(tutorModel)); } catch (Exception ex) { /*GetLogger().Log(LogLevel.Error, ex.Message);*/ } } //tpm.Countries = LookUpDB.GetLookupDetails(13, GetConfiguration().GetConnectionString(DEFAULT_CONNECTION)); //tpm.TypeOfDegrees = LookUpDB.GetLookupDetails(1, GetConfiguration().GetConnectionString(DEFAULT_CONNECTION)); //tpm.Recognition = LookUpDB.GetLookupDetails(2, GetConfiguration().GetConnectionString(DEFAULT_CONNECTION)); return(base.AssureLogin(this.CurrentController, this.CurrentAction)); }
public IActionResult EmailConfirmation(int userId, int objEntityId, int step, int?lang = 1) { TutorModel tutorModel = base.TutorModel; if (tutorModel != null) { if (tutorModel.Tutor.AgreedOnTerms) { string actUrl = string.Concat(BaseUrl, Url.Action(nameof(ReadyForInterview), "Tutor")); Tutor tutor = TutorDB.PrepareForConfirmation(tutorModel.Tutor.UserId, (byte)tutorModel.Tutor.Type, step, actUrl, lang, GetConfiguration().GetConnectionString(DEFAULT_CONNECTION)); tutorModel.Tutor = tutor; tutorModel.contentStep6 = (LookUpDB.GetAppContent("100017,100018", 1, GetConfiguration().GetConnectionString(DEFAULT_CONNECTION))); return(View(tutorModel)); } RegistrationStep regStep = StepsDB.NextRegStep(tutorModel.User.UserId, null, (byte)tutorModel.User.Type, tutorModel.Language, GetConfiguration().GetConnectionString(DEFAULT_CONNECTION)); if (regStep != null) { tutorModel.Tutor.CurrentStep = regStep; TempData["TutorModel"] = JsonConvert.SerializeObject(tutorModel.Tutor.Cache()); return(RedirectToAction(regStep.UIName, "tutor")); } } return(base.AssureLogin(this.CurrentController, this.CurrentAction)); }
public IActionResult GetLkpDetails(string keyword = null, int?lang = 1) { IList <LookUpDetails> lookups = LookUpDB.GetLkupByAb(keyword, lang, GetConfiguration().GetConnectionString(DEFAULT_CONNECTION)); return(Json(lookups)); }
public IActionResult Val(int lkp, int objEntityId, string key = null, int?lang = 1, string dataType = null) { IList <LookUpDetails> lookups = LookUpDB.GetLookupDetails(0, key, lang, dataType, GetConfiguration().GetConnectionString(DEFAULT_CONNECTION)); return(Json(lookups)); }
public IActionResult TutorDegrees() { IList <LookUpDetails> degrees = LookUpDB.GetLookupDetails(1, GetConfiguration().GetConnectionString(DEFAULT_CONNECTION)); return(Json(degrees)); }
public IActionResult Register(int langId = 1) { return(View(new SignUpModel { TermsAndConditions = LookUpDB.GetAppContent(100141, langId, null, GetConfiguration().GetConnectionString(DEFAULT_CONNECTION)) })); }