Example #1
0
 protected void OnBtnAddPhoneClicked(object sender, EventArgs e)
 {
     TDIMain.MainNotebook.OpenTab(
         DialogHelper.GenerateDialogHashName <Counterparty>(Counterparty.Id),
         () => {
         var dlg = new CounterpartyDlg(EntityUoWBuilder.ForOpenInChildUoW(Counterparty.Id, InfoProvider.UoW), UnitOfWorkFactory.GetDefaultFactory);
         dlg.ActivateContactsTab();
         dlg.TabClosed += (senderObject, eventArgs) => { this.Refresh(); };
         return(dlg);
     }
         );
 }
 protected void OnBtnAddPhoneClicked(object sender, EventArgs e)
 {
     TDIMain.MainNotebook.OpenTab(
         DialogHelper.GenerateDialogHashName <Counterparty>(_counterparty.Id),
         () =>
     {
         var dlg = new CounterpartyDlg(EntityUoWBuilder.ForOpen(_counterparty.Id), UnitOfWorkFactory.GetDefaultFactory);
         dlg.ActivateContactsTab();
         dlg.EntitySaved += (o, args) => Refresh(args.Entity);
         return(dlg);
     }
         );
 }