/// <summary> /// Checks if the URL is valid with content. /// </summary> public override void changeURL() { int parseable; if (url.Contains("=")) { profileId = Request.QueryString["profile"]; } service = new MatchyService(); if (Int32.TryParse(profileId, out parseable)) { try { JobMapping mapping = new JobMapping(); currentJob = mapping.mapFromService(service.GetJob(Convert.ToInt32(profileId))[0]); Session["JobObject"] = job; } catch { Response.Redirect("vacature.aspx?page=1"); } } else Response.Redirect("vacature.aspx?page=1"); }
/// <summary> /// Gets all the information this class needs. /// </summary> public override void CheckTypeAndFill() { if ((userOwn.UserCv.CvID) != 0) { ((User)Session["UserObject"]).UserCompany = new DataAccessObjects.Company(); if ((Job[])Session["JobList"] == null) { service = new MatchyService(); JobMapping mapping = new JobMapping(); MatchyBackend.Job[] jobs = service.GetJob(0); job = new Job[jobs.Length]; for (int i = 0; i < jobs.Length; i++) job[i] = mapping.mapFromService(jobs[i]); Session["JobList"] = job; } else job = (Job[])Session["JobList"]; } else { ((User)Session["UserObject"]).UserCv = new DataAccessObjects.Cv(); if ((Cv[])Session["CvList"] == null) { service = new MatchyService(); CvMapping mapping = new CvMapping(); MatchyBackend.Cv[] cvs = service.GetCvByLimit(0); cv = new Cv[cvs.Length]; for (int i = 0; i < cvs.Length; i++) cv[i] = mapping.mapFromService(cvs[i]); Session["CvList"] = cv; } else cv = (Cv[])Session["CvList"]; } }