예제 #1
0
 public FiringRequest(int user_id, int workerRole)
 {
     InitializeComponent();
     this.FormBorderStyle = FormBorderStyle.FixedSingle;
     tbxFirstName.Enabled = false;
     tbxLastName.Enabled  = false;
     cmbEmployees.Enabled = false;
     cmbManagers.Enabled  = false;
     PopulateDepartments(Department.GetAllDepartments());
     PopulateManagers(Manager.GetAllManagers());
     PopulateEmployees(Employee.GetAllEmployees());
     this.loggedUserId   = user_id;
     this.workerRole     = workerRole;
     rtbReason.MaxLength = 400;
     if (workerRole == (int)ProfileRoles.ADMINISTRATOR)
     {
         btnSendFiringRequest.Visible = false;
         this.Text            = "Remove manager!";
         cmbEmployees.Visible = false;
     }
     else if (workerRole == (int)ProfileRoles.MANAGER)
     {
         btnRemoveManager.Visible = false;
         cmbManagers.Visible      = false;
     }
 }
예제 #2
0
 public PromotionRequest(int user_id)
 {
     InitializeComponent();
     this.loggedUserId    = user_id;
     this.FormBorderStyle = FormBorderStyle.FixedSingle;
     PopulateDepartments(Department.GetAllDepartments());
     PopulateEmployees(Employee.GetAllEmployees());
 }
예제 #3
0
 public ChangeSchedule(int id)
 {
     InitializeComponent();
     PopulateEmployees(Employee.GetAllEmployees());
     workingDays          = new List <int>();
     workingShifts        = new List <int>();
     this.FormBorderStyle = FormBorderStyle.FixedSingle;
     this.userId          = id;
     gbShifts.Enabled     = false;
     gbWorkDays.Enabled   = false;
 }
예제 #4
0
 public ChangeSchedule(int id)
 {
     InitializeComponent();
     PopulateEmployees(Employee.GetAllEmployees());
     workingDays              = new List <int>();
     workingShifts            = new List <int>();
     this.FormBorderStyle     = FormBorderStyle.FixedSingle;
     this.userId              = id;
     rtbMessage.MaxLength     = 500;
     gbMondayShift.Enabled    = false;
     gbFridayShift.Enabled    = false;
     gbTuesdayShift.Enabled   = false;
     gbWednesdayShift.Enabled = false;
     gbThursdayShift.Enabled  = false;
     gbSundayShift.Enabled    = false;
     gbSaturdayShift.Enabled  = false;
 }