Пример #1
0
        /// <summary>
        /// Method to generate an invoice
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnCreateInvoice_Click(object sender, RoutedEventArgs e)
        {
            if (lstInvoices.SelectedIndex != -1)                     //check that an item is selected in list view
            {
                Invoice documentInvoice = addInvoiceToLibrary.RetrieveElementAtPosition(lstInvoices.SelectedIndex);

                WindowInvocie newInvoice = new WindowInvocie(documentInvoice);
                newInvoice.Show();

                newInvoice.UpdateInvoice += OnUpdateInvoiceSent;                // subscribe to event handler
            }

            InitializeGUI();
        }
Пример #2
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.WindowInvoice = ((InvoiceMaker.WindowInvocie)(target));
                return;

            case 2:
                this.lblInvoiceDate = ((System.Windows.Controls.Label)(target));
                return;

            case 3:
                this.lblDueDate = ((System.Windows.Controls.Label)(target));
                return;

            case 4:
                this.lstArticles = ((System.Windows.Controls.ListView)(target));
                return;

            case 5:
                this.lblAddress = ((System.Windows.Controls.Label)(target));
                return;

            case 6:
                this.lblPhone = ((System.Windows.Controls.Label)(target));
                return;

            case 7:
                this.lblHomePage = ((System.Windows.Controls.Label)(target));
                return;

            case 8:
                this.lblTotal = ((System.Windows.Controls.Label)(target));
                return;

            case 9:
                this.gboxAddress = ((System.Windows.Controls.GroupBox)(target));
                return;

            case 10:
                this.lblCustomerAddress = ((System.Windows.Controls.Label)(target));
                return;

            case 11:
                this.gboxInvoiceNumber = ((System.Windows.Controls.GroupBox)(target));
                return;

            case 12:
                this.lblInvoiceNumber = ((System.Windows.Controls.Label)(target));
                return;

            case 13:
                this.txtDiscount = ((System.Windows.Controls.TextBox)(target));

            #line 39 "..\..\WindowInvocie.xaml"
                this.txtDiscount.PreviewTextInput += new System.Windows.Input.TextCompositionEventHandler(this.txtDiscount_PreviewTextInput);

            #line default
            #line hidden
                return;

            case 14:
                this.lblInfoTotal = ((System.Windows.Controls.Label)(target));
                return;

            case 15:
                this.daPCreatedDate = ((System.Windows.Controls.DatePicker)(target));

            #line 41 "..\..\WindowInvocie.xaml"
                this.daPCreatedDate.SelectedDateChanged += new System.EventHandler <System.Windows.Controls.SelectionChangedEventArgs>(this.daPCreatedDate_SelectedDateChanged);

            #line default
            #line hidden
                return;

            case 16:
                this.daPDueDate = ((System.Windows.Controls.DatePicker)(target));

            #line 42 "..\..\WindowInvocie.xaml"
                this.daPDueDate.SelectedDateChanged += new System.EventHandler <System.Windows.Controls.SelectionChangedEventArgs>(this.daPDueDate_SelectedDateChanged);

            #line default
            #line hidden
                return;

            case 17:
                this.btnDiscount = ((System.Windows.Controls.Button)(target));

            #line 43 "..\..\WindowInvocie.xaml"
                this.btnDiscount.Click += new System.Windows.RoutedEventHandler(this.btnDiscount_Click);

            #line default
            #line hidden
                return;

            case 18:
                this.lblErrorDiscount = ((System.Windows.Controls.Label)(target));
                return;

            case 19:
                this.btnAddLogo = ((System.Windows.Controls.Button)(target));

            #line 45 "..\..\WindowInvocie.xaml"
                this.btnAddLogo.Click += new System.Windows.RoutedEventHandler(this.btnAddLogo_Click);

            #line default
            #line hidden
                return;

            case 20:
                this.imgLogo = ((System.Windows.Controls.Image)(target));
                return;

            case 21:
                this.btnPrint = ((System.Windows.Controls.Button)(target));

            #line 54 "..\..\WindowInvocie.xaml"
                this.btnPrint.Click += new System.Windows.RoutedEventHandler(this.Button_Click);

            #line default
            #line hidden
                return;

            case 22:
                this.lblErrorCreatedDate = ((System.Windows.Controls.Label)(target));
                return;

            case 23:
                this.lblErrorDueDate = ((System.Windows.Controls.Label)(target));
                return;
            }
            this._contentLoaded = true;
        }