Пример #1
0
 public void loadProfile()
 {
     try
     {
         txtFirstName.Text     = emp.getPersonalInformation().getFirstName();
         txtMiddleName.Text    = emp.getPersonalInformation().getMiddleName();
         txtLastName.Text      = emp.getPersonalInformation().getLastName();
         txtCNIC.Text          = emp.getPersonalInformation().getCNIC();
         txtQualification.Text = emp.getQualification();
         txtRank.Text          = emp.getRank();
         txtSalary.Text        = emp.getSalary().ToString();
         txtEmail.Text         = emp.getPersonalInformation().getEmail();
         txtDesignation.Text   = emp.getDesignation();
         txtPassword.Text      = emp.getPassword();
         if (emp.getPersonalInformation().getGender().Equals("male"))
         {
             rdoMale.Checked = true;
         }
         else
         {
             rdoFemale.Checked = true;
         }
         dateTimePickerDob.Text = emp.getPersonalInformation().getDateOfBirth().Date.ToString();
         dateTimePickerDoh.Text = emp.getDateOfHire().Date.ToString();
         txtCountry.Text        = emp.getAddress().getCountry();
         txtCity.Text           = emp.getAddress().getCity();
         txtProvince.Text       = emp.getAddress().getProvince();
         txtStreet.Text         = emp.getAddress().getStreet();
         txtHouseNo.Text        = emp.getAddress().getHouseNo();
         txtZipCode.Text        = emp.getAddress().getZipCode().ToString();
         Database db = new Database();
         txtID.Text = "" + emp.getEmp_id();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }