コード例 #1
0
 private void tsbEdit_Click(object sender, System.EventArgs e)
 {
     ServiceSplitPercent currentSchemeSplittingCalcOrganization = this.GetCurrentSchemeSplittingCalcOrganization();
     if ((currentSchemeSplittingCalcOrganization != null) && (currentSchemeSplittingCalcOrganization != ServiceSplitPercent.Null))
     {
         ServiceSplitPercentAddChangeForm form = new ServiceSplitPercentAddChangeForm(currentSchemeSplittingCalcOrganization);
         form.set_Text("Изменение записи");
         if (form.ShowDialog(this) == System.Windows.Forms.DialogResult.Yes)
         {
             this.UpdateBindingSchemeSplittingCalcOrganization();
             this.bsServiceSplitPercents.set_Position(this.bsServiceSplitPercents.IndexOf(currentSchemeSplittingCalcOrganization));
         }
     }
 }
コード例 #2
0
 private void tbsAdd_Click(object sender, System.EventArgs e)
 {
     ServiceSplitPercent splittingCalcOrganization = new ServiceSplitPercent {
         ServiceSplitDocumentId = this._mServiceSplitDocument.Id
     };
     ServiceSplitPercentAddChangeForm form = new ServiceSplitPercentAddChangeForm(splittingCalcOrganization);
     form.set_Text("Добавление записи");
     if (form.ShowDialog(this) == System.Windows.Forms.DialogResult.Yes)
     {
         this.bsServiceSplitPercents.Add(splittingCalcOrganization);
         this.bsServiceSplitPercents.set_Position(this.bsServiceSplitPercents.IndexOf(splittingCalcOrganization));
     }
 }