private void tsbEdit_Click(object sender, System.EventArgs e)
 {
     ServiceTypeSubQualityPercent currentServiceTypeSuspensionTypePercent = this.GetCurrentServiceTypeSuspensionTypePercent();
     if ((currentServiceTypeSuspensionTypePercent != null) && (currentServiceTypeSuspensionTypePercent != ServiceTypeSubQualityPercent.Null))
     {
         ServiceTypeSubQualityPercentsAddChangeForm form = new ServiceTypeSubQualityPercentsAddChangeForm(currentServiceTypeSuspensionTypePercent);
         form.set_Text("Изменение записи");
         if (form.ShowDialog(this) == System.Windows.Forms.DialogResult.Yes)
         {
             this.UpdateBindingServiceTypeSuspensionTypes();
             this.bsServiceTypeSuspensionPercent.set_Position(this.bsServiceTypeSuspensionPercent.IndexOf(currentServiceTypeSuspensionTypePercent));
         }
     }
 }
 private void tbsAdd_Click(object sender, System.EventArgs e)
 {
     ServiceTypeSubQualityPercent subQualityPercent = new ServiceTypeSubQualityPercent {
         ServiceTypeSubQualityId = this.mServiceTypeSubQuality.Id
     };
     ServiceTypeSubQualityPercentsAddChangeForm form = new ServiceTypeSubQualityPercentsAddChangeForm(subQualityPercent);
     form.set_Text("Добавление записи");
     if (form.ShowDialog(this) == System.Windows.Forms.DialogResult.Yes)
     {
         this.bsServiceTypeSuspensionPercent.Add(subQualityPercent);
         this.bsServiceTypeSuspensionPercent.set_Position(this.bsServiceTypeSuspensionPercent.IndexOf(subQualityPercent));
     }
 }