Пример #1
0
        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();
        }
Пример #2
0
        protected void OnButtonEditClicked(object sender, EventArgs e)
        {
            ITdiDialog dlg = new DeliveryPointDlg((treeDeliveryPoints.GetSelectedObjects()[0] as ClientDeliveryPointVMNode).Id);

            MyTab.TabParent.AddSlaveTab(MyTab, dlg);
        }