コード例 #1
0
    protected void submit()
    {
        int row       = Table1.Rows.Count;
        int questions = row / 5;
        int cor_ans   = 0;
        int ans       = 0;
        int ques      = 0;

        for (int i = 0; i < row; i++)
        {
            for (int j = 1; j < 5; j++)
            {
                i++;
                RadioButton an = new RadioButton();
                an = (RadioButton)Table1.Rows[i].Cells[0].Controls[0];
                if (an.Checked)
                {
                    ans = j;
                }
            }
            if (ans == answers[ques])
            {
                cor_ans++;
            }
            ques++;
        }
        int            mark = cor_ans * 100 / questions;
        Candidate_pros pros = new Candidate_pros();

        pros.setTestMark(inter_id, mark);
        Response.Redirect(Session["cp"].ToString().TrimEnd());
    }
コード例 #2
0
    protected void getquestion()
    {
        Candidate_pros pros     = new Candidate_pros();
        List <string>  question = new List <string>();

        question    = pros.getFormQuestion(formId);
        Label5.Text = question.Count.ToString();

        for (int i = 0; i < question.Count; i++)
        {
            System.Drawing.Color c;
            if (i % 2 == 0)
            {
                c = System.Drawing.Color.LightBlue;
            }
            else
            {
                c = System.Drawing.Color.White;
            }
            TableRow qu = new TableRow();
            qu.Height = 40;
            TableCell number = new TableCell();
            TableCell q      = new TableCell();
            qu.BackColor = c;
            number.Text  = (i + 1).ToString() + "-";
            q.Text       = question[i];
            number.Width = 10;
            qu.Cells.Add(number);
            qu.Cells.Add(q);

            Table1.Rows.Add(qu);
        }
    }
コード例 #3
0
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        Candidate_pros pros     = new Candidate_pros();
        string         fileName = Label3.Text;

        if (!fileName.Contains("."))
        {
            return;
        }
        string tempPath = System.IO.Path.GetTempPath();
        string dpath    = tempPath + "\\" + fileName;

        byte[] data = pros.get_cer(candidate, "cv");
        string ex   = Path.GetExtension(fileName);


        Response.Buffer = true;

        if (ex.Equals(".pdf"))
        {
            Response.ContentType = "application/PDF";
        }
        else
        {
            Response.ContentType = "application/vnd.ms-word";
        }
        Response.BinaryWrite(data);
    }
コード例 #4
0
    protected void getCandidateDetails()
    {
        inv.Visible  = false;
        det.Visible  = false;
        conf.Visible = false;
        Account       ac   = new Account();
        List <string> deta = ac.getUserDetails(TextBox1.Text.ToString());

        if (ac.getUserLevel(TextBox1.Text.ToString()).Equals("emp"))
        {
            return;
        }
        if (deta.Count == 0)
        {
            inv.Visible = true;
        }
        else
        {
            Label8.Text  = deta[0];
            Label9.Text  = deta[1].Substring(0, 9);
            Label10.Text = deta[2];
            det.Visible  = true;
            conf.Visible = true;
        }
        Candidate_pros pros   = new Candidate_pros();
        List <string>  skills = pros.getSkills(TextBox1.Text);

        if (skills != null && skills.Count > 0)
        {
            Label11.Text = skills[0];
        }
    }
コード例 #5
0
    protected void ImageButton8_Click(object sender, ImageClickEventArgs e)
    {
        Candidate_pros pros = new Candidate_pros();

        pros.updateSkills(Session["user"].ToString().TrimEnd(), "curren_job", TextBox4.Text);
        TextBox4.Enabled = false;
    }
コード例 #6
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];
    }
コード例 #7
0
    protected void ImageButton13_Click(object sender, ImageClickEventArgs e)
    {
        Candidate_pros pros     = new Candidate_pros();
        string         fileName = Label9.Text;

        if (!fileName.Contains("."))
        {
            return;
        }
        //     string tempPath = System.IO.Path.GetTempPath();
        //   string dpath = tempPath + "\\" + fileName;
        byte[] data = pros.get_cer(Session["user"].ToString().TrimEnd(), "cer3");
        string ex   = Path.GetExtension(fileName);


        Response.Buffer = true;

        if (ex.Equals(".pdf"))
        {
            Response.ContentType = "application/PDF";
        }
        else
        {
            Response.ContentType = "vnd.openxmlformats-officedocument.wordprocessingml.document ";
        }
        Response.BinaryWrite(data);
    }
コード例 #8
0
    protected void ImageButton15_Click(object sender, ImageClickEventArgs e)
    {
        byte[]         data = FileUpload4.FileBytes;
        int            size = data.Length;
        Candidate_pros pros = new Candidate_pros();

        pros.upload_cert(Session["user"].ToString().TrimEnd(), "cer3", data, size, FileUpload4.FileName);
    }
コード例 #9
0
    protected void Page_Load(object sender, EventArgs e)
    {
        int_id = Int32.Parse(Session["inter"].ToString().TrimEnd());
        pos_id = Int32.Parse(Session["pos"].ToString().TrimEnd());
        fillInfo();
        Candidate_pros pros = new Candidate_pros();

        int_time = pros.getFirstInterviewTime(Session["user"].ToString().TrimEnd());
        getdt();
    }
コード例 #10
0
    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;
        }
    }
コード例 #11
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]);
    }
コード例 #12
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Session["cp"] = "Home.aspx";
        Account ac   = new Account();
        string  name = ac.get_name(Session["user"].ToString().TrimEnd());

        Label1.Text = name.ToUpper();
        Candidate_pros pros = new Candidate_pros();

        int_time = pros.getFirstInterviewTime(Session["user"].ToString().TrimEnd());
        getdt();
        getInterviewDetails();
    }
コード例 #13
0
    protected void getQuestion()
    {
        List <int>            answers   = new List <int>();
        Candidate_pros        pros      = new Candidate_pros();
        List <List <string> > questions = new List <List <string> >();

        questions = pros.getTestQuestion(testId);
        int qno = 1;

        Label6.Text = questions.Count.ToString();
        for (int i = 0; i < questions.Count; i++)
        {
            System.Drawing.Color c;
            if (i % 2 == 0)
            {
                c = System.Drawing.Color.LightBlue;
            }
            else
            {
                c = System.Drawing.Color.White;
            }
            TableRow  ques   = new TableRow();
            TableCell number = new TableCell();
            number.Width = 10;
            TableCell q = new TableCell();
            number.Text = qno.ToString() + "-";
            q.Text      = questions[i][0];
            ques.Cells.Add(number);
            ques.Cells.Add(q);
            ques.BackColor = c;
            Table1.Rows.Add(ques);

            for (int j = 0; j < 4; j++)
            {
                TableRow  ans = new TableRow();
                TableCell ar  = new TableCell();
                ar.Width      = 10;
                ans.BackColor = c;
                TableCell   an    = new TableCell();
                RadioButton radio = new RadioButton();
                radio.GroupName = i.ToString();
                ar.Controls.Add(radio);
                an.Text = questions[i][j + 1];
                ans.Cells.Add(ar);
                ans.Cells.Add(an);
                Table1.Rows.Add(ans);
            }
            answers.Add(Int32.Parse(questions[i][5]));
            qno++;
        }
    }
コード例 #14
0
    protected void get_skills()
    {
        Candidate_pros pros   = new Candidate_pros();
        List <string>  skills = pros.getSkills(Session["user"].ToString().TrimEnd());

        try
        {
            TextBox1.Text = skills[0];
            TextBox2.Text = skills[1];
            TextBox3.Text = skills[2];
            TextBox4.Text = skills[3];
        }
        catch (Exception ex) { }
    }
コード例 #15
0
    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];
    }
コード例 #16
0
    protected void getFormQuestion()
    {
        Candidate_pros pros     = new Candidate_pros();
        List <string>  question = new List <string>();

        formId   = pros.getFormId(positionId);
        question = pros.getFormQuestion(formId);

        for (int i = 0; i < question.Count; i++)
        {
            System.Drawing.Color c;
            if (i % 2 == 0)
            {
                c = System.Drawing.Color.LightBlue;
            }
            else
            {
                c = System.Drawing.Color.White;
            }
            TableRow  qu     = new TableRow();
            TableCell number = new TableCell();
            TableCell q      = new TableCell();
            qu.BackColor = c;
            number.Text  = (i + 1).ToString() + "-";
            q.Text       = question[i];
            number.Width = 10;
            qu.Cells.Add(number);
            qu.Cells.Add(q);

            Table1.Rows.Add(qu);

            TableRow  ans    = new TableRow();
            TableCell dump   = new TableCell();
            TableCell an     = new TableCell();
            TextBox   antext = new TextBox();
            ans.Height       = 40;
            antext.BackColor = c;
            ans.BackColor    = c;
            antext.Width     = 600;
            an.Controls.Add(antext);
            dump.Width = 10;
            ans.Cells.Add(dump);
            ans.Cells.Add(an);
            Table1.Rows.Add(ans);
        }
    }
コード例 #17
0
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        int           row     = Table1.Rows.Count;
        List <string> answers = new List <string>();

        for (int i = 1; i < row; i = i + 2)
        {
            TextBox ans = new TextBox();
            ans = (TextBox)Table1.Rows[i].Cells[1].Controls[0];
            answers.Add(ans.Text);
        }
        Candidate_pros pros = new Candidate_pros();

        pros.formAnswers(answers, formId, inter_id);
        pros.updateFormStatus(inter_id);
        Response.Redirect(Session["cp"].ToString().TrimEnd());
    }
コード例 #18
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];
    }
コード例 #19
0
    public void getFileNames()
    {
        Candidate_pros pros  = new Candidate_pros();
        List <string>  names = pros.getFilesName(Session["user"].ToString().TrimEnd());

        if (names[0].Length > 1)
        {
            Label3.Text = names[0];
        }
        if (names[1].Length > 1)
        {
            Label5.Text = names[1];
        }
        if (names[2].Length > 1)
        {
            Label7.Text = names[2];
        }
        if (names[3].Length > 1)
        {
            Label9.Text = names[3];
        }
    }
コード例 #20
0
    protected void getInterviewDetails()
    {
        Candidate_pros pros    = new Candidate_pros();
        List <string>  details = pros.getFirstInterviewDetails(Session["user"].ToString().TrimEnd());

        if (details.Count == 0)
        {
            return;
        }
        Label14.Text = details[2] + " Minuts";
        Label15.Text = details[3];
        Label16.Text = details[4];
        int_id       = details[5];
        Label12.Text = int_time.Date.ToString().Substring(0, 10);
        Label13.Text = int_time.TimeOfDay.ToString();
        Employee_pros pros2 = new Employee_pros();

        Label4.Text = pros2.getPositionName(Int32.Parse(details[1]));
        Label3.Text = pros.getCompanyName(details[0]);

        if (Label15.Text.TrimEnd().Equals("NOT_DONE"))
        {
            Button1.Visible = true;
            Label15.Text    = "Not Taken";
        }
        else
        {
            Label15.Text = "DONE   Result: " + details[6] + "%";
        }
        if (Label16.Text.TrimEnd().Equals("NOT_DONE"))
        {
            Button2.Visible = true;
            Label16.Text    = "Not Filled";
        }
        pos_id           = details[1];
        Session["inter"] = int_id;
        Session["pos"]   = pos_id;
    }
コード例 #21
0
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        Candidate_pros pros     = new Candidate_pros();
        string         fileName = Label3.Text;

        if (!fileName.Contains("."))
        {
            return;
        }
        byte[] data = pros.get_cer(Session["user"].ToString().TrimEnd(), "cv");
        string ex   = Path.GetExtension(fileName);


        Response.Buffer = true;

        if (ex.Equals(".pdf"))
        {
            Response.ContentType = "application/PDF";
        }
        else
        {
            Response.ContentType = "application/vnd.openxmlformats-officedocument.wordprocessingml.document ";
        }
        Response.BinaryWrite(data);
        Response.End();

        //using (System.IO.FileStream fs = new System.IO.FileStream(dpath, System.IO.FileMode.Create, System.IO.FileAccess.ReadWrite))
        //{
        //    using (System.IO.BinaryWriter bw = new System.IO.BinaryWriter(fs))
        //        {
        //            bw.Write(data);
        //            bw.Close();
        //        }

        //}
        //System.Diagnostics.Process.Start(dpath);
    }
コード例 #22
0
    protected void filltabel()
    {
        int                   count   = 0;
        Candidate_pros        pros    = new Candidate_pros();
        Employee_pros         epros   = new Employee_pros();
        List <List <string> > details = pros.getInterviews(Session["user"].ToString().TrimEnd(), type);

        foreach (List <string> temp in details)
        {
            count++;
            TableRow  row    = new TableRow();
            TableCell number = new TableCell();
            number.Text         = (count).ToString();
            row.HorizontalAlign = HorizontalAlign.Center;
            number.BackColor    = System.Drawing.Color.Silver;

            TableCell candidate = new TableCell();
            candidate.Text = temp[0];

            TableCell position = new TableCell();
            position.Text      = epros.getPositionName(Int32.Parse(temp[1]));
            position.BackColor = System.Drawing.Color.Silver;

            TableCell date = new TableCell();
            date.Text = temp[2];

            TableCell time = new TableCell();
            time.Text      = temp[3];
            time.BackColor = System.Drawing.Color.Silver;

            TableCell status = new TableCell();
            status.Text = temp[5];


            TableCell testres = new TableCell();
            testres.Text      = temp[6];
            testres.BackColor = System.Drawing.Color.Silver;

            TableCell res = new TableCell();
            res.Text = temp[7];


            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(candidate);
            row.Cells.Add(position);
            row.Cells.Add(date);
            row.Cells.Add(time);
            row.Cells.Add(status);
            row.Cells.Add(testres);
            row.Cells.Add(res);
            row.Cells.Add(check);
            Table1.Rows.Add(row);
        }
    }