/// <summary>
    /// Change the information based on the URL information
    /// </summary>
    public override void changeURL()
    {
        int parseable;
        if (url.Contains("="))
            profileId = Request.QueryString["profile"];

        service = new MatchyService();
        if (Int32.TryParse(profileId, out parseable))
        {
            try
            {
                CvMapping mapping = new CvMapping();
                Cv = mapping.mapFromService(service.GetCv(Convert.ToInt32(profileId))[0]);
                Session["CvObject"] = Cv;
                User newUser = (User)Session["UserObjectOwn"];
                user.UserCv = Cv;
                newUser = (User)Session["UserObjectOwn"];
            }
            catch
            {
                Response.Redirect("vacature.aspx?page=1");
            }
        }
        else
            Response.Redirect("vacature.aspx?page=1");
    }
Example #2
0
    /// <summary>
    /// Gets all the information this class needs and sets the active page
    /// </summary>
    public override void CheckTypeAndFill()
    {
        if (!LoginCheck.LoggedIn || user == null)
            Response.Redirect("login.aspx");
        else if (user.UserCompany.CompanyID == 0 && user.UserCv.CvID != 0)
        {
            service = new MatchyService();
            JobMapping jobMapping = new JobMapping();
            CompanyMapping compMapping = new CompanyMapping();
            user.UserCompany = compMapping.MapFromService(service.GetCompany(getURL())[0]);

            MatchyBackend.Job[] jobs = service.GetJobByCompany(user.UserCompany.CompanyID);
            job = new Job[jobs.Length];
            for (int i = 0; i < jobs.Length; i++)
                job[i] = jobMapping.mapFromService(jobs[i]);
        }
        else
        {
            var contentPlaceHolder = (ContentPlaceHolder)Master.FindControl("contentPlaceholderHeader");
            var profileLink = (LinkButton)contentPlaceHolder.FindControl("profileLink");
            profileLink.CssClass = "active";

            service = new MatchyService();
            JobMapping mapping = new JobMapping();
            MatchyBackend.Job[] jobs = service.GetJobByCompany(user.UserCompany.CompanyID);
            job = new Job[jobs.Length];
            for (int i = 0; i < jobs.Length; i++)
                job[i] = mapping.mapFromService(jobs[i]);

            Session["JobList"] = job;
        }
    }
Example #3
0
 /// <summary>
 /// Builds the dropdownlist for Branche
 /// </summary>
 /// <param name="brancheList">list that needs to be filled</param>
 public void buildDropDownListBranche(DropDownList brancheList)
 {
     BrancheMapping brancheMapping = new BrancheMapping();
     service = new MatchyService();
     MatchyBackend.Branche[] branches = service.GetBranche(0);
     branche = new Branche[branches.Length];
     brancheList.Items.Add(new ListItem("Branches", "Default"));
     for (int i = 0; i < branches.Length; i++)
     {
         branche[i] = brancheMapping.mapFromService(branches[i]);
         brancheList.Items.Add(new ListItem(branches[i].Description, branches[i].branche_ID.ToString()));
     }
 }
Example #4
0
    public void TestSearch()
    {
        Search searchObject = new Search();
        SearchMapping searchMapping = new SearchMapping();
        searchObject.City = "Rotterdam";
        MatchyService service = new MatchyService();

        MatchyBackend.Cv[] searchCompany = service.SearchByCompany(searchMapping.MapToService(searchObject));

        if (searchCompany.Length > 0)
            Assert.Pass("Er zijn zoekresultaten.");
        else
            Assert.Pass("Er zijn geen zoekresultaten.");
    }
Example #5
0
 /// <summary>
 /// Gets all the information this page needs.
 /// </summary>
 public override void CheckTypeAndFill()
 {
     if (!LoginCheck.LoggedIn || user == null)
         Response.Redirect("login.aspx");
     else if (user.UserCv.CvID == 0 && user.UserCompany.CompanyID != 0)
     {
         service = new MatchyService();
         UserMapping mapping = new UserMapping();
         CvMapping cvMapping = new CvMapping();
         user = mapping.mapFromService(service.GetUser(Int32.Parse(profileId))[0]);
         user.UserCv = cvMapping.mapFromService(service.GetCv(getURL())[0]);
         Session["UserObject"] = user;
     }
     else
     {
         var contentPlaceHolder = (ContentPlaceHolder)Master.FindControl("contentPlaceholderHeader");
         var profileLink = (LinkButton)contentPlaceHolder.FindControl("profileLink");
         profileLink.CssClass = "active";
     }
 }
 /// <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>
    /// Fills all the Views
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void Page_Load(object sender, EventArgs e)
    {
        regPassword.Attributes.Add("value", "Wachtwoord");
        regConfPass.Attributes.Add("value", "Wachtwoord");

        populateDropdown();
        try
        {
            service = new MatchyService();

            buildDropDownListEdu(cvEducationDropDown);
        }
        catch (System.Net.WebException)
        {
            errorMessage.InnerHtml = "<span>Er kon geen verbinding gemaakt worden met de webservice<br />Probeer het later nog eens</span>";
        }
    }
Example #8
0
    /// <summary>
    /// Gets all the information this class needs and sets the active page
    /// </summary>
    public void CheckTypeAndFill()
    {
        if (!LoginCheck.LoggedIn || user == null)
            Response.Redirect("login.aspx");
        else if (!user.Email.Equals(String.Empty))
        {
            try
            {
                service = new MatchyService();
                dashboardCount = new DashboardCount();
                dashboardCount.CompanyCounts = service.GetCountTables("Company");
                dashboardCount.JobCounts = service.GetCountTables("Job");
                dashboardCount.CvCounts = service.GetCountTables("Cv");
                dashboardCount.UserCounts = service.GetCountTables("User");
                dashboardCount.MatchCounts = service.GetCountTables("Match");
            }
            catch (System.Web.Services.Protocols.SoapException)
            {

            }
        }
    }
    /// <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"];
        }
    }
Example #10
0
    /// <summary>
    /// Makes an search to the backend based on the information that is filled
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void Search_Click(object sender, EventArgs e)
    {
        Search searchObject = new Search();
        SearchMapping searchMapping = new SearchMapping();
        searchObject = getSearchValues();
        service = new MatchyService();

        if (userOwn.UserCv.CvID != 0)
        {
            JobMapping jobMapping = new JobMapping();
            MatchyBackend.Job[] searchEmployee = service.SearchByEmployee(searchMapping.MapToService(searchObject));
            searchJobs = new Job[searchEmployee.Length];
            for (int i = 0; i < searchEmployee.Length; i++)
                searchJobs[i] = jobMapping.mapFromService(searchEmployee[i]);

            Session["SearchList"] = searchJobs;

        }
        else if (userOwn.UserCompany.CompanyID != 0)
        {
            CvMapping cvMapping = new CvMapping();
            MatchyBackend.Cv[] searchCompany = service.SearchByCompany(searchMapping.MapToService(searchObject));
            searchCvs = new Cv[searchCompany.Length];
            for (int i = 0; i < searchCompany.Length; i++)
                searchCvs[i] = cvMapping.mapFromService(searchCompany[i]);

            Session["SearchList"] = searchCvs;
        }
        Response.Redirect("zoekresultaten.aspx");
    }
Example #11
0
 /// <summary>
 /// Adds attributes to the password field and clears all Sessions.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void Page_Load(object sender, EventArgs e)
 {
     Session.Clear();
     userOwn = null;
     logPassword.Attributes.Add("value", "Wachtwoord");
     service = new MatchyService();
     checkLoggedOut();
 }
Example #12
0
 /// <summary>
 /// The standard changeURL for profilescreen
 /// </summary>
 public virtual void changeURL()
 {
     int parseable;
     if (url.Contains("="))
     {
         if(url.Contains("profile="))
             profileId = Request.QueryString["profile"];
         else
             profileId = Request.QueryString["company"];
     }
     service = new MatchyService();
     UserMapping mapping = new UserMapping();
     if (Int32.TryParse(profileId, out parseable))
     {
         try
         {
             user = mapping.mapFromService(service.GetUser(Int32.Parse(profileId))[0]);
             Session["UserObject"] = user;
         }
         catch
         {
             if (user.UserCv.CvID != 0)
                 Response.Redirect("profile.aspx?profile=" + string.Format(user.ProfileId.ToString()));
             else
                 Response.Redirect("company.aspx?company=" + string.Format(user.ProfileId.ToString()));
         }
     }
     else
     {
         if (user.UserCv.CvID != 0)
             Response.Redirect("profile.aspx?profile=" + string.Format(user.ProfileId.ToString()));
         else
             Response.Redirect("company.aspx?company=" + string.Format(user.ProfileId.ToString()));
     }
 }
Example #13
0
    /// <summary>
    /// Gets all the information this class needs.
    /// </summary>
    public override void CheckTypeAndFill()
    {
        if ((Match[])Session["MatchList"] == null)
        {

            if (userOwn.UserCv.CvID != 0)
            {
                MatchMapping matchMapping = new MatchMapping();
                service = new MatchyService();
                MatchyBackend.Match[] matches = service.GetMatchByCv((userOwn.UserCv.CvID), 500);
                match = new Match[matches.Length];
                for (int i = 0; i < matches.Length; i++)
                    match[i] = matchMapping.mapFromService(matches[i]);

                Session["MatchList"] = match;

            }
            else if (userOwn.UserCompany.CompanyID != 0)
            {
                MatchMapping matchMapping = new MatchMapping();
                service = new MatchyService();
                MatchyBackend.Match[] matches = service.GetMatchByCompany((userOwn.UserCompany.CompanyID), 500);
                match = new Match[matches.Length];
                for (int i = 0; i < matches.Length; i++)
                    match[i] = matchMapping.mapFromService(matches[i]);

                Session["MatchList"] = match;
            }
        }
        else
            match = (Match[])Session["MatchList"];
    }