protected void getdates()
    {
        Employee_pros pros       = new Employee_pros();
        int           positionId = pros.gerPositionId(Session["user"].ToString().TrimEnd(), DropDownList1.SelectedItem.ToString());

        dates = pros.getPositionDates(positionId);
    }
Beispiel #2
0
    protected void ImageButton3_Click(object sender, ImageClickEventArgs e)
    {
        int    row = Table1.Rows.Count;
        bool   flag = false;
        string emp = "", pos = "";

        for (int i = 1; i < row; i++)
        {
            RadioButton check = new RadioButton();
            check = (RadioButton)Table1.Rows[i].Cells[8].Controls[0];
            if (check.Checked)
            {
                emp  = Table1.Rows[i].Cells[1].Text;
                pos  = Table1.Rows[i].Cells[2].Text;
                flag = true;
                continue;
            }
        }

        if (!flag)
        {
            Label5.Visible = true;
            return;
        }
        Employee_pros pros = new Employee_pros();
        int           poId = pros.gerPositionId(emp, pos);

        int intId = pros.getInterviewId(emp, Session["user"].ToString().TrimEnd(), poId);

        Session["intId"] = intId.ToString();
        Response.Redirect("InterviewDetails.aspx");
    }
Beispiel #3
0
    protected void Button3_Click(object sender, EventArgs e)
    {
        Table m = Table1;



        List <string> questions = new List <string>();
        int           row_no    = Table1.Rows.Count;
        int           quest_no  = row_no;


        for (int i = 0; i < row_no;)
        {
            TextBox qu = (TextBox)Table1.Rows[i].Cells[1].Controls[0];
            questions.Add(qu.Text.ToString());
            i++;
        }
        Employee_pros pros    = new Employee_pros();
        int           form_id = pros.Add_Form(TextBox1.Text.ToString(), Int32.Parse(DropDownList1.SelectedItem.ToString()), Session["user"].ToString().TrimEnd());

        if (form_id == 0)
        {
            Label4.Visible = true;
            return;
        }
        pros.add_form_questions(questions, form_id);
        Panel1.Visible = false;
        Label4.Text    = "Form Has Been Added Successfully";
        Label4.Visible = true;
    }
Beispiel #4
0
    protected void ImageButton3_Click(object sender, ImageClickEventArgs e)
    {
        Employee_pros pros = new Employee_pros();

        pros.deleteForm(formId);
        Response.Redirect("CheckForm.aspx");
    }
Beispiel #5
0
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        int    row  = Table1.Rows.Count;
        string name = "";
        bool   flag = false;

        for (int i = 1; i < row; i++)
        {
            RadioButton check = new RadioButton();
            check = (RadioButton)Table1.Rows[i].Cells[3].Controls[0];
            if (check.Checked)
            {
                name = Table1.Rows[i].Cells[1].Text;
                flag = true;
                continue;
            }
        }
        if (!flag)
        {
            Label2.Visible = true;
            return;
        }
        Employee_pros pros   = new Employee_pros();
        int           formId = pros.getFormId(name, Session["user"].ToString().TrimEnd());

        Session["fid"] = formId.ToString();
        Response.Redirect("EditForm.aspx");
    }
Beispiel #6
0
    protected void ImageButton4_Click(object sender, ImageClickEventArgs e)
    {
        Employee_pros pros = new Employee_pros();

        pros.updateTest(testId, TextBox1.Text, Int32.Parse(DropDownList2.SelectedValue));
        Response.Redirect("CheckTests.aspx");
    }
Beispiel #7
0
    protected void ImageButton2_Click(object sender, ImageClickEventArgs e)
    {
        Employee_pros pros = new Employee_pros();

        pros.updateFormName(formId, TextBox1.Text);
        Response.Redirect("CheckForm.aspx");
    }
Beispiel #8
0
    protected void loadInterviews()
    {
        Employee_pros         pros = new Employee_pros();
        List <List <string> > det  = pros.getInterviewDetails(Session["user"].ToString().TrimEnd());
        int pid = 0;

        for (int i = 0; i < det.Count; i++)
        {
            if (i > 4)
            {
                return;
            }

            for (int j = 0; j < 4; j++)
            {
                if (j == 1)
                {
                    Table1.Rows[i + 1].Cells[j].Text = pros.getPositionName(Int32.Parse(det[i][j]));
                    if (i == 0)
                    {
                        pid = Int32.Parse(det[i][j]);
                    }
                }

                else
                {
                    Table1.Rows[i + 1].Cells[j].Text = det[i][j];
                }
            }
        }
        Label5.Text      = Table1.Rows[1].Cells[0].Text;
        Label6.Text      = Table1.Rows[1].Cells[1].Text;
        intid            = pros.getInterviewId(Session["user"].ToString().TrimEnd(), Label5.Text, pid);
        Session["intid"] = intid;
    }
Beispiel #9
0
    protected void ImageButton5_Click(object sender, ImageClickEventArgs e)
    {
        Employee_pros pros = new Employee_pros();

        pros.deletTest(testId);
        Response.Redirect("CheckTests.aspx");
    }
Beispiel #10
0
    protected void getInfo()
    {
        Employee_pros pros = new Employee_pros();

        TextBox1.Text = pros.getTestName(testId);
        DropDownList2.SelectedValue = pros.getTestTime(testId).ToString();
    }
Beispiel #11
0
    protected void filldata()
    {
        Candidate_pros pros     = new Candidate_pros();
        List <string>  idetails = pros.getInterviewById(int_Id);
        Employee_pros  epros    = new Employee_pros();

        Label14.Text = epros.getPositionName(Int32.Parse(idetails[1]));
        poid         = Int32.Parse(idetails[1]);
        Label16.Text = idetails[2];
        Label18.Text = idetails[3];
        Label20.Text = idetails[5];
        Label22.Text = idetails[6];
        Label29.Text = idetails[7];
        Label26.Text = idetails[8];

        if (Label22.Text.Equals("0"))
        {
            Label22.Text    = "Not Done";
            Button1.Visible = true;
        }
        if (Label29.Text.TrimEnd().Equals("NOT_DONE"))
        {
            Button2.Visible = true;
        }

        Account ac = new Account();

        Label3.Text = ac.get_name(idetails[0]);
        List <string> company = ac.getCompanyDetails(idetails[0]);

        Label27.Text  = company[0];
        Label28.Text  = company[1];
        TextBox1.Text = company[2];
        Label7.Text   = company[3];
    }
    protected void fillform()
    {
        List <string> answer   = new List <string>();
        List <string> question = new List <string>();
        Employee_pros pros     = new Employee_pros();

        answer = pros.getFormAnswers(int_id);
        if (answer.Count < 1)
        {
            return;
        }
        int formId = Int32.Parse(answer[0]);

        question = pros.getFormQuestion(formId);

        for (int i = 0; i < question.Count; i++)
        {
            System.Drawing.Color color;

            if (i % 2 != 0)
            {
                color = System.Drawing.Color.LightBlue;
            }
            else
            {
                color = System.Drawing.Color.White;
            }

            TableRow  qrow   = new TableRow();
            TableCell number = new TableCell();
            number.Text = (i + 1).ToString() + "-";
            TableCell qu = new TableCell();
            qu.Text = question[i];

            qrow.Cells.Add(number);
            qrow.Cells.Add(qu);

            TableRow  arow = new TableRow();
            TableCell dumb = new TableCell();
            TableCell an   = new TableCell();
            an.Text = answer[i + 1];

            arow.Cells.Add(dumb);
            arow.Cells.Add(an);

            qrow.BackColor = color;
            arow.BackColor = color;
            arow.Height    = 25;

            Table1.Rows.Add(qrow);
            Table1.Rows.Add(arow);
        }

        Label2.Text = pros.getFormName(formId);
        Label3.Text = pros.getPositionName(pros.getInterviewPositionId(int_id));
        Account ac = new Account();

        Label1.Text = ac.get_name(pros.getInterviewById(int_id)[0]);
    }
    protected void getPositions()
    {
        Employee_pros pros      = new Employee_pros();
        List <string> positions = pros.getPositions(Session["user"].ToString().TrimEnd());

        for (int i = 0; i < positions.Count; i++)
        {
            DropDownList1.Items.Add(positions[i]);
        }
    }
    protected void getInterviewdet()
    {
        Employee_pros pros    = new Employee_pros();
        List <string> details = pros.getInterviewById(int_id);

        candidate    = details[0];
        Label14.Text = pros.getPositionName(Int32.Parse(details[1]));
        Label16.Text = details[2];
        Label18.Text = details[3];
        Label20.Text = details[5];
        Label22.Text = details[6];
        Label26.Text = details[7];
        Account       ac       = new Account();
        List <string> cand_det = new List <string>();

        cand_det    = ac.getUserDetails(candidate);
        Label3.Text = cand_det[0];
        Label5.Text = cand_det[1].Substring(0, 9);
        Label7.Text = cand_det[2];
        Candidate_pros cpros  = new Candidate_pros();
        List <string>  skills = new List <string>();

        skills = cpros.getSkills(candidate);
        if (skills.Count != 0)
        {
            TextBox1.Text = skills[0];
            TextBox2.Text = skills[1];
            Label12.Text  = skills[2];
            TextBox3.Text = skills[3];
        }

        List <string> fileName = new List <string>();

        fileName     = cpros.getFilesName(candidate);
        Label36.Text = fileName[0];
        Label38.Text = fileName[1];
        Label40.Text = fileName[2];
        Label42.Text = fileName[3];
        Interview_pros ipros = new Interview_pros();
        List <string>  scors = ipros.getInterviewScore(int_id);

        if (scors.Count == 5)
        {
            Label27.Text  = scors[0];
            Label29.Text  = scors[1];
            Label31.Text  = scors[2];
            Label33.Text  = scors[3];
            TextBox4.Text = scors[4];
        }
        if (Label26.Text.TrimEnd().Equals("PENDING"))
        {
            ImageButton2.Visible = true;
            ImageButton3.Visible = true;
        }
    }
Beispiel #15
0
    protected void dates()
    {
        Employee_pros pros = new Employee_pros();

        DateTime[] dates;
        dates = pros.getPositionDates(positionId);
        Calendar1.SelectedDate = dates[0];
        Calendar2.SelectedDate = dates[1];
        TextBox2.Text          = Calendar1.SelectedDate.ToString().Substring(0, 9);
        TextBox3.Text          = Calendar2.SelectedDate.ToString().Substring(0, 9);
    }
Beispiel #16
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Account ac   = new Account();
        string  name = ac.get_name(Session["user"].ToString().TrimEnd());

        Label1.Text = name.ToUpper();
        formId      = Int32.Parse(Session["fid"].ToString());
        Employee_pros pros = new Employee_pros();

        TextBox1.Text = pros.getFormName(formId);
        getquestion();
    }
Beispiel #17
0
    protected void getInfo()
    {
        Employee_pros  epros = new Employee_pros();
        Candidate_pros cpros = new Candidate_pros();

        Label4.Text = epros.getPositionName(positionId);
        testId      = cpros.getTestId(positionId);
        List <string> testDet = cpros.getTestDetails(testId);

        Label5.Text = testDet[0];
        dur         = Int32.Parse(testDet[1]);
    }
Beispiel #18
0
    protected void Page_Load(object sender, EventArgs e)
    {
        candidate = Session["candidate"].ToString().TrimEnd();
        employee  = Session["user"].ToString().TrimEnd();
        int_id    = Int32.Parse(Session["intid"].ToString().TrimEnd());
        get_info();
        Employee_pros pros = new Employee_pros();
        List <string> det  = pros.getInterviewById(int_id);

        dur      = Int32.Parse(det[4]);
        int_time = pros.getFirstIntTime(Session["user"].ToString().TrimEnd());
        getdt();
    }
Beispiel #19
0
    protected void fill_position()
    {
        DropDownList1.Items.Clear();
        string        user     = Session["user"].ToString().TrimEnd();
        Employee_pros pros     = new Employee_pros();
        List <string> position = pros.getPositions(user);

        DropDownList1.Items.Add("ALL");
        foreach (string p in position)
        {
            DropDownList1.Items.Add(p);
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        inter_id = Int32.Parse(Session["inter"].ToString().TrimEnd());
        Account ac   = new Account();
        string  name = ac.get_name(Session["user"].ToString().TrimEnd());

        Label1.Text = name.ToUpper();
        positionId  = Int32.Parse(Session["pos"].ToString().TrimEnd());
        Employee_pros pros = new Employee_pros();

        Label4.Text = pros.getPositionName(positionId);
        getFormQuestion();
    }
Beispiel #21
0
    protected void info()
    {
        Employee_pros pros = new Employee_pros();
        List <string> det  = new List <string>();

        det = pros.getPositionDetbyId(positionId);

        TextBox1.Text = det[0];
        DropDownList1.SelectedValue = det[1];
        DropDownList2.SelectedValue = pros.getTestName(Int32.Parse(det[2]));
        DropDownList3.SelectedValue = pros.getFormName(Int32.Parse(det[3]));
        DropDownList4.SelectedValue = det[4];
        TextBox4.Text = det[5];
    }
    protected void fillLists()
    {
        Employee_pros pros  = new Employee_pros();
        List <string> tests = pros.getTests(Session["user"].ToString().TrimEnd());
        List <string> forms = pros.getForms(Session["user"].ToString().TrimEnd());

        for (int i = 0; i < tests.Count; i++)
        {
            DropDownList2.Items.Add(tests[i]);
        }
        for (int i = 0; i < forms.Count; i++)
        {
            DropDownList3.Items.Add(forms[i]);
        }
    }
    protected void fillInfo()
    {
        Employee_pros pros = new Employee_pros();

        Label3.Text = pros.getPositionName(pos_id);
        Label4.Text = pros.getRequierment(pos_id);
        Candidate_pros cpros = new Candidate_pros();
        List <string>  det   = cpros.getInterviewById(int_id);

        dur = Int32.Parse(det[4]);
        Account       ac = new Account();
        List <string> d  = ac.getCompanyDetails(det[0]);

        Label1.Text = d[0];
    }
    protected void Button2_Click(object sender, EventArgs e)
    {
        Table m = Table1;



        List <List <string> > questions = new List <List <string> >();
        List <string>         quest;
        int row_no   = Table1.Rows.Count;
        int quest_no = row_no / 5;


        for (int i = 0; i < row_no;)
        {
            quest = new List <string>();
            TextBox qu = (TextBox)Table1.Rows[i].Cells[1].Controls[0];
            quest.Add(qu.Text.ToString());
            i++;
            int cor_ans = 0;
            for (int j = 0; j < 4; j++)
            {
                RadioButton anc = (RadioButton)Table1.Rows[i].Cells[1].Controls[0];
                TextBox     an  = (TextBox)Table1.Rows[i].Cells[1].Controls[1];
                quest.Add(an.Text.ToString());
                if (anc.Checked)
                {
                    cor_ans = j + 1;
                }
                i++;
            }
            quest.Add(cor_ans.ToString());
            questions.Add(quest);
        }
        Employee_pros pros    = new Employee_pros();
        int           test_id = pros.Add_Test(TextBox1.Text.ToString(), Int32.Parse(DropDownList1.SelectedItem.ToString()), Session["user"].ToString().TrimEnd(), Int32.Parse(DropDownList2.SelectedValue.ToString()));

        if (test_id == 0)
        {
            Label4.Visible = true;
            return;
        }
        pros.add_test_questions(questions, test_id);
        Panel1.Visible = false;
        Label4.Text    = "Test Has Been Added Successfully";
        Label4.Visible = true;
    }
Beispiel #25
0
    protected void loadPositions()
    {
        Employee_pros         pros = new Employee_pros();
        List <List <string> > det  = pros.getPositionDetails(Session["user"].ToString().TrimEnd());

        for (int i = 0; i < det.Count; i++)
        {
            if (i > 4)
            {
                return;
            }

            for (int j = 0; j < 3; j++)
            {
                Table2.Rows[i + 1].Cells[j].Text = det[i][j];
            }
        }
    }
Beispiel #26
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Account ac   = new Account();
            string  name = ac.get_name(Session["user"].ToString().TrimEnd());
            Label1.Text = name.ToUpper();
            loadInterviews();
            loadPositions();



            setSessions();
        }
        Employee_pros pros = new Employee_pros();

        int_time = pros.getFirstIntTime(Session["user"].ToString().TrimEnd());
        getdt();
    }
Beispiel #27
0
    protected void get_info()
    {
        Account ac = new Account();

        Label1.Text = ac.get_name(candidate);
        Employee_pros epros      = new Employee_pros();
        int           positionId = epros.getInterviewPositionId(int_id);

        Label3.Text = epros.getPositionName(positionId);
        Label4.Text = epros.getRequierment(positionId);
        Label2.Text = ac.getBd(candidate).ToString().Substring(0, 9);
        Candidate_pros cpros  = new Candidate_pros();
        List <string>  skills = cpros.getSkills(candidate);

        TextBox1.Text = skills[0];
        TextBox2.Text = skills[2];
        TextBox3.Text = skills[1];
        Label11.Text  = skills[3];
    }
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        if (validation() == false)
        {
            return;
        }

        string        name = TextBox1.Text.ToString().TrimEnd();
        int           pn   = Int32.Parse(DropDownList1.SelectedItem.ToString());
        DateTime      od   = Calendar1.SelectedDate;
        DateTime      cd   = Calendar2.SelectedDate;
        string        test = DropDownList2.SelectedItem.ToString();
        string        form = DropDownList3.SelectedItem.ToString();
        int           Ey   = Int32.Parse(DropDownList4.SelectedItem.ToString());
        string        Er   = TextBox4.Text.ToString();
        Employee_pros ep   = new Employee_pros();

        ep.addPosition(name, pn, od, cd, test, form, Ey, Er, Session["user"].ToString().TrimEnd());
        Response.Redirect("CheckPositions.aspx");
    }
    protected void addInterview()
    {
        Employee_pros pros = new Employee_pros();

        string   emp_user   = Session["user"].ToString().TrimEnd();
        string   can_user   = TextBox1.Text;
        int      positionId = pros.gerPositionId(emp_user, DropDownList1.SelectedItem.ToString());
        DateTime date       = Calendar1.SelectedDate;
        TimeSpan time       = new TimeSpan(Int32.Parse(DropDownList3.SelectedItem.ToString()), Int32.Parse(DropDownList4.SelectedItem.ToString()), 0);
        int      dur        = Int32.Parse(DropDownList2.SelectedValue);

        if (pros.check_timing(emp_user, date, time, dur) == false)
        {
            Label19.Text    = "Selected time is overlaped with another interview";
            Label19.Visible = true;
            return;
        }

        pros.newInterview(emp_user, can_user, positionId, date, time, dur);
        Response.Redirect("CheckInterview.aspx");
    }
Beispiel #30
0
    protected void fillTest()
    {
        Employee_pros pros = new Employee_pros();

        List <List <string> > details = new List <List <string> >();

        details = pros.getTestDetails(Session["user"].ToString().TrimEnd());
        for (int i = 0; i < details.Count; i++)
        {
            TableRow  row    = new TableRow();
            TableCell number = new TableCell();
            number.Text         = (i + 1).ToString();
            row.HorizontalAlign = HorizontalAlign.Center;
            number.BackColor    = System.Drawing.Color.Silver;


            TableCell name = new TableCell();
            name.Text = details[i][0];

            TableCell quest = new TableCell();
            quest.Text      = details[i][1];
            quest.BackColor = System.Drawing.Color.Silver;
            TableCell dur = new TableCell();
            dur.Text = details[i][2];

            TableCell   check = new TableCell();
            RadioButton ch    = new RadioButton();
            ch.GroupName    = "ch";
            check.BackColor = System.Drawing.Color.Silver;
            check.Controls.Add(ch);

            row.Cells.Add(number);
            row.Cells.Add(name);
            row.Cells.Add(quest);
            row.Cells.Add(dur);

            row.Cells.Add(check);
            Table1.Rows.Add(row);
        }
    }