protected override void OnOpenRecord(long Id) { try { base.OnOpenRecord(Id); if (Id != -1) { Essential.BaseForm childform = null; switch (Type) { case BL.ORG.ORG_Type.Customer: childform = new Customer.CustomerForm(Id); break; case BL.ORG.ORG_Type.Supplier: childform = new Supplier.SupplierForm(Id); break; } ShowForm(childform); } } catch (Exception ex) { if (CDS.Shared.Exception.UserInterfaceExceptionHandler.HandleException(ref ex)) { throw ex; } } }
protected override void OnNewRecord() { base.OnNewRecord(); DevExpress.XtraEditors.XtraForm childform = null; switch (Type) { case BL.ORG.ORG_Type.Customer: childform = new Customer.CustomerForm(); ShowForm(childform); break; case BL.ORG.ORG_Type.Supplier: childform = new Supplier.SupplierForm(); ShowForm(childform); break; } }