Exemplo n.º 1
0
 private void cboEmployee_SelectedValueChanged(object sender, EventArgs e)
 {
     try
     {
         lblEmpCategoryInfo.Text = string.Empty;
         this.EmployeeID         = 0;
         if (cboEmployee.SelectedItem != null)
         {
             this.EmployeeID = ((SelectListItem)cboEmployee.SelectedItem).ID;
         }
         this.IsOnSiteEmployee = ServiceEmployee.IsOnSiteEmployee(this.EmployeeID);
         if (IsOnSiteEmployee == true)
         {
             lblEmpCategoryInfo.Text = "Onsite Employee";
             //cboProject.Enabled = true;
         }
         else
         {
             //cboProject.Enabled = false;
             lblEmpCategoryInfo.Text = "Office Employee";
         }
     }
     catch (Exception ex)
     {
         string errMessage = ex.Message;
         if (ex.InnerException != null)
         {
             errMessage += string.Format("\n{0}", ex.InnerException.Message);
         }
         MessageBox.Show(errMessage, "frmAddEditMannualAttendanceEntry::cboEmployee_SelectedValueChanged", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }