示例#1
0
 private void AddUpdateHourlyDialog_Load(object sender, EventArgs e)
 {
     this.empHour = (Hourly)this.Tag;
       this.idDisplay.Text = this.empHour.ID.ToString("d4");
       this.nameETextBox.Text = this.empHour.Name;
       this.hireDateETextBox.Text = this.empHour.HireDate.ToString("MM/dd/yyyy");
       this.rateETextBox.Text = "0.00";
       this.hoursETextBox.Text = "0";
 }
示例#2
0
        //End Commission Add Event
        //Hourly Add Event
        private void hourlyToolStripMenuItem_Click(object sender, EventArgs e)
        {
            int listIndex = 0;
              Hourly empHour;
              empHour = new Hourly();
              AddUpdateHourlyDialog addDialog = new AddUpdateHourlyDialog();

              empHour.ID = empList.AssignID();
              addDialog.Text = "Add Hourly Employee";
              addDialog.Tag = empHour;
              if (addDialog.ShowDialog(this) == DialogResult.OK)
              {
            listIndex = ~this.empList.BinarySearch(empHour, listOrder);
            this.empList.InsertAt(listIndex, empHour);
            this.RefreshClientAreaControls(listIndex);
              }
              addDialog.Dispose();
        }
示例#3
0
 public static new Hourly Parse(string stringValue)
 {
     string[] words;
       Hourly hourly = new Hourly();
       words = StringMethods.ParseCsvString(stringValue.Trim());
       hourly.ID = Int32.Parse(words[1]);
       hourly.Name = words[2];
       hourly.HireDate = Date.Parse(words[3]);
       hourly.Rate = Double.Parse(words[4]);
       hourly.Hours = Double.Parse(words[5]);
       return hourly;
 }
示例#4
0
 //Copy method
 public void Copy(Hourly sourceHourly)
 {
     base.Copy(sourceHourly);
       this.rate = sourceHourly.rate;
       this.hours = sourceHourly.hours;
 }
示例#5
0
 //Copy
 public Hourly(Hourly sourceHourly)
     : base(sourceHourly)
 {
     this.Rate = sourceHourly.rate; this.Hours = sourceHourly.hours;
 }