예제 #1
0
 public void FillForm(Int32 _EmployeeId)
 {
     try
     {
         EmployeeBAL   _objBAL   = new EmployeeBAL();
         EmployeeModel _objModel = _objBAL.SearchEmployee(_EmployeeId);
         tbxAL.Text                   = _objModel._AL.ToString();
         tbxCL.Text                   = _objModel._CL.ToString();
         tbxCNIC.Text                 = _objModel._CNIC;
         tbxEmployeeCode.Text         = _objModel._Code.ToString();
         tbxFatherName.Text           = _objModel._FatherName;
         tbxFirstName.Text            = _objModel._FirstName;
         tbxLastName.Text             = _objModel._LastName;
         tbxMobileNo.Text             = _objModel._MobileNo;
         tbxSalary.Text               = _objModel._Salary.ToString();
         tbxSL.Text                   = _objModel._SL.ToString();
         dtpDOB.Text                  = _objModel._DOB.ToString();
         dtpDOJ.Text                  = _objModel._DOJ.ToString();
         cmbDepartment.SelectedValue  = _objModel._DepartmentID;
         cmbDesignation.SelectedValue = _objModel._DesignationID;
         cmbShift.SelectedValue       = _objModel._ShiftID;
         cbxIsActive.Checked          = _objModel._IsActive;
         cbxMarried.Checked           = _objModel._IsMarried;
         richTextBox1.Text            = _objModel._Address;
         tbxResignDate.Text           = _objModel._ResignDate;
         pictureBox1.ImageLocation    = string.IsNullOrEmpty(_objModel._ImageUrl) ? "F:\\Final Year Project\\Final\\SmartManger(V.1)\\SmartManger(V.1)\\Resources\\User_Avatar-128.png" : _objModel._ImageUrl;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }