void GetExpandAndCollapseMenuItem() { RibbonBase rb = (RibbonBase)localMenu.DataContext; ibaseExpandGroups = UtilDisplay.GetMenuCommandByName(rb, "ExpandGroups"); ibaseCollapseGroups = UtilDisplay.GetMenuCommandByName(rb, "CollapseGroups"); }
void GetMenuItem() { RibbonBase rb = (RibbonBase)localMenu.DataContext; ibase = UtilDisplay.GetMenuCommandByName(rb, "ExpandAndCollapse"); ibaseCurrent = UtilDisplay.GetMenuCommandByName(rb, "ExpandCollapseCurrent"); }
private void Init(UnicontaBaseEntity master) { if (!(master is Uniconta.DataModel.Project)) { throw new Exception("This page support only 'Project' as master"); } this.master = master; InitializeComponent(); localMenu.dataGrid = dgProjectTransClientInvoiceGrid; SetRibbonControl(localMenu, dgProjectTransClientInvoiceGrid); dgProjectTransClientInvoiceGrid.api = api; dgProjectTransClientInvoiceGrid.UpdateMaster(master); dgProjectTransClientInvoiceGrid.BusyIndicator = busyIndicator; localMenu.OnItemClicked += localMenu_OnItemClicked; dgProjectTransClientInvoiceGrid.ShowTotalSummary(); localMenu.DisableButtons(new string[] { "Aggregate", "GenerateInvoice", "MarkAsInvoice" }); ((DevExpress.Xpf.Grid.TableView)dgProjectTransClientInvoiceGrid.View).RowStyle = Application.Current.Resources["DisableStyleRow"] as Style; Utility.SetDimensionsGrid(api, cldim1, cldim2, cldim3, cldim4, cldim5); RibbonBase rb = (RibbonBase)localMenu.DataContext; if (master is Uniconta.DataModel.Project) { iIncludeSubProBase = UtilDisplay.GetMenuCommandByName(rb, "InclSubProjects"); iIncludeSubProBase.IsChecked = includeSubProject; } else { UtilDisplay.RemoveMenuCommand(rb, "InclSubProjects"); } localMenu.OnChecked += LocalMenu_OnChecked; }
void GetMenuItem() { RibbonBase rb = (RibbonBase)localMenu.DataContext; ibase = UtilDisplay.GetMenuCommandByName(rb, "ExpandAndCollapse"); UtilDisplay.RemoveMenuCommand(rb, "ViewDownloadRow"); }
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"); } else { UtilDisplay.RemoveMenuCommand(rb, "InclSubProjects"); } dgProjectTransaction.api = api; dgProjectTransaction.BusyIndicator = busyIndicator; dgProjectTransaction.ShowTotalSummary(); localMenu.OnItemClicked += LocalMenu_OnItemClicked; localMenu.OnChecked += LocalMenu_OnChecked; }
private void EditAll() { RibbonBase rb = (RibbonBase)localMenu.DataContext; var iBase = UtilDisplay.GetMenuCommandByName(rb, "EditAll"); if (iBase == null) { return; } if (dgDebtorOffers.Readonly) { dgDebtorOffers.MakeEditable(); UserFieldControl.MakeEditable(dgDebtorOffers); iBase.Caption = Uniconta.ClientTools.Localization.lookup("LeaveEditAll"); ribbonControl.EnableButtons(new string[] { "AddLine", "CopyRow", "DeleteRow", "SaveGrid" }); editAllChecked = false; } else { if (IsDataChaged) { string message = Uniconta.ClientTools.Localization.lookup("SaveChangesPrompt"); CWConfirmationBox confirmationDialog = new CWConfirmationBox(message); confirmationDialog.Closing += async delegate { if (confirmationDialog.DialogResult == null) { return; } switch (confirmationDialog.ConfirmationResult) { case CWConfirmationBox.ConfirmationResultEnum.Yes: await dgDebtorOffers.SaveData(); break; case CWConfirmationBox.ConfirmationResultEnum.No: break; } editAllChecked = true; dgDebtorOffers.Readonly = true; dgDebtorOffers.tableView.CloseEditor(); iBase.Caption = Uniconta.ClientTools.Localization.lookup("EditAll"); ribbonControl.DisableButtons(new string[] { "AddLine", "CopyRow", "DeleteRow", "SaveGrid" }); }; confirmationDialog.Show(); } else { dgDebtorOffers.Readonly = true; dgDebtorOffers.tableView.CloseEditor(); iBase.Caption = Uniconta.ClientTools.Localization.lookup("EditAll"); ribbonControl.DisableButtons(new string[] { "AddLine", "CopyRow", "DeleteRow", "SaveGrid" }); } } }
void GetMenuItem() { RibbonBase rb = (RibbonBase)localMenu.DataContext; ibase = UtilDisplay.GetMenuCommandByName(rb, "Unlinked"); var rbMenuAssignText = UtilDisplay.GetMenuCommandByName(rb, "AssignText"); rbMenuAssignText.IsChecked = AssignText; }
void RemoveMenuItem() { RibbonBase rb = (RibbonBase)localMenu.DataContext; var ibase = UtilDisplay.GetMenuCommandByName(rb, "EditOrder"); if (ibase != null) { ibase.Caption = string.Format(Uniconta.ClientTools.Localization.lookup("EditOBJ"), Uniconta.ClientTools.Localization.lookup("Offers")); } }
void BindQuantity() { RibbonBase rb = (RibbonBase)localMenu.DataContext; var itemBase = UtilDisplay.GetMenuCommandByName(rb, "SetQuantity"); if (itemBase != null) { itemBase.CustomText = Convert.ToString(Quantity); } }
void Init() { InitializeComponent(); this.DataContext = this; dgAccountsTransGrid.api = api; SetRibbonControl(localMenu, dgAccountsTransGrid); dgAccountsTransGrid.BusyIndicator = busyIndicator; localMenu.OnItemClicked += localMenu_OnItemClicked; ibase = UtilDisplay.GetMenuCommandByName((RibbonBase)localMenu.DataContext, "ShowHideGreenLines"); }
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)); }
void Init() { InitializeComponent(); ((TableView)dgInvDutyGroupGrid.View).RowStyle = Application.Current.Resources["StyleRow"] as Style; localMenu.dataGrid = dgInvDutyGroupGrid; SetRibbonControl(localMenu, dgInvDutyGroupGrid); dgInvDutyGroupGrid.api = api; dgInvDutyGroupGrid.BusyIndicator = busyIndicator; localMenu.OnItemClicked += LocalMenu_OnItemClicked;; dgInvDutyGroupGrid.RowDoubleClick += DgInvDutyGroupGrid_RowDoubleClick; RibbonBase rb = (RibbonBase)localMenu.DataContext; var addBtn = UtilDisplay.GetMenuCommandByName(rb, "AddRow"); addBtn.Caption = string.Format(Uniconta.ClientTools.Localization.lookup("AddOBJ"), Uniconta.ClientTools.Localization.lookup("Duty")); }
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 GetMenuItem() { RibbonBase rb = (RibbonBase)localMenu.DataContext; ibase = UtilDisplay.GetMenuCommandByName(rb, "GroupByCategoryType"); iBudgetbase = UtilDisplay.GetMenuCommandByName(rb, "ShowBudget"); iIncludeSubProBase = UtilDisplay.GetMenuCommandByName(rb, "InclSubProjects"); var comboItem = UtilDisplay.GetMenuCommandByName(rb, "InvoicedTrans"); if (comboItem != null) { invoicedTrans = new string[] { Localization.lookup("All"), Localization.lookup("Invoiced"), Localization.lookup("NotInvoiced") }; comboItem.ComboBoxItemSource = invoicedTrans; comboItem.SelectedItem = invoicedTrans[InvoicedTrans]; // show value that is saved in the static localMenu.OnSelectedIndexChanged += LocalMenu_OnSelectedIndexChanged; } ShowBudget(); }
public ProductionMultiOrderLinesPage(BaseAPI API) : base(API, string.Empty) { InitializeComponent(); dgProductionMultiOrderLine.UpdateMaster(api.CompanyEntity); SetRibbonControl(localMenu, dgProductionMultiOrderLine); dgProductionMultiOrderLine.api = api; dgProductionMultiOrderLine.BusyIndicator = busyIndicator; localMenu.OnItemClicked += LocalMenu_OnItemClicked; dictPriceLookup = new Dictionary <int, Uniconta.API.DebtorCreditor.FindPrices>(); dgProductionMultiOrderLine.View.DataControl.CurrentItemChanged += ProductionMultiOrderLine_CurrentItemChanged; InitialLoad(); RibbonBase rb = (RibbonBase)localMenu.DataContext; var ibase = UtilDisplay.GetMenuCommandByName(rb, "AddOrder"); if (ibase != null) { ibase.Caption = string.Format(Uniconta.ClientTools.Localization.lookup("AddOBJ"), Uniconta.ClientTools.Localization.lookup("ProductionOrder")); } }
private async void SaveGrid() { var err = await dgProjectTransaction.SaveData(); if (err != 0) { return; } dgProjectTransaction.Readonly = true; dgProjectTransaction.tableView.CloseEditor(); RibbonBase rb = (RibbonBase)localMenu.DataContext; var ibase = UtilDisplay.GetMenuCommandByName(rb, "EditAll"); if (ibase != null) { ibase.Caption = Uniconta.ClientTools.Localization.lookup("EditAll"); ribbonControl.DisableButtons("Save"); } }
void Init() { if (fromDate == DateTime.MinValue) { DateTime date = GetSystemDefaultDate(); var firstDayOfMonth = new DateTime(date.Year, date.Month, 1); var lastDayOfMonth = firstDayOfMonth.AddMonths(1).AddDays(-1); fromDate = firstDayOfMonth; toDate = lastDayOfMonth; } InitializeComponent(); this.DataContext = this; dgAccountsTransGrid.api = api; SetRibbonControl(localMenu, dgAccountsTransGrid); dgAccountsTransGrid.BusyIndicator = busyIndicator; localMenu.OnItemClicked += localMenu_OnItemClicked; RibbonBase rb = (RibbonBase)localMenu.DataContext; ibase = UtilDisplay.GetMenuCommandByName(rb, "ShowHideGreenLines"); }
void AttachDocuments() { if (fileBrowser == null) { fileBrowser = new FileBrowseControl(); } else { fileBrowser.SelectedFileInfos = null; } fileBrowser.IsMultiSelect = true; fileBrowser.BrowseFile(); var fileList = fileBrowser.SelectedFileInfos; if (fileList != null) { if (documents == null) { documents = new List <TableAddOnData>(); } foreach (var file in fileList) { documents.Add(new TableAddOnData { _Text = System.IO.Path.GetFileNameWithoutExtension(file.FileName), _DocumentType = DocumentConvert.GetDocumentType(file.FileExtension), _Data = file.FileBytes }); } } if (documents?.Count > 0) { var rb = (RibbonBase)localMenu.DataContext; attachDocMenu = UtilDisplay.GetMenuCommandByName(rb, "AttachDoc"); attachDocMenu.Caption = string.Format("{0} ({1})", string.Format(Uniconta.ClientTools.Localization.lookup("AttachOBJ"), Uniconta.ClientTools.Localization.lookup("Documents")), documents.Count); } }
private void LocalMenu_OnItemClicked(string ActionType) { InvSerieBatchClient selectedItem = dgInvSeriesBatchGrid.SelectedItem as InvSerieBatchClient; switch (ActionType) { case "AddRow": dgInvSeriesBatchGrid.AddRow(); break; case "CopyRow": dgInvSeriesBatchGrid.CopyRow(); break; case "SaveGrid": saveGrid(); break; case "DeleteRow": dgInvSeriesBatchGrid.DeleteRow(); break; case "OpenOrAll": RibbonBase rb = (RibbonBase)localMenu.DataContext; ibase = UtilDisplay.GetMenuCommandByName(rb, "OpenOrAll"); if (openMaster == null) { openMaster = new InvSerieBatchOpen(); SetMaster(pageMaster, openMaster); ibase.Caption = Uniconta.ClientTools.Localization.lookup("All"); } else /*For All*/ { SetMaster(pageMaster, null); openMaster = null; ibase.Caption = Uniconta.ClientTools.Localization.lookup("Open"); } dgInvSeriesBatchGrid.Filter(null); break; case "RemoveFromTransaction": if (selectedItem != null) { RemoveFromTransaction(selectedItem); } break; case "Transactions": if (selectedItem != null) { AddDockItem(TabControls.InventoryTransactions, selectedItem, string.Format("{0}:{1}", Uniconta.ClientTools.Localization.lookup("Transactions"), selectedItem._Item)); } break; case "Storage": AddDockItem(TabControls.InvItemStoragePage, dgInvSeriesBatchGrid.syncEntity, Uniconta.ClientTools.Localization.lookup("OnHand")); break; case "AddNote": if (selectedItem != null) { AddDockItem(TabControls.UserNotesPage, dgInvSeriesBatchGrid.syncEntity); } break; case "AddDoc": if (selectedItem != null) { AddDockItem(TabControls.UserDocsPage, dgInvSeriesBatchGrid.syncEntity, string.Format("{0}: {1}", Uniconta.ClientTools.Localization.lookup("Documents"), selectedItem._Number)); } break; case "BatchLocations": if (selectedItem != null) { AddDockItem(TabControls.InvSerieBatchStorage, dgInvSeriesBatchGrid.syncEntity, string.Format("{0}: {1}", Uniconta.ClientTools.Localization.lookup("BatchLocations"), selectedItem._Number)); } break; default: gridRibbon_BaseActions(ActionType); break; } }
void GetMenuItem() { RibbonBase rb = (RibbonBase)localMenu.DataContext; ibase = UtilDisplay.GetMenuCommandByName(rb, "Marked"); }
void GetMenuItem() { RibbonBase rb = (RibbonBase)localMenu.DataContext; iShowAnchorBudget = UtilDisplay.GetMenuCommandByName(rb, "ShowAnchorBudget"); }
private void EditAll() { RibbonBase rb = (RibbonBase)localMenu.DataContext; var ibase = UtilDisplay.GetMenuCommandByName(rb, "EditAll"); if (ibase == null) { return; } if (dgDebtorTransOpen.Readonly) { api.AllowBackgroundCrud = false; dgDebtorTransOpen.MakeEditable(); UserFieldControl.MakeEditable(dgDebtorTransOpen); ibase.Caption = Uniconta.ClientTools.Localization.lookup("LeaveEditAll"); ribbonControl.EnableButtons("SaveGrid"); copyRowIsEnabled = true; editAllChecked = false; #if !SILVERLIGHT OnHold.ShowCheckBoxInHeader = Paid.ShowCheckBoxInHeader = true; #endif } else { #if !SILVERLIGHT OnHold.ShowCheckBoxInHeader = Paid.ShowCheckBoxInHeader = false; #endif if (IsDataChaged) { string message = Uniconta.ClientTools.Localization.lookup("SaveChangesPrompt"); CWConfirmationBox confirmationDialog = new CWConfirmationBox(message); confirmationDialog.Closing += async delegate { if (confirmationDialog.DialogResult == null) { return; } switch (confirmationDialog.ConfirmationResult) { case CWConfirmationBox.ConfirmationResultEnum.Yes: var err = await dgDebtorTransOpen.SaveData(); if (err != 0) { api.AllowBackgroundCrud = true; return; } break; case CWConfirmationBox.ConfirmationResultEnum.No: break; } editAllChecked = true; dgDebtorTransOpen.Readonly = true; dgDebtorTransOpen.tableView.CloseEditor(); ibase.Caption = Uniconta.ClientTools.Localization.lookup("EditAll"); ribbonControl.DisableButtons("SaveGrid"); copyRowIsEnabled = false; }; confirmationDialog.Show(); } else { dgDebtorTransOpen.Readonly = true; dgDebtorTransOpen.tableView.CloseEditor(); ibase.Caption = Uniconta.ClientTools.Localization.lookup("EditAll"); ribbonControl.DisableButtons("SaveGrid"); copyRowIsEnabled = false; } } }
void GetMenuItem() { RibbonBase rb = (RibbonBase)localMenu.DataContext; iIncludeSubProBase = UtilDisplay.GetMenuCommandByName(rb, "InclSubProjects"); }
void GetShowHideGreenMenuItem() { RibbonBase rb = (RibbonBase)localMenu.DataContext; ibase = UtilDisplay.GetMenuCommandByName(rb, "ShowHideGreenLines"); }
void GetShowHideStatusInfoSection() { RibbonBase rb = (RibbonBase)localMenu.DataContext; ibase = UtilDisplay.GetMenuCommandByName(rb, "EnableStatusInfoSection"); }
void GetShowHideTextSection() { RibbonBase rb = (RibbonBase)localMenu.DataContext; textBase = UtilDisplay.GetMenuCommandByName(rb, "EnableTextSection"); }
private void EditAll() { RibbonBase rb = (RibbonBase)localMenu.DataContext; var ibase = UtilDisplay.GetMenuCommandByName(rb, "EditAll"); if (ibase == null) { return; } if (dgProjectTransaction.Readonly) { api.AllowBackgroundCrud = false; dgProjectTransaction.MakeEditable(); ProjectCol.AllowEditing = DevExpress.Utils.DefaultBoolean.True; ibase.Caption = Uniconta.ClientTools.Localization.lookup("LeaveEditAll"); ribbonControl.EnableButtons("Save"); editAllChecked = false; } else { ProjectCol.AllowEditing = DevExpress.Utils.DefaultBoolean.False; if (IsDataChaged) { string message = Uniconta.ClientTools.Localization.lookup("SaveChangesPrompt"); CWConfirmationBox confirmationDialog = new CWConfirmationBox(message); confirmationDialog.Closing += async delegate { if (confirmationDialog.DialogResult == null) { return; } switch (confirmationDialog.ConfirmationResult) { case CWConfirmationBox.ConfirmationResultEnum.Yes: var err = await dgProjectTransaction.SaveData(); if (err != 0) { api.AllowBackgroundCrud = true; return; } break; } editAllChecked = true; dgProjectTransaction.Readonly = true; dgProjectTransaction.tableView.CloseEditor(); ibase.Caption = Uniconta.ClientTools.Localization.lookup("EditAll"); ribbonControl.DisableButtons("Save"); }; confirmationDialog.Show(); } else { dgProjectTransaction.Readonly = true; dgProjectTransaction.tableView.CloseEditor(); ibase.Caption = Uniconta.ClientTools.Localization.lookup("EditAll"); ribbonControl.DisableButtons("Save"); } } }
void GetMergeUnMergePaymMenuItem() { RibbonBase rb = (RibbonBase)localMenu.DataContext; ibaseMergePaym = UtilDisplay.GetMenuCommandByName(rb, "MergeUnMergePaym"); }
void GetMenuItem() { RibbonBase rb = (RibbonBase)localMenu.DataContext; ibase = UtilDisplay.GetMenuCommandByName(rb, "GroupByCategoryType"); }