Пример #1
0
        private void btnretemp_Click(object sender, EventArgs e)
        {
            employee retr = new employee();

            try
            {
                // retr.candidateid
                int eidd = Convert.ToInt32(emprettxtid.Text);

                retr.Retrieve2(eidd);

                txtrettitle.Text         = retr.EmpTitle;
                txtretsupername.Text     = retr.EmpSupervisor;
                txtretworklocation.Text  = retr.EmpWorklocation;
                txtretempgivenemail.Text = retr.EmpJobEmail;
                comboretsalary.Text      = retr.EmpSalary.ToString();


                txtretemername.Text     = retr.EmergencyContact_Name;
                txtretemercity.Text     = retr.EmergencyContact_City;
                txtretphone.Text        = retr.EmergencyContact_Phone;
                txtretemerrelation.Text = retr.EmergencyContact_Relation;
                txtretemeraddress.Text  = retr.EmergencyContact_Address;


                #region
                txtrettitle.Enabled         = false;
                txtretsupername.Enabled     = false;
                txtretworklocation.Enabled  = false;
                txtretempgivenemail.Enabled = false;
                comboretsalary.Enabled      = false;
                txtretemername.Enabled      = false;
                txtretemeraddress.Enabled   = false;
                txtretemercity.Enabled      = false;
                txtretphone.Enabled         = false;
                txtretemerrelation.Enabled  = false;
                #endregion
            }
            catch (Exception Ex)
            {
                MessageBox.Show(Ex.Message);
                return;
            }
        }
Пример #2
0
        private void btnretfulldata_Click(object sender, EventArgs e)
        {
            employee reet = new employee();

            try
            {
                int eid = Convert.ToInt32(txtretfulldata.Text);
                // reet.Retrieve();
                reet.Retrieve2(eid);

                txtempname.Text    = reet.EmpFirstName;
                txtempfulname.Text = reet.EmpLastName;
                txtempage.Text     = reet.EmpAge.ToString();

                txtempcity.Text        = reet.EmpCity;
                txtempaddress.Text     = reet.EmpAddress;
                masktxtempphone.Text   = reet.EmpPhone;
                txtempemail.Text       = reet.EmpEmail;
                txtempquali.Text       = reet.EmpQulification;
                txtempgender.Text      = reet.EmpGender;
                txtempapply.Text       = reet.EmpAppllyfor;
                txtempexp.Text         = reet.EmpJobexper.ToString();
                txtemplastcompany.Text = reet.EmpLastcomppany;
                txtempmartial.Text     = reet.EmpMartialstatus;
                txtempextraskill.Text  = reet.EmpOtherskills;

                txttitle.Text         = reet.EmpTitle;
                txtsupername.Text     = reet.EmpSupervisor;
                txtworklocation.Text  = reet.EmpWorklocation;
                txtempgivenemail.Text = reet.EmpJobEmail;
                combosalary.Text      = reet.EmpSalary.ToString();

                txtemername.Text      = reet.EmergencyContact_Name;
                txtemercity.Text      = reet.EmergencyContact_City;
                masktxtemerphone.Text = reet.EmergencyContact_Phone;
                txtemerrelation.Text  = reet.EmergencyContact_Relation;
                txtemeraddress.Text   = reet.EmergencyContact_Address;

                #region
                txtempname.Enabled        = false;
                txtempfulname.Enabled     = false;
                txtempage.Enabled         = false;
                txtempaddress.Enabled     = false;
                txtempcity.Enabled        = false;
                masktxtempphone.Enabled   = false;
                txtempemail.Enabled       = false;
                txtempquali.Enabled       = false;
                txtempgender.Enabled      = false;
                txtempapply.Enabled       = false;
                txtempexp.Enabled         = false;
                txtemplastcompany.Enabled = false;
                txtempmartial.Enabled     = false;
                txtempextraskill.Enabled  = false;

                txttitle.Enabled         = false;
                txtsupername.Enabled     = false;
                txtworklocation.Enabled  = false;
                txtempgivenemail.Enabled = false;
                combosalary.Enabled      = false;
                txtemername.Enabled      = false;
                txtemeraddress.Enabled   = false;
                txtemercity.Enabled      = false;
                masktxtemerphone.Enabled = false;
                txtemerrelation.Enabled  = false;
                #endregion
            }
            catch (Exception Ex)
            {
                MessageBox.Show(Ex.Message);
                return;
            }
        }