private void AddUpdateSupervisorDialog_Load(object sender, EventArgs e)
 {
     this.empSup = (Supervisor)this.Tag;
       this.idDisplay.Text = this.empSup.ID.ToString("d4");
       this.nameETextBox.Text = this.empSup.Name;
       this.hireDateETextBox.Text = this.empSup.HireDate.ToString("MM/dd/yyyy");
       this.salaryETextBox.Text = this.empSup.Salary.ToString("f2");
 }
Esempio n. 2
0
        // END Piece event
        // Supervisor Add Event
        private void supervisorToolStripMenuItem_Click(object sender, EventArgs e)
        {
            int listIndex = 0;
              Supervisor empSup;
              empSup = new Supervisor();
              AddUpdateSupervisorDialog addDialog = new AddUpdateSupervisorDialog();

              empSup.ID = empList.AssignID();
              addDialog.Text = "Add Supervisor Employee";
              addDialog.Tag = empSup;
              if (addDialog.ShowDialog(this) == DialogResult.OK)
              {
            listIndex = ~this.empList.BinarySearch(empSup, listOrder);
            this.empList.InsertAt(listIndex, empSup);
            this.RefreshClientAreaControls(listIndex);
              }
              addDialog.Dispose();
        }
Esempio n. 3
0
        public static new Supervisor Parse(string stringValue)
        {
            string[] words;
              Supervisor supervisor = new Supervisor();

              words = StringMethods.ParseCsvString(stringValue.Trim());
              supervisor.ID = Int32.Parse(words[1]);
              supervisor.Name = words[2];
              supervisor.HireDate = Date.Parse(words[3]);
              supervisor.Salary = Double.Parse(words[4]);
              return supervisor;
        }
Esempio n. 4
0
 public void Copy(Supervisor sourceSupervisor)
 {
     base.Copy(sourceSupervisor);
       this.salary = sourceSupervisor.salary;
 }
Esempio n. 5
0
 // Copy constructor
 public Supervisor(Supervisor sourceSupervisor)
     : base(sourceSupervisor)
 {
     this.salary = sourceSupervisor.salary;
 }