예제 #1
0
 private void changeToolStripButton_Click(object sender, System.EventArgs e)
 {
     ServiceSeasonal currentServiceSeasonal = this.GetCurrentServiceSeasonal();
     if (currentServiceSeasonal != ServiceSeasonal.Null)
     {
         ServiceSeasonalAddChangeForm form = new ServiceSeasonalAddChangeForm(currentServiceSeasonal);
         if (form.ShowDialog() == System.Windows.Forms.DialogResult.Yes)
         {
             this.bsSeasonal.set_Sort(this.bsSeasonal.get_Sort());
             this.bsSeasonal.set_Position(this.bsSeasonal.IndexOf(currentServiceSeasonal));
             this.bsSeasonal.set_Sort(this.bsSeasonal.get_Sort());
             this.bsSeasonal.set_Position(this.bsSeasonal.IndexOf(currentServiceSeasonal));
         }
     }
 }
예제 #2
0
 private void addToolStripButton_Click(object sender, System.EventArgs e)
 {
     if (this._mServiceOld == ServiceOld.Null)
     {
         this.bsSeasonal.Clear();
     }
     else
     {
         ServiceSeasonal serviceSeasonal = new ServiceSeasonal {
             ServiceId = this._mServiceOld.Id
         };
         ServiceSeasonalAddChangeForm form = new ServiceSeasonalAddChangeForm(serviceSeasonal);
         if (form.ShowDialog() == System.Windows.Forms.DialogResult.Yes)
         {
             this.bsSeasonal.Add(serviceSeasonal);
             this.bsSeasonal.set_Sort(this.bsSeasonal.get_Sort());
             this.bsSeasonal.set_Position(this.bsSeasonal.IndexOf(serviceSeasonal));
         }
     }
 }