private void btnCreateStockItem_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { Inventory.InventoryForm childForm = new Inventory.InventoryForm(); ShowForm(childForm); childForm.CreateBuyoutItem(sysEntity); Close(); }
protected override void OnNewRecord() { try { if (BL.ApplicationDataContext.Instance.Modules.Any(n => n.Id == (byte)BL.SYS.SYS_Modules.GLX && n.Code == "YES")) { if (!DataContext.ReadonlyContext.VW_Company.Where(n => n.TypeId == (byte)BL.ORG.ORG_Type.Supplier && n.Archived == false).Any()) { Essential.BaseAlert.ShowAlert("No Suppliers Available", "Please create suppliers before creating stock items.", Essential.BaseAlert.Buttons.Ok, Essential.BaseAlert.Icons.Warning); return; } } base.OnNewRecord(); Inventory.InventoryForm childForm = new Inventory.InventoryForm(); ShowForm(childForm); } catch (Exception ex) { if (CDS.Shared.Exception.UserInterfaceExceptionHandler.HandleException(ref ex)) { throw ex; } } }