/// <summary> /// This is the only constructor which takes a ViewNavigationController so that the current view being displayed can be changed /// </summary> /// <param name="viewNavigationController"></param> public wndMain(ViewNavigationController viewNavigationController) { InitializeComponent(); this.viewNavigationController = viewNavigationController; Invoices = clsMainLogic.getAllInvoices(Invoices); DataContext = this; }
/// <summary> /// Constructor for this user control, takes the viewNavigationController which is displayed in the contentpresenter in the MainWindow. /// </summary> /// <param name="viewNavigationController"></param> public NewInvoice(ViewNavigationController viewNavigationController) { InitializeComponent(); this.viewNavigationController = viewNavigationController; //get a list of current items from the database AvailableItems = clsMainLogic.GetAllItems(); DataContext = this; }
/// <summary> /// /// </summary> /// <param name="viewNavigationController"></param> /// <param name="invoice"></param> public ModifyInvoice(ViewNavigationController viewNavigationController, Invoice invoice) { InitializeComponent(); this.viewNavigationController = viewNavigationController; CurrentInvoice = invoice; AvailableItems = clsMainLogic.GetAllItems(); DataContext = this; }
protected override void OnActivated() { viewNavigationController = Frame.GetController <ViewNavigationController>(); if (viewNavigationController != null) { viewNavigationController.NavigateBackAction.Active.SetItemValue(displayNavigation, false); viewNavigationController.NavigateForwardAction.Active.SetItemValue(displayNavigation, false); } base.OnActivated(); }
/// <summary> /// This constructur takes in the invoice and string command, /// if command is getinvoiceitems then it will query and get the items for this specific invoice and fill it in to the invoice object. /// This is called from the search window. /// </summary> /// <param name="viewNavigationController"></param> /// <param name="invoice"></param> /// <param name="Command"></param> public ModifyInvoice(ViewNavigationController viewNavigationController, Invoice invoice, string Command) { InitializeComponent(); this.viewNavigationController = viewNavigationController; CurrentInvoice = invoice; AvailableItems = clsMainLogic.GetAllItems(); DataContext = this; if (Command == "GetInvoiceItems") { //gets all the line items and adds them to current invoice clsMainLogic.getLineItems(ref _CurrentInvoice); PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(CurrentInvoice))); } }
/// <summary> /// Contructor for the wndItems window. /// </summary> /// <param name="viewNavigationController"></param> public wndItems(ViewNavigationController viewNavigationController) { try { InitializeComponent(); this.viewNavigationController = viewNavigationController; item = new Item("", "", ""); BeginningProperties(); } catch (Exception ex) { throw new Exception(MethodInfo.GetCurrentMethod().DeclaringType.Name + "." + MethodInfo.GetCurrentMethod().Name + " -> " + ex.Message); } }
public wndSearch(ViewNavigationController viewNavigationController) { try { InitializeComponent(); this.viewNavigationController = viewNavigationController; logic = new clsSearchLogic(); startsearch = false; selected = false; logic.getInvoiceNums(); logic.getTotalCosts(); } catch (Exception ex) { //Just throw the exception throw new Exception(MethodInfo.GetCurrentMethod().DeclaringType.Name + "." + MethodInfo.GetCurrentMethod().Name + " -> " + ex.Message); } }
protected override void OnActivated() { base.OnActivated(); // Perform various tasks depending on the target View. // Ẩn một số controller của XAF recordsNavigationController = Frame.GetController <RecordsNavigationController>(); if (recordsNavigationController != null) { recordsNavigationController.Active[Key] = false; } viewNavigationController = Frame.GetController <ViewNavigationController>(); if (viewNavigationController != null) { viewNavigationController.Active[Key] = false; } resetViewSettingsController = Frame.GetController <ResetViewSettingsController>(); if (resetViewSettingsController != null) { resetViewSettingsController.Active[Key] = false; } }
public Settings(ViewNavigationController viewNavigationController) { InitializeComponent(); this.viewNavigationController = viewNavigationController; DataContext = this; }