Exemplo n.º 1
0
 private void FillControlsWithData()
 {
     if (candidateId > 0 || candidateId != null)
     {
         afeVO = afeBLO.SelectAFEOfCandidate(candidateId);
         if (afeVO != null)
         {
             hidAFEId.Value          = afeVO.AfeId.ToString();
             txtApplicationDate.Text =
                 DateTime.Parse(afeVO.ApplicationDate).ToString("yyyy-MM-dd");
             txtPositionAppliedFor.Text = afeVO.PositionAppliedFor;
             txtInterviewerName.Text    = afeVO.InterviewerName;
         }
     }
 }
Exemplo n.º 2
0
 private void DataBindItems()
 {
     if (Session["Candidate"] != null || Request.Cookies["Candidate"] != null)
     {
         afeVO = afeBLO.SelectAFEOfCandidate(candidateId);
         lblApplicationDate.Text = DateTime.Parse(afeVO.ApplicationDate).
                                   ToString("MMMM d, yyyy");
         lblPositionAppliedFor.Text = afeVO.PositionAppliedFor;
         lblInterviewerName.Text    = afeVO.InterviewerName;
         file1VO      = file1BLO.SelectFile1OfCandidateForPrint(candidateId);
         lblName.Text = file1VO.FirstName
                        + " “"
                        + file1VO.NickName
                        + "” "
                        + file1VO.MiddleName
                        + " "
                        + file1VO.LastName
                        + " "
                        + file1VO.Affix;
         lblDateOfBirth.Text    = DateTime.Parse(file1VO.DateOfBirth).ToString("MMMM d, yyyy");
         lblPlaceOfBirth.Text   = file1VO.PlaceOfBirth;
         lblNationality.Text    = file1VO.Nationality;
         lblGender.Text         = file1VO.Gender;
         lblCivilStatus.Text    = file1VO.CivilStatus;
         lblReligion.Text       = file1VO.Religion;
         lblBloodType.Text      = file1VO.BloodType;
         lblSSS.Text            = file1VO.SSS;
         lblTIN.Text            = file1VO.TIN;
         lblPresentAddress.Text =
             file1VO.PresentAddress
             + ", "
             + file1VO.PresentCity
             + ", "
             + file1VO.PresentDistrict
             + ", "
             + file1VO.PresentCountry;
         lblPermanentAddress.Text =
             file1VO.PermanentAddress
             + ", "
             + file1VO.PermanentCity
             + ", "
             + file1VO.PermanentDistrict
             + ", "
             + file1VO.PermanentCountry;
         lblProvincialAddress.Text =
             file1VO.ProvincialAddress
             + ", "
             + file1VO.ProvincialCity
             + ", "
             + file1VO.ProvincialDistrict
             + ", "
             + file1VO.ProvincialCountry;
         lblHomeNumber.Text       = file1VO.PresentTelephoneHome;
         lblAdditionalNumber.Text = file1VO.PresentTelephoneAdditional;
         lblMobileNumber.Text     = file1VO.PresentTelephoneMobile;
         lblFaxNumber.Text        = file1VO.PresentFax;
         lblProvincialNumber.Text = file1VO.ProvincialTelephone;
         gvEducations.DataSource  = file2BLO.SelectFile2OfCandidate(candidateId);
         gvEducations.DataBind();
         if (file2BLO.File2OfCandidateHasSchoolOthers(candidateId) == false)
         {
             gvEducations.Columns[2].Visible = false;
         }
         gvOrganizations.DataSource = file4BLO.SelectFile4OfCandidate(candidateId);
         gvOrganizations.DataBind();
         gvEmployers.DataSource = file3BLO.SelectFile3OfCandidate(candidateId);
         gvEmployers.DataBind();
         gvOtherQualifications.DataSource = qualificationBLO.SelectQualificationOfAFE(afeId);
         gvOtherQualifications.DataBind();
         if (qualificationBLO.QualificationOfAFEHasOthers(afeId) == false)
         {
             gvOtherQualifications.Columns[2].Visible = false;
         }
         List <Label> answers = new List <Label>();
         answers.Add(lblAnswer1);
         answers.Add(lblAnswer2);
         answers.Add(lblAnswer3);
         answers.Add(lblAnswer4);
         answers.Add(lblAnswer5);
         answers.Add(lblAnswer6);
         answers.Add(lblAnswer7);
         List <Label> questions = new List <Label>();
         questions.Add(lblQuestion1);
         questions.Add(lblQuestion2);
         questions.Add(lblQuestion3);
         questions.Add(lblQuestion4);
         questions.Add(lblQuestion5);
         questions.Add(lblQuestion6);
         questions.Add(lblQuestion7);
         DataTable dt = new DataTable();
         dt = answerBLO.SelectAnswerWithQuestionOfAFE(afeId);
         for (int i = 0; i < dt.Rows.Count; i++)
         {
             questions[i].Text = dt.Rows[i]["question"].ToString();
             if (dt.Rows[i]["answer"].ToString() == "False")
             {
                 answers[i].Text = "No";
             }
             else if (dt.Rows[i]["answer"].ToString() == "True")
             {
                 if (dt.Rows[i]["value"].ToString() != "")
                 {
                     answers[i].Text = "Yes: " + dt.Rows[i]["value"].ToString();
                 }
                 else if (dt.Rows[i]["relative_name"].ToString() != "" &&
                          dt.Rows[i]["company_name"].ToString() != "")
                 {
                     answers[i].Text = "Yes: " + dt.Rows[i]["relative_name"].ToString() +
                                       " at " + dt.Rows[i]["company_name"].ToString();
                 }
             }
         }
         gvDependents.DataSource = file5BLO.SelectFile5OfCandidate(candidateId);
         gvDependents.DataBind();
         gvProfessionalReferences.DataSource =
             professionalReferenceBLO.SelectProfessionalReferenceOfAFE(afeId);
         gvProfessionalReferences.DataBind();
         gvPersonalReferences.DataSource =
             personalReferenceBLO.SelectPersonalReferenceOfAFE(afeId);
         gvPersonalReferences.DataBind();
     }
 }
        private void DataBindItems()
        {
            afeVO = afeBLO.SelectAFEOfCandidate(candidateId);
            lblApplicationDate.Text = DateTime.Parse(afeVO.ApplicationDate).
                                      ToString("MMMM d, yyyy");
            lblPositionAppliedFor.Text = afeVO.PositionAppliedFor;
            lblInterviewerName.Text    = afeVO.InterviewerName;
            file1VO      = file1BLO.SelectFile1OfCandidateForPrint(candidateId);
            lblName.Text = file1VO.FirstName
                           + " &ldquo;"
                           + file1VO.NickName
                           + "&rdquo; "
                           + file1VO.MiddleName
                           + " "
                           + file1VO.LastName
                           + " "
                           + file1VO.Affix;
            lblApplicantMobileNumber.Text = file1VO.PresentTelephoneMobile;
            lblApplicantEmailAddress.Text = candidateBLO.SelectCandidateEmail(candidateId);
            lblApplicantDateOfBirth.Text  = DateTime.Parse(file1VO.DateOfBirth).
                                            ToString("MMMM d, yyyy");
            lblApplicantPlaceOfBirth.Text = file1VO.PlaceOfBirth;
            lblApplicantGender.Text       = file1VO.Gender;
            if (file1VO.CivilStatus != "Single")
            {
                lblApplicantCivilStatus.Text = file1VO.CivilStatus + " since " +
                                               DateTime.Parse(file1VO.CivilStatusDate).ToString("MMMM d, yyyy");
            }
            else
            {
                lblApplicantCivilStatus.Text = file1VO.CivilStatus;
            }
            lblApplicantPresentAddress.Text =
                file1VO.PresentAddress
                + ", "
                + file1VO.PresentCity
                + ", "
                + file1VO.PresentDistrict
                + ", "
                + file1VO.PresentCountry;
            lblApplicantProvincialAddress.Text =
                file1VO.ProvincialAddress
                + ", "
                + file1VO.ProvincialCity
                + ", "
                + file1VO.ProvincialDistrict
                + ", "
                + file1VO.ProvincialCountry;
            lblApplicantHeight.Text    = file1VO.Height;
            lblApplicantWeight.Text    = file1VO.Weight;
            lblApplicantBloodType.Text = file1VO.BloodType;
            gvEmployers.DataSource     = file3BLO.SelectFile3OfCandidate(candidateId);
            gvEmployers.DataBind();
            gvOtherQualifications.DataSource = qualificationBLO.SelectQualificationOfAFE(afeId);
            gvOtherQualifications.DataBind();
            if (qualificationBLO.QualificationOfAFEHasOthers(afeId) == false)
            {
                gvOtherQualifications.Columns[2].Visible = false;
            }
            List <Label> answers = new List <Label>();

            answers.Add(lblAnswer1);
            answers.Add(lblAnswer2);
            answers.Add(lblAnswer3);
            answers.Add(lblAnswer4);
            answers.Add(lblAnswer5);
            answers.Add(lblAnswer6);
            answers.Add(lblAnswer7);
            List <Label> questions = new List <Label>();

            questions.Add(lblQuestion1);
            questions.Add(lblQuestion2);
            questions.Add(lblQuestion3);
            questions.Add(lblQuestion4);
            questions.Add(lblQuestion5);
            questions.Add(lblQuestion6);
            questions.Add(lblQuestion7);
            DataTable dt = new DataTable();

            dt = answerBLO.SelectAnswerWithQuestionOfAFE(afeId);
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                questions[i].Text = dt.Rows[i]["question"].ToString();
                if (dt.Rows[i]["answer"].ToString() == "False")
                {
                    answers[i].Text = "No";
                }
                else if (dt.Rows[i]["answer"].ToString() == "True")
                {
                    if (dt.Rows[i]["value"].ToString() != "")
                    {
                        answers[i].Text = "Yes: " + dt.Rows[i]["value"].ToString();
                    }
                    else if (dt.Rows[i]["relative_name"].ToString() != "" &&
                             dt.Rows[i]["company_name"].ToString() != "")
                    {
                        answers[i].Text = "Yes: " + dt.Rows[i]["relative_name"].ToString() +
                                          " at " + dt.Rows[i]["company_name"].ToString();
                    }
                }
            }
            gvDependents.DataSource = file5BLO.SelectFile5OfCandidate(candidateId);
            gvDependents.DataBind();
            gvProfessionalReferences.DataSource =
                professionalReferenceBLO.SelectProfessionalReferenceOfAFE(afeId);
            gvProfessionalReferences.DataBind();
            gvPersonalReferences.DataSource =
                personalReferenceBLO.SelectPersonalReferenceOfAFE(afeId);
            gvPersonalReferences.DataBind();
        }