protected void Page_Load(object sender, EventArgs e)
    {
        LoginModule myLoginModule = new LoginModule();
        myLoginModule.checkLoginStatus();

        WelcomeLabel.Text = myLoginModule.getFirstName((String)Session["userID"]);
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        LoginModule myLoginModule = new LoginModule();
        myLoginModule.checkLoginStatus();
        myLoginModule.checkPermission(1);
        WelcomeLabel.Text = myLoginModule.getFirstName((String)Session["userID"]);
        if (!IsPostBack)
        {
            try
            {

                Employer myEmployer = new Employer();
                //LoginModule myLoginModule = new LoginModule();
                String[] stringArray = myEmployer.getInfoToForm((String)Session["userID"]);
                fName.Text = stringArray[0]; mName.Text = stringArray[1]; lName.Text = stringArray[2];
                company.Text = stringArray[4];
                personalPhone.Text = stringArray[9];
                personalEmail.Text = stringArray[3];
                companyPhone.Text = stringArray[10];
                companyEmail.Text = stringArray[8];
                number.Text = stringArray[5];
                street.Text = stringArray[6];
                town.Text = stringArray[7];
            }
            catch (Exception ex)
            {
                Page.ClientScript.RegisterStartupScript(Page.GetType(), "showAlert", "showAlert();", true);
            }
        }
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     LoginModule myLoginModule = new LoginModule();
     myLoginModule.checkLoginStatus();
     myLoginModule.checkPermission(0);
     FunctionCallerLabel.Text = String.Empty;
     WelcomeLabel.Text = myLoginModule.getFirstName((String)Session["userID"]);
 }
 protected void ConnectFBButton_Click(object sender, EventArgs e)
 {
     /*HttpClient client = new HttpClient();
     client.BaseAddress = new Uri("http://localhost:4840");
     client.PostAsJsonAsync("http://localhost:4840/Temp_Code/test4.aspx", "does this work?"); */
     LoginModule myLoginModule = new LoginModule();
     myLoginModule.checkLoginStatus();
     InfoModule myModule = new InfoModule();
     String token = myModule.facebookCheckAuthorisation();
     var client = new FacebookClient(token);
     client.Post("/me/feed", new { message = "Hello World!" });
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     LoginModule myLoginModule = new LoginModule();
     myLoginModule.checkLoginStatus();
     myLoginModule.checkPermission(1);
     WelcomeLabel.Text = myLoginModule.getFirstName((String)Session["userID"]);
     if (!IsPostBack)
     {
         ForumModule myForumModule = new ForumModule();
         List<String> myList = new List<string>();
         myList = myForumModule.getListOfForums();
     }
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        LoginModule myLoginModule = new LoginModule();
        myLoginModule.checkLoginStatus();
        myLoginModule.checkPermission(1);
        WelcomeLabel.Text = myLoginModule.getFirstName((String)Session["userID"]);

        PositionId.Visible = false;

        showHideApplyButton();

        populatePage();
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        LoginModule myLoginModule = new LoginModule();
        myLoginModule.checkLoginStatus();
        myLoginModule.checkPermission(0);
        WelcomeLabel.Text = myLoginModule.getFirstName((String)Session["userID"]);

        try
        {
            if (!IsPostBack)
            {
                CVModule myCVModule = new CVModule();
                //LoginModule myLoginModule = new LoginModule();
                String[] stringArray = myCVModule.getDetailsToForm((String)Session["userID"]);
                fName.Text = stringArray[0]; mName.Text = stringArray[1]; lName.Text = stringArray[2];
                //String date = stringArray[3];
                DateTime myDateTime = new DateTime();
                myDateTime = DateTime.Parse(stringArray[3]);
                Datepicker.Text = myDateTime.ToString("MM/dd/yyyy");
                //DateTime dt = Convert.ToDateTime(date);
                //Calendar1.SelectedDate = dt;
                //Calendar1.VisibleDate = dt;
                int genderIndex;
                if (stringArray[5].Equals("True"))
                {
                    genderIndex = 1;
                }
                else
                {
                    genderIndex = 0;
                }
                Gender.SelectedIndex = genderIndex;
                int mStatusIndex;
                if (stringArray[6].Equals("True"))
                {
                    mStatusIndex = 1;
                }
                else
                {
                    mStatusIndex = 0;
                }
                mStatus.SelectedIndex = mStatusIndex;
                number.Text = stringArray[7]; street.Text = stringArray[8]; town.Text = stringArray[9];
                email.Text = stringArray[10]; phone.Text = stringArray[11]; school.Text = stringArray[12];
            }
        }
        catch (Exception ex)
        {
            Page.ClientScript.RegisterStartupScript(Page.GetType(), "showAlert", "showAlert();", true);
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        LoginModule myLoginModule = new LoginModule();
        myLoginModule.checkLoginStatus();
        myLoginModule.checkPermission(1);

        JobsModule myJobsModule = new JobsModule();
        if (!myJobsModule.doesJobBelongToUser((String)Session["userID"], Request["pId"]))
        {
            myLoginModule.checkPermission(3);
        }

        WelcomeLabel.Text = myLoginModule.getFirstName((String)Session["userID"]);

        setTable();
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        LoginModule myLoginModule = new LoginModule();
        myLoginModule.checkLoginStatus();
        myLoginModule.checkPermission(0);
        WelcomeLabel.Text = myLoginModule.getFirstName((String)Session["userID"]);

        /*
        JobsModule myJobsModule = new JobsModule();
        myJobsModule.setUserId((String)Session["userId"]);
        JobsGridView.DataSource = myJobsModule.viewMentionedJobs();
        JobsGridView.DataBind();
         */

        this.setTable();
        this.setTable2();
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        LoginModule myLoginModule = new LoginModule();
        myLoginModule.checkLoginStatus();
        myLoginModule.checkPermission(0);
        WelcomeLabel.Text = myLoginModule.getFirstName((String)Session["userID"]);
        SearchByDropDownList.AutoPostBack = true;
        JobTypeDropDownList.Visible = false;
        JobTypeLabel.Visible = false;

        if (SearchByDropDownList.SelectedValue.Equals("JobPosition"))
        {
            JobTypeDropDownList.Visible = true;
            JobTypeLabel.Visible = true;
        }

        search();
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     LoginModule myLoginModule = new LoginModule();
     myLoginModule.checkLoginStatus();
     myLoginModule.checkPermission(1);
     WelcomeLabel.Text = myLoginModule.getFirstName((String)Session["userID"]);
     if (!IsPostBack)
     {
         ForumModule myForumModule = new ForumModule();
         List<String> myList = new List<string>();
         myList = myForumModule.getListOfForums();
         ListOfForumsDropDownList.DataSource = myList;
         ListOfForumsDropDownList.DataBind();
     }
     else
     {
         ForumModule myForumModule = new ForumModule();
         String forumID = myForumModule.getForumID(ListOfForumsDropDownList.SelectedValue);
         GridView1.DataSource = myForumModule.getPostsOFForum(forumID);
         GridView1.DataBind();
         Page.ClientScript.RegisterStartupScript(Page.GetType(), "animateGridView", "animateGridView();", true);
     }
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        LoginModule myLoginModule = new LoginModule();
        myLoginModule.checkLoginStatus();
        myLoginModule.checkPermission(0);
        WelcomeLabel.Text = myLoginModule.getFirstName((String)Session["userID"]);

        HttpContext context = System.Web.HttpContext.Current;
        //Added code
        CVModule myCVModule = new CVModule();
        myCVModule.setUserID(context.Request.QueryString["userId"]);
        picone.ImageUrl = "ShowPhoto.aspx?userId=" + context.Request.QueryString["userId"];
        //String[] stringArray = myCVModule.getDetailsToForm(myLoginModule.getID(TextBox2.Text));
        String[] stringArray = myCVModule.getDetailsToForm(context.Request.QueryString["userId"]);
        name.Text = stringArray[0] + " " + stringArray[1] + " " + stringArray[2];
        String dob = stringArray[3];
        DateTime myDateTime = new DateTime();
        myDateTime = DateTime.Parse(stringArray[3]);
        String stringAge = myDateTime.Subtract(DateTime.Now).ToString("dhms");
        long age = Int64.Parse(stringAge);
        age /= 1000000;
        age /= 365;
        Calendar1.Text = age.ToString();
        if (stringArray[5].Equals("True"))
        {
            Gender.Text = "Female";
        }
        else
        {
            Gender.Text = "Male";
        }
        if (stringArray[6].Equals("True"))
        {
            mStatus.Text = "Married";
        }
        else
        {
            mStatus.Text = "Single";
        }
        number.Text = stringArray[7]; street.Text = stringArray[8]; town.Text = stringArray[9];
        email.Text = stringArray[10];
        //phone.Text = stringArray[11];
        school.Text = stringArray[12];

        FirstDegreeGridView.DataSource = myCVModule.getFirstDegree();
        FirstDegreeGridView.DataBind();
        FirstDegreeGridView.GridLines = GridLines.None;
        if (FirstDegreeGridView.Rows.Count == 0)
        {
            FirstDegreesLabel.Visible = false;
        }

        MastersDegreeGridView.DataSource = myCVModule.getMastersDegree();
        MastersDegreeGridView.DataBind();
        MastersDegreeGridView.GridLines = GridLines.None;
        if (MastersDegreeGridView.Rows.Count == 0)
        {
            MastersDegreeLabel.Visible = false;
        }

        PhdGridView.DataSource = myCVModule.getPhd();
        PhdGridView.DataBind();
        PhdGridView.GridLines = GridLines.None;
        if (PhdGridView.Rows.Count == 0)
        {
            PhdLabel.Visible = false;
        }

        SoftSkillGridView.DataSource = myCVModule.getSoftSkill();
        SoftSkillGridView.DataBind();
        SoftSkillGridView.GridLines = GridLines.None;
        if (SoftSkillGridView.Rows.Count == 0)
        {
            SoftSkillLabel.Visible = false;
        }

        PhoneGridView.DataSource = myCVModule.getPhoneNumbers();
        PhoneGridView.DataBind();
        PhoneGridView.GridLines = GridLines.None;
        if (PhoneGridView.Rows.Count == 0)
        {
            PhoneLabel.Visible = false;
        }

        SeekingJobsGridView.DataSource = myCVModule.getSeekingJobs();
        SeekingJobsGridView.DataBind();
        SeekingJobsGridView.GridLines = GridLines.None;
        if (SeekingJobsGridView.Rows.Count == 0)
        {
            SeekingJobsLabel.Visible = false;
        }
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     LoginModule myLoginModule = new LoginModule();
     myLoginModule.checkLoginStatus();
 }