public AccountServiceNormAddChangeForm(AccountServiceNorm accountServiceNorm)
     : this()
 {
     this.m_AccountServiceNorm = accountServiceNorm;
     if (this.m_AccountServiceNorm.IsNew)
     {
         this.set_Text("Добавление индивидуального норматива");
     }
     else
     {
         this.set_Text("Изменение индивидуального норматива");
     }
     if (this.m_AccountServiceNorm.DocId != OrgDocument.Null.Id)
     {
         this.selectOrgDocument.SelectedOrgDocument = this.m_AccountServiceNorm.GetDoc() ?? OrgDocument.Null;
     }
     this.bsAccountServiceNorms.set_DataSource(this.m_AccountServiceNorm);
     this.m_AccountServiceNorm.BeginEdit();
 }
 private void tsBtnAdd_Click(object sender, System.EventArgs e)
 {
     AccountServiceNorm accountServiceNorm = new AccountServiceNorm {
         AccountServiceId = this.m_AccountService.Id
     };
     AccountServiceNormAddChangeForm form = new AccountServiceNormAddChangeForm(accountServiceNorm);
     form.ShowDialog(this);
     if (form.DialogResult == System.Windows.Forms.DialogResult.Yes)
     {
         this.bsAccountServiceNorms.Add(accountServiceNorm);
         this.bsAccountServiceNorms.set_Position(this.bsAccountServiceNorms.IndexOf(accountServiceNorm));
     }
 }