Exemple #1
0
        }  // end deactivateEmployee

        // Disables Client textboxes and highlights the Client groupbox
        public static void deactivateClient(frmEmpMan f)
        {
            f.lblControlClient.Enabled     = false;
            f.lblControlClientType.Enabled = false;
            f.txtControlClientType.Enabled = false;
            f.txtControlClientType.Clear();
        }  // end deactivateClient
Exemple #2
0
        } // end resetForm

        // Activates and deactivates necessary form buttons
        //    when in add mode
        public static void formAddMode(frmEmpMan f)
        {
            clear(f);
            f.btnFindDisplay.Enabled = false;
            f.btnDelete.Enabled      = false;
            f.btnEditUpdate.Enabled  = false;
        }  // end formAddMode
Exemple #3
0
        }  // end activateManager

        // Enables Worker textboxes and highlights the Worker groupbox
        public static void activateWorker(frmEmpMan f)
        {
            activateEmployee(f);  // Employee must be activated too
            f.lblControlWorker.Enabled          = true;
            f.lblControlWorkerHourlyPay.Enabled = true;
            f.txtControlWorkerHourlyPay.Enabled = true;
        }  // end activateWorker
Exemple #4
0
        }  // end activatePerson

        //  Enables Employee textboxes and highlights the Employee groupbox
        public static void activateEmployee(frmEmpMan f)
        {
            activatePerson(f);
            f.lblControlEmployee.Enabled         = true;
            f.lblControlEmployeeJobTitle.Enabled = true;
            f.txtControlEmployeeJobTitle.Enabled = true;
        }  // end ActivateEmployee
Exemple #5
0
        }  // end ActivateEmployee

        // Enables Employee textboxes and highlights the Client groupbox
        public static void activateClient(frmEmpMan f)
        {
            activatePerson(f);
            f.lblControlClient.Enabled     = true;
            f.lblControlClientType.Enabled = true;
            f.txtControlClientType.Enabled = true;
            f.txtControlClientType.Clear();
        }  // end activateClient
Exemple #6
0
        }  // end deactivatePerson

        // Disables Employee textboxes and highlights the Employee groupbox
        public static void deactivateEmployee(frmEmpMan f)
        {
            deactivateManager(f);   // Must deactivate Manager too
            deactivateWorker(f);    // Must deactivate Worker too
            f.lblControlEmployee.Enabled         = false;
            f.lblControlEmployeeJobTitle.Enabled = false;
            f.txtControlEmployeeJobTitle.Enabled = false;
            f.txtControlEmployeeJobTitle.Clear();
        }  // end deactivateEmployee
Exemple #7
0
        }  // end activateClient

        // Enables Manager textboxes and highlights the Manager groupbox
        public static void activateManager(frmEmpMan f)
        {
            activateEmployee(f);   // Employee must be activated too
            f.lblControlManager.Enabled       = true;
            f.lblControlManagerBonus.Enabled  = true;
            f.lblControlManagerSalary.Enabled = true;
            f.txtControlManagerSalary.Enabled = true;
            f.txtControlManagerBonus.Enabled  = true;
        }  // end activateManager
Exemple #8
0
        }  // end deactivateClient

        // Disables Manager textboxes and highlights the Manager groupbox
        public static void deactivateManager(frmEmpMan f)
        {
            f.lblControlManager.Enabled         = false;
            f.lblControlManagerBonus.Enabled    = false;
            f.lblControlManagerSalary.Enabled   = false;
            f.txtControlManagerSalary.Enabled   = false;
            f.txtControlManagerBonus.Enabled    = false;
            f.txtControlWorkerHourlyPay.Enabled = false;
        }  // end deactivateManager
Exemple #9
0
        }  // end deactivateAddButtons

        //  Enables Employee textboxes and highlights the Person groupbox
        public static void activatePerson(frmEmpMan f)
        {
            f.lblControlPerson.Enabled          = true;
            f.lblControlPersonID.Enabled        = true;
            f.lblControlPersonName.Enabled      = true;
            f.lblControlPersonBirthDate.Enabled = true;
            f.txtControlPersonID.Enabled        = true;
            f.txtControlPersonName.Enabled      = true;
            f.txtControlPersonBirthDate.Enabled = true;
        }  // end activatePerson
Exemple #10
0
        }  // end deativateWorker

        public static void enableDisplay(frmEmpMan f)
        {
            f.txtControlClientType.Enabled       = false;
            f.txtControlEmployeeJobTitle.Enabled = false;
            f.txtControlManagerBonus.Enabled     = false;
            f.txtControlManagerSalary.Enabled    = false;
            f.txtControlPersonBirthDate.Enabled  = false;
            f.txtControlPersonID.Enabled         = false;
            f.txtControlPersonName.Enabled       = false;
            f.txtControlWorkerHourlyPay.Enabled  = false;
        }
Exemple #11
0
        }  // end activateWorker

        // Disables Person textboxes and highlights the Person groupbox
        public static void deactivatePerson(frmEmpMan f)
        {
            deactivateEmployee(f);   // Must deactivate Employee too
            deactivateClient(f);     // Must deactivate Client too
            f.lblControlPerson.Enabled          = false;
            f.lblControlPersonID.Enabled        = false;
            f.lblControlPersonName.Enabled      = false;
            f.lblControlPersonBirthDate.Enabled = false;
            f.txtControlPersonID.Enabled        = false;
            f.txtControlPersonName.Enabled      = false;
            f.txtControlPersonBirthDate.Enabled = false;
            f.txtControlPersonID.Clear();
            f.txtControlPersonName.Clear();
            f.txtControlPersonBirthDate.Clear();
        }  // end deactivatePerson
Exemple #12
0
        // Resets form to initial state after form is loaded or
        //    an add Employee operation is performed
        public static void resetForm(frmEmpMan f)
        {
            //  Reset button components
            f.btnClearEntryForm.Enabled = true;
            f.btnDelete.Enabled         = false;
            f.btnEditUpdate.Enabled     = false;
            f.btnFindDisplay.Enabled    = false;
            f.btnCreateManager.Enabled  = true;
            f.btnCreateManager.Text     = "Create Manager";
            f.btnCreateWorker.Enabled   = true;
            f.btnCreateWorker.Text      = "Create Worker";
            f.btnCreateClient.Enabled   = true;
            f.btnCreateClient.Text      = "Create Client";


            // Reset group components
            f.grpControl.Enabled = false;
            f.grpCreate.Enabled  = false;
            f.grpOptions.Enabled = false;
        } // end resetForm
Exemple #13
0
        // Clear all textboxes on the form
        public static void clear(frmEmpMan f)
        {
            activateAddButtons(f);
            f.txtControlPersonName.Text       = "";
            f.txtControlPersonBirthDate.Text  = "";
            f.txtControlPersonID.Text         = "";
            f.txtControlClientType.Text       = "";
            f.txtControlEmployeeJobTitle.Text = "";
            f.txtControlManagerSalary.Text    = "";
            f.txtControlManagerBonus.Text     = "";
            f.txtControlWorkerHourlyPay.Text  = "";

            f.txtControlPersonName.Enabled       = true;
            f.txtControlPersonBirthDate.Enabled  = true;
            f.txtControlPersonID.Enabled         = true;
            f.txtControlClientType.Enabled       = true;
            f.txtControlEmployeeJobTitle.Enabled = true;
            f.txtControlManagerSalary.Enabled    = true;
            f.txtControlManagerBonus.Enabled     = true;
            f.txtControlWorkerHourlyPay.Enabled  = true;
            f.lblControlClient.Enabled           = true;
            f.lblControlClientType.Enabled       = true;
            f.lblControlEmployee.Enabled         = true;
            f.lblControlEmployeeJobTitle.Enabled = true;
            f.lblControlManager.Enabled          = true;
            f.lblControlManagerBonus.Enabled     = true;
            f.lblControlManagerSalary.Enabled    = true;
            f.lblControlPerson.Enabled           = true;
            f.lblControlPersonBirthDate.Enabled  = true;
            f.lblControlPersonID.Enabled         = true;
            f.lblControlPersonName.Enabled       = true;
            f.lblControlsDesc.Enabled            = true;
            f.lblControlWorker.Enabled           = true;
            f.lblControlWorkerHourlyPay.Enabled  = true;
            f.lblCreateDesc.Enabled = true;
            f.lblTitle.Enabled      = true;
        } // end Clear
Exemple #14
0
        }  // end deactivateManager

        // Disables Worker textboxes and highlights the Worker groupbox
        public static void deactivateWorker(frmEmpMan f)
        {
            f.lblControlWorker.Enabled          = false;
            f.lblControlWorkerHourlyPay.Enabled = false;
            f.txtControlWorkerHourlyPay.Enabled = false;
        }  // end deativateWorker
Exemple #15
0
        }  // end activateAddButtons

        // Enable/disable buttons when not in edit mode
        public static void deactivateAddButtons(frmEmpMan f)
        {
            f.btnCreateManager.Enabled = false;
            f.btnCreateWorker.Enabled  = false;
            f.btnCreateClient.Enabled  = false;
        }  // end deactivateAddButtons
Exemple #16
0
        }     // end Property

        // Save data from form to object
        public override void Save(frmEmpMan f)
        {
            base.Save(f);
            employeeHourlyPay = Convert.ToDecimal(f.txtControlWorkerHourlyPay.Text);
        }  // end Save
Exemple #17
0
 public FormControllerClass(frmEmpMan parentForm)
 {
     f = parentForm;
 }
        }     // end Property

        // Save data from form to object
        public override void Save(frmEmpMan f)
        {
            personName      = f.txtControlPersonName.Text;
            personBirthDate = DateTime.Parse(f.txtControlPersonBirthDate.Text);
            personID        = f.txtControlPersonID.Text;
        }  // end Save
        }  // end Save

        // Display data in object on form
        public override void Display(frmEmpMan f)
        {
            base.Display(f);
            f.txtControlClientType.Text = clientType;
        }  // end Display
Exemple #20
0
        }  // end Save

        // Display data in object on form
        public override void Display(frmEmpMan f)
        {
            base.Display(f);
            f.txtControlWorkerHourlyPay.Text = employeeHourlyPay.ToString();
        }  // end Display
        }     // end Property

        // Save data from form to object
        public override void Save(frmEmpMan f)
        {
            base.Save(f);
            clientType = f.txtControlClientType.Text;
        }  // end Save
Exemple #22
0
 }     // end Property
 // Save data from form to object
 public override void Save(frmEmpMan f)
 {
     base.Save(f);
     managerSalary = Convert.ToDecimal(f.txtControlManagerSalary.Text);
     managerBonus  = Convert.ToDecimal(f.txtControlManagerBonus.Text);
 }  // end Save
        }  // end Save

        // Display data in object on form
        public override void Display(frmEmpMan f)
        {
            f.txtControlEmployeeJobTitle.Text = EmployeeJobTitle;
        }  // end Display
        }  // end Save

        // Display data in object on form
        public virtual void Display(frmEmpMan f)
        {
            f.txtControlPersonName.Text      = personName;
            f.txtControlPersonBirthDate.Text = personBirthDate.ToShortDateString();
            f.txtControlPersonID.Text        = personID;
        }  // end Display
Exemple #25
0
        }  // end Save

        // Display data in object on form
        public override void Display(frmEmpMan f)
        {
            base.Display(f);
            f.txtControlManagerSalary.Text = managerSalary.ToString();
            f.txtControlManagerBonus.Text  = managerBonus.ToString();
        }  // end Display