void OnButtonAddClicked(object sender, EventArgs e) { if (MyOrmDialog.UoW.IsNew) { if (CommonDialogs.SaveBeforeCreateSlaveEntity(MyEntityDialog.EntityObject.GetType(), typeof(DeliveryPoint))) { if (!MyTdiDialog.Save()) { return; } } else { return; } } ITdiDialog dlg = new DeliveryPointDlg(DeliveryPointUoW.Root); MyTab.TabParent.AddSlaveTab(MyTab, dlg); treeDeliveryPoints.RepresentationModel.UpdateNodes(); }
protected void OnButtonEditClicked(object sender, EventArgs e) { ITdiDialog dlg = new DeliveryPointDlg((treeDeliveryPoints.GetSelectedObjects()[0] as ClientDeliveryPointVMNode).Id); MyTab.TabParent.AddSlaveTab(MyTab, dlg); }