void InitPage(CrudAPI crudapi) { crudAPI = crudapi; var Comp = crudAPI.CompanyEntity; InitializeComponent(); StartLoadCache(); layoutControl = layoutItems; deCreated.IsReadOnly = true; deCreated.AllowDefaultButton = false; if (campaignClient != null) { RibbonBase rb = (RibbonBase)frmRibbon.DataContext; UtilDisplay.RemoveMenuCommand(rb, new string[] { "Delete", "Layout", "Templates" }); if (!isCopiedRow) { NewRow = CreateNew() as CrmFollowUpClient; NewRow.SetMaster(master ?? crudapi.CompanyEntity); } } if (editrow == null && LoadedRow == null && campaignClient == null) { frmRibbon.DisableButtons("Delete"); if (!isCopiedRow) { editrow = CreateNew() as CrmFollowUpClient; editrow.SetMaster(master ?? crudapi.CompanyEntity); } deCreated.IsReadOnly = false; deCreated.AllowDefaultButton = true; liUpdatedAt.Visibility = Visibility.Collapsed; } if (isCopiedRow) { frmRibbon.DisableButtons("Delete"); } lookupDCAccount.api = leGroup.api = leEmployee.api = leOfferNumber.api = crudAPI; if (campaignClient == null) { layoutItems.DataContext = editrow; } else if (campaignClient != null) { layoutItems.DataContext = NewRow; } frmRibbon.OnItemClicked += frmRibbon_OnItemClicked; liOfferNumber.ButtonClicked += liOfferNumber_ButtonClicked; BindContact(); }
public GLDailyJournalLinePage2(SynchronizeEntity syncEntity) : base(true, syncEntity) { InitializeComponent(); ModifiedRow = this.syncEntity.Row; InitPage(api); SetHeader(); RibbonBase rb = (RibbonBase)frmRibbon.DataContext; if (rb != null) { UtilDisplay.RemoveMenuCommand(rb, "Save"); } }
void RemoveMenuItem() { RibbonBase rb = (RibbonBase)localMenu.DataContext; var Comp = api.CompanyEntity; #if !SILVERLIGHT if (Comp._CountryId != CountryCode.Denmark) { UtilDisplay.RemoveMenuCommand(rb, "ReadOIOUBL"); } #else UtilDisplay.RemoveMenuCommand(rb, "ReadOIOUBL"); #endif }
void RemoveMenuItem() { RibbonBase rb = (RibbonBase)localMenu.DataContext; var Comp = api.CompanyEntity; #if !SILVERLIGHT if (Comp._CountryId != CountryCode.Denmark && Comp._CountryId != CountryCode.Greenland && Comp._CountryId != CountryCode.FaroeIslands) { UtilDisplay.RemoveMenuCommand(rb, "ConnectToBank"); } #else UtilDisplay.RemoveMenuCommand(rb, "ConnectToBank"); #endif }
void InitializePage(UnicontaBaseEntity _master) { this.DataContext = this; InitializeComponent(); master = _master; SetRibbonControl(localMenu, dgProjectTransaction); RibbonBase rb = (RibbonBase)localMenu.DataContext; if (master != null) { dgProjectTransaction.UpdateMaster(master); ribbonControl.DisableButtons("Save"); } else { UtilDisplay.RemoveMenuCommand(rb, new string[] { "EditAll", "Save" }); } if (master is Uniconta.DataModel.Project) { iIncludeSubProBase = UtilDisplay.GetMenuCommandByName(rb, "InclSubProjects"); iIncludeSubProBase.IsChecked = includeSubProject; } else { UtilDisplay.RemoveMenuCommand(rb, "InclSubProjects"); } if (api.CompanyEntity.TimeManagement) { iIncludeTimeJournalBase = UtilDisplay.GetMenuCommandByName(rb, "InclTimeJournals"); iIncludeTimeJournalBase.IsChecked = InclTimeJournals; } else { InclTimeJournals = false; UtilDisplay.RemoveMenuCommand(rb, "InclTimeJournals"); } dgProjectTransaction.api = api; dgProjectTransaction.BusyIndicator = busyIndicator; dgProjectTransaction.ShowTotalSummary(); localMenu.OnItemClicked += LocalMenu_OnItemClicked; localMenu.OnChecked += LocalMenu_OnChecked; Employees = api.GetCache <Uniconta.DataModel.Employee>(); Projects = api.GetCache <Uniconta.DataModel.Project>(); Payrolls = api.GetCache(typeof(Uniconta.DataModel.EmpPayrollCategory)); }
public OIORASPTrackPage(ImportLogOIORASP _log) { InitializeComponent(); this.DataContext = this; localMenu.OnItemClicked += localMenu_OnItemClicked; RibbonBase rb = (RibbonBase)localMenu.DataContext; UtilDisplay.RemoveMenuCommand(rb, "ImportData"); UtilDisplay.RemoveMenuCommand(rb, "Terminate"); this._logs = _log; this.DataContext = _logs; leLog.Visibility = Visibility.Visible; }
void InitPage(UnicontaBaseEntity master) { InitializeComponent(); SetRibbonControl(localMenu, dgInvStorageProfileGrid); gridControl.api = api; gridControl.BusyIndicator = busyIndicator; BalanceDate.DateTime = balDate; if (interval > 0) { intervalEdit.EditValue = interval; } if (count > 0) { countEdit.EditValue = count; } dgInvStorageProfileGrid.ShowTotalSummary(); if (api.GetCache(typeof(Uniconta.DataModel.InvItem)) == null) { api.LoadCache(typeof(Uniconta.DataModel.InvItem)); } localMenu.OnItemClicked += localMenu_OnItemClicked; rdbMovement.IsChecked = isMovement; rdbInhand.IsChecked = !isMovement; if (master != null) { dgInvStorageProfileGrid.UpdateMaster(master); LoadData(); } localMenu.OnChecked += LocalMenu_OnChecked; RibbonBase rb = (RibbonBase)localMenu.DataContext; if (!api.CompanyEntity.Warehouse) { Warehouse.Visible = Warehouse.ShowInColumnChooser = false; WarehouseName.Visible = WarehouseName.ShowInColumnChooser = false; ReorderPrWarehouse = false; if (rb != null) { UtilDisplay.RemoveMenuCommand(rb, "PerWarehouse"); } } else { var rbMenuWarehouse = UtilDisplay.GetMenuCommandByName(rb, "PerWarehouse"); rbMenuWarehouse.IsChecked = ReorderPrWarehouse; } }
void RemoveMenuItem(UnicontaBaseEntity master) { RibbonBase rb = (RibbonBase)localMenu.DataContext; if (master != null) { UtilDisplay.RemoveMenuCommand(rb, new string[] { "Filter", "ClearFilter" }); var invItem = master as InvItemClient; if (invItem != null && invItem._ItemType >= (byte)Uniconta.DataModel.ItemType.BOM) { return; } } UtilDisplay.RemoveMenuCommand(rb, new string[] { "PartInvItems" }); }
public ExchangeRate(BaseAPI API) : base(API, string.Empty) { InitializeComponent(); localMenu.dataGrid = dgExchangeRate; SetRibbonControl(localMenu, dgExchangeRate); dgExchangeRate.api = api; dgExchangeRate.BusyIndicator = busyIndicator; localMenu.OnItemClicked += localMenu_OnItemClicked; var role = BasePage.session.User._Role; if (role < (byte)UserRoles.Distributor) { RibbonBase rb = (RibbonBase)localMenu.DataContext; UtilDisplay.RemoveMenuCommand(rb, new string[] { "AddRow", "CopyRow", "DeleteRow", "SaveGrid" }); } }
private void InitPage(UnicontaBaseEntity master) { InitializeComponent(); localMenu.dataGrid = dgItemStockStatusGrid; SetRibbonControl(localMenu, dgItemStockStatusGrid); gridControl.api = api; gridControl.BusyIndicator = busyIndicator; if (balDate == DateTime.MinValue) { balDate = BasePage.GetSystemDefaultDate(); } ToDate.DateTime = balDate; dgItemStockStatusGrid.ShowTotalSummary(); localMenu.OnItemClicked += localMenu_OnItemClicked; RibbonBase rb = (RibbonBase)localMenu.DataContext; UtilDisplay.RemoveMenuCommand(rb, "Aggregate"); }
void InitPage(UnicontaBaseEntity baseEntity) { this.DataContext = this; InitializeComponent(); queryLocal = true; selectedCompany = baseEntity; dgUserCompaniesGridClient.api = api; dgUserCompaniesGridClient.BusyIndicator = busyIndicator; SetRibbonControl(localMenu, dgUserCompaniesGridClient); localMenu.OnItemClicked += LocalMenu_OnItemClicked; dgUserCompaniesGridClient.RowDoubleClick += DgUserCompaniesGridClient_RowDoubleClick; dgUserCompaniesGridClient.Loaded += DgUserCompaniesGridClient_Loaded; #if SILVERLIGHT RibbonBase rb = (RibbonBase)localMenu.DataContext; var Comp = api.CompanyEntity; UtilDisplay.RemoveMenuCommand(rb, "OpenNewWindow"); #endif }
private void InitPage(UnicontaBaseEntity master) { InitializeComponent(); localMenu.dataGrid = dgDebtorOrderProjectLineGrid; SetRibbonControl(localMenu, dgDebtorOrderProjectLineGrid); dgDebtorOrderProjectLineGrid.api = api; dgDebtorOrderProjectLineGrid.UpdateMaster(master); dgDebtorOrderProjectLineGrid.BusyIndicator = busyIndicator; localMenu.OnItemClicked += localMenu_OnItemClicked; dgDebtorOrderProjectLineGrid.View.DataControl.CurrentItemChanged += DataControl_CurrentItemChanged; dictPriceLookup = new Dictionary <string, Uniconta.API.DebtorCreditor.FindPrices>(); debtorOrder = master as DCOrder; RibbonBase rb = (RibbonBase)localMenu.DataContext; if (rb != null) { UtilDisplay.RemoveMenuCommand(rb, "Adjustment"); } }
private void InitPage(UnicontaBaseEntity master = null) { InitializeComponent(); dgPackNotesGrid.UpdateMaster(master); SetRibbonControl(localMenu, dgPackNotesGrid); dgPackNotesGrid.api = api; dgPackNotesGrid.BusyIndicator = busyIndicator; localMenu.OnItemClicked += localMenu_OnItemClicked; #if SILVERLIGHT RibbonBase rb = (RibbonBase)localMenu.DataContext; UtilDisplay.RemoveMenuCommand(rb, "GenerateOioXml"); #endif dgPackNotesGrid.ShowTotalSummary(); var Comp = api.CompanyEntity; if (Comp.RoundTo100) { CostValue.HasDecimals = NetAmount.HasDecimals = TotalAmount.HasDecimals = Margin.HasDecimals = SalesValue.HasDecimals = false; } }
void Init() { var t = api.Query <Balance>(); StartLoadCache(t); this.DataContext = this; InitializeComponent(); #if !SILVERLIGHT FocusManager.SetFocusedElement(txtbalanceName, txtbalanceName); #endif cbFromAccount.api = cbToAccount.api = cbTemplate.api = api; ribbonControl = frmRibbon; setDim(); frmRibbon.OnItemClicked += frmRibbon_OnItemClicked; objCriteria = new Criteria(); objCriteria.selectedCriteria = new List <SelectedCriteria>(); GetCompanyList(); defaultCriteria.companyList = companyList; defaultCriteria.API = api; var itemdataContext = defaultCriteria.DataContext as SelectedCriteria; SetDefaultDate(itemdataContext); objCriteria.selectedCriteria.Add(itemdataContext); setColNameAndNumber(itemdataContext, 1); string[] strPrintOrientation = new string[] { Uniconta.ClientTools.Localization.lookup("Landscape"), Uniconta.ClientTools.Localization.lookup("Portrait") }; cbPrintOrientation.ItemsSource = strPrintOrientation; txtColWidth.Text = string.Format("{0} ({1})", Uniconta.ClientTools.Localization.lookup("ColumnWidth"), Uniconta.ClientTools.Localization.lookup("Printout")); #if SILVERLIGHT RibbonBase rb = (RibbonBase)frmRibbon.DataContext; if (rb != null) { UtilDisplay.RemoveMenuCommand(rb, "SetFrontPage"); } #endif var sumAccounts = new string[] { Uniconta.ClientTools.Localization.lookup("Show"), Uniconta.ClientTools.Localization.lookup("Hide"), Uniconta.ClientTools.Localization.lookup("OnlyShow") }; cmbSumAccount.ItemsSource = sumAccounts; cmbSumAccount.IsEditable = false; cmbAccountType.ItemsSource = new string[] { Uniconta.ClientTools.Localization.lookup("All"), Uniconta.ClientTools.Localization.lookup("AccountTypePL"), Uniconta.ClientTools.Localization.lookup("AccountTypeBalance") }; cmbAccountType.IsEditable = false; this.BeforeClose += ReportCriteria_BeforeClose; LoadBalance(t); }
void InitPage(CrudAPI crudapi, UnicontaBaseEntity master = null, bool isLastField = false) { if (!isLastField) { ribbonControl = frmRibbon; RibbonBase rb = (RibbonBase)frmRibbon.DataContext; UtilDisplay.RemoveMenuCommand(rb, new string[] { "Delete" }); } this.master = master; layoutControl = layoutItems; if (LoadedRow == null && master != null) { editrow = CreateNew() as TableFieldsClient; editrow._FieldType = Uniconta.DataModel.CustomTypeCode.String; editrow.SetMaster(master); } BindRefTable(editrow._FieldType); layoutItems.DataContext = editrow; frmRibbon.OnItemClicked += frmRibbon_OnItemClicked; }
public MultiInvoicePage(BaseAPI API) : base(API, string.Empty) { InitializeComponent(); localMenu.dataGrid = dgMultiInvGrid; SetRibbonControl(localMenu, dgMultiInvGrid); dgMultiInvGrid.api = api; dgMultiInvGrid.BusyIndicator = busyIndicator; localMenu.OnItemClicked += LocalMenu_OnItemClicked; dgMultiInvGrid.ShowTotalSummary(); //Same ribbon menu is used in Creditor MassUpdate page. Physical Voucher local menu is hided. RibbonBase rb = (RibbonBase)localMenu.DataContext; UtilDisplay.RemoveMenuCommand(rb, new string[] { "ViewVoucher", "RefVoucher", "ImportVoucher", "RemoveVoucher" }); var Comp = api.CompanyEntity; this.debtors = Comp.GetCache(typeof(Debtor)); this.items = Comp.GetCache(typeof(InvItem)); }
protected override void OnLayoutLoaded() { base.OnLayoutLoaded(); bool showFields = (dgDebtorTran.masterRecords == null); colAccount.Visible = showFields; colName.Visible = showFields; Open.Visible = !showFields; if (!api.CompanyEntity.Project) { Project.Visible = false; } Text.ReadOnly = Invoice.ReadOnly = PostType.ReadOnly = TransType.ReadOnly = showFields; if (showFields) { Open.Visible = false; RibbonBase rb = (RibbonBase)localMenu.DataContext; UtilDisplay.RemoveMenuCommand(rb, "SaveGrid"); } dgDebtorTran.Readonly = showFields; }
private void Init(UnicontaBaseEntity _master) { InitializeComponent(); master = _master; SetRibbonControl(localMenu, dgProjectTransCategorySum); dgProjectTransCategorySum.api = api; dgProjectTransCategorySum.UpdateMaster(master); dgProjectTransCategorySum.BusyIndicator = busyIndicator; dgProjectTransCategorySum.CustomSummary += dgProjectTransCategorySum_CustomSummary; dgProjectTransCategorySum.ShowTotalSummary(); localMenu.OnItemClicked += LocalMenu_OnItemClicked; localMenu.OnChecked += LocalMenu_OnChecked; GetMenuItem(); FromDate.DateTime = fromDate; ToDate.DateTime = toDate; RibbonBase rb = (RibbonBase)localMenu.DataContext; if (master == null) { UtilDisplay.RemoveMenuCommand(rb, "InclSubProjects"); } }
void Init(UnicontaBaseEntity _master) { InitializeComponent(); localMenu.dataGrid = dgCreditorOrderCostLine; dgCreditorOrderCostLine.api = api; dgCreditorOrderCostLine.UpdateMaster(_master); dgCreditorOrderCostLine.BusyIndicator = busyIndicator; SetRibbonControl(localMenu, dgCreditorOrderCostLine); localMenu.OnItemClicked += LocalMenu_OnItemClicked; dgCreditorOrderCostLine.View.DataControl.CurrentItemChanged += DataControl_CurrentItemChanged; master = _master; RibbonBase rb = (RibbonBase)localMenu.DataContext; if (master is CreditorOrder) { UtilDisplay.RemoveMenuCommand(rb, "PostCost"); } else { UtilDisplay.RemoveMenuCommand(rb, new string[] { "SaveGrid", "RefreshGrid", "SyncPage" }); } }
void SetMaster(UnicontaBaseEntity master, InvSerieBatchOpen openMaster) { List <UnicontaBaseEntity> masterList = null; pageMaster = master; RibbonBase rb = (RibbonBase)localMenu.DataContext; if (pageMaster != null || openMaster != null) { masterList = new List <UnicontaBaseEntity>(); if (pageMaster != null) { if (pageMaster is InvTrans) { dgInvSeriesBatchGrid.Readonly = true; UtilDisplay.RemoveMenuCommand(rb, new string[] { "AddRow", "CopyRow", "DeleteRow", "SaveGrid", "Transactions" }); } else { UtilDisplay.RemoveMenuCommand(rb, "RemoveFromTransaction"); } masterList.Add(pageMaster); Item.Visible = false; ItemName.Visible = false; } if (openMaster != null) { masterList.Add(openMaster); } dgInvSeriesBatchGrid.masterRecords = masterList; } else { UtilDisplay.RemoveMenuCommand(rb, "RemoveFromTransaction"); dgInvSeriesBatchGrid.masterRecords = null; } }
public void Init(UnicontaBaseEntity master) { InitializeComponent(); company = api.CompanyEntity; ((TableView)dgProjInvProposedLineGrid.View).RowStyle = Application.Current.Resources["StyleRow"] as Style; localMenu.dataGrid = dgProjInvProposedLineGrid; SetRibbonControl(localMenu, dgProjInvProposedLineGrid); dgProjInvProposedLineGrid.api = api; SetupMaster(master); dgProjInvProposedLineGrid.BusyIndicator = busyIndicator; localMenu.OnItemClicked += localMenu_OnItemClicked; dgProjInvProposedLineGrid.SelectedItemChanged += DgProjInvProposedLineGrid_SelectedItemChanged; OnHandScreenInOrder = api.CompanyEntity._OnHandScreenInOrder; RibbonBase rb = (RibbonBase)localMenu.DataContext; if (!company.Production) { UtilDisplay.RemoveMenuCommand(rb, "CreateProduction"); } InitialLoad(); dgProjInvProposedLineGrid.ShowTotalSummary(); dgProjInvProposedLineGrid.CustomSummary += dgProjInvProposedLineGrid_CustomSummary; this.KeyDown += Page_KeyDown; }
protected override void OnLayoutLoaded() { base.OnLayoutLoaded(); UnicontaClient.Utilities.Utility.SetDimensionsGrid(api, cldim1, cldim2, cldim3, cldim4, cldim5); var Comp = api.CompanyEntity; if (!Comp.CRM) { CrmGroup.Visible = false; Interests.Visible = false; Products.Visible = false; } if (!Comp.DeliveryAddress) { DeliveryName.Visible = false; DeliveryAddress1.Visible = false; DeliveryAddress2.Visible = false; DeliveryAddress3.Visible = false; DeliveryZipCode.Visible = false; DeliveryCity.Visible = false; DeliveryCountry.Visible = false; } if (!Comp._DirectDebit) { PaymentFormat.Visible = false; } dgDebtorAccountGrid.Readonly = true; var rb = (RibbonBase)localMenu.DataContext; if (rb != null && BasePage.session.User._Role == (byte)UserRoles.Standard) { UtilDisplay.RemoveMenuCommand(rb, "AccountantClientInfo"); } }
void RemoveMenuItem() { RibbonBase rb = (RibbonBase)localMenu.DataContext; if (!this.thMaster._Attachment) { UtilDisplay.RemoveMenuCommand(rb, new string[] { "AddDoc", "AddNote" }); } if (dgTabledataGrid.IsEditable) { UtilDisplay.RemoveMenuCommand(rb, new string[] { "AddItem", "EditItem" }); } else { UtilDisplay.RemoveMenuCommand(rb, new string[] { "AddRow", "CopyRow", "DeleteRow", "SaveGrid", "UndoDelete" }); } if (this.thMaster._ReadOnly) { UtilDisplay.RemoveMenuCommand(rb, new string[] { "AddRow", "CopyRow", "DeleteRow", "SaveGrid", "UndoDelete", "AddItem", "EditItem" }); } dtlTables = Utilities.Utility.GetDefaultCompany().UserTables.Where(x => x._MasterTable == thMaster._Name).ToList(); if (dtlTables.Count > 0) { var childList = new List <TreeRibbon>(); var childRibbon = new TreeRibbon(); string nodeText = string.Empty; string tblName = string.Empty; if (dtlTables.Count > 1) { nodeText = Uniconta.ClientTools.Localization.lookup("UserTableData"); } else { var tbl = dtlTables[0]; tblName = tbl._Name; nodeText = tbl._Prompt != null?UserFieldControl.LocalizePrompt(tbl._Prompt) : tbl._Name; } childRibbon.Name = nodeText; childRibbon.ActionName = dtlTables.Count > 1 ? "" : string.Concat("UserTableData;", tblName); childRibbon.Child = childList; childRibbon.Glyph = "UserFieldData_32x32.png"; childRibbon.LargeGlyph = "UserFieldData_32x32.png"; var userRbnList = new List <TreeRibbon>(); userRbnList.Add(childRibbon); var treeRibbon = new TreeRibbon(); treeRibbon.Child = userRbnList; rb.rbnlist.Add(treeRibbon); if (dtlTables.Count > 1) { foreach (var ur in dtlTables) { var ribbonNode = new TreeRibbon(); ribbonNode.Name = !string.IsNullOrEmpty(ur._Prompt) ? UserFieldControl.LocalizePrompt(ur._Prompt) : ur._Name; ribbonNode.ActionName = string.Concat("UserTableData;", ur._Name); ribbonNode.LargeGlyph = "CopyUserTable_16x16.png"; ribbonNode.Glyph = "CopyUserTable_16x16.png"; ribbonNode.Child = new List <TreeRibbon>(); childList.Add(ribbonNode); } } rb.RefreshMenuItem(userRbnList); } }
void RemoveMenuItem() { RibbonBase rb = (RibbonBase)frmRibbon.DataContext; UtilDisplay.RemoveMenuCommand(rb, "PhysicalVou"); }
void RemoveMenuItem() { RibbonBase rb = (RibbonBase)ribbonControl.DataContext; UtilDisplay.RemoveMenuCommand(rb, new string[] { "AddRow", "CopyRow", "DeleteRow" }); }
void RemoveMenuItemDelete() { RibbonBase rb = (RibbonBase)localMenu.DataContext; UtilDisplay.RemoveMenuCommand(rb, "Delete"); }
void RemoveDeleteVoucher() { RibbonBase rb = (RibbonBase)localMenu.DataContext; UtilDisplay.RemoveMenuCommand(rb, "DeleteVoucher"); }
void RemoveChangeQuantity() { RibbonBase rb = (RibbonBase)localMenu.DataContext; UtilDisplay.RemoveMenuCommand(rb, "ChangeQuantity"); }
private void RemoveMenu() { RibbonBase rb = (RibbonBase)frmRibbon.DataContext; UtilDisplay.RemoveMenuCommand(rb, "LatestXap"); }
void RemoveMenuItem() { RibbonBase rb = (RibbonBase)localMenu.DataContext; UtilDisplay.RemoveMenuCommand(rb, new string[] { "AddEditNote", "EditTransaction" /*,"RefVoucher", "ImportVoucher", "RemoveVoucher", "PhyslVoucher" */ }); }