private void LineItem()
        {
            IFormatProvider culture = new System.Globalization.CultureInfo("en-US", true);

            transaction.TransactionNumber        = SelectedTransactionNumber;
            transaction.TransactionType          = SelectedTransactionType.Code + " " + SelectedTransactionType.Description;
            transaction.DocumentNumber           = DocumentNumber;
            transaction.TransactionDate          = DateTime.Parse(TransactionDate, culture);
            transaction.SourceWarehouseCode      = SelectedSourceWarehouse.Code;
            transaction.SourceWarehouse          = SelectedSourceWarehouse.Name;
            transaction.SourceLocationCode       = SelectedSourceLocation.Code;
            transaction.SourceLocation           = SelectedSourceLocation.Location;
            transaction.DestinationWarehouseCode = SelectedDestinationWarehouse.Code;
            transaction.DestinationWarehouse     = SelectedDestinationWarehouse.Name;
            transaction.DestinationLocationCode  = SelectedDestinationLocation.Code;
            transaction.DestinationLocation      = SelectedDestinationLocation.Location;
            transaction.ReasonCode = SelectedReason.ReasonCode;
            transaction.Reason     = SelectedReason.Description;
            transaction.Comment    = Comment;

            //Add new entry to database
            if (SelectedTransactionNumber == latestTransNo)
            {
                if (IsLineable)
                {
                    transaction.AddTransactionEntry(transaction);
                }
            }

            var v  = new LineItemView();
            var vm = new LineItemViewModel(this.transaction);
        }
Exemple #2
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.viewModel = ((ESI_ITE.ViewModel.LineItemViewModel)(target));
     return;
     case 2:
     this.grdTransactionHeader = ((System.Windows.Controls.Grid)(target));
     return;
     case 3:
     this.txtWeeksCover = ((System.Windows.Controls.TextBox)(target));
     return;
     case 4:
     this.txtTransactionNumber = ((System.Windows.Controls.TextBox)(target));
     return;
     case 5:
     this.txtDocumentNumber = ((System.Windows.Controls.TextBox)(target));
     return;
     case 6:
     this.txtTransactionDate = ((System.Windows.Controls.TextBox)(target));
     return;
     case 7:
     this.txtTransactionType = ((System.Windows.Controls.TextBox)(target));
     return;
     case 8:
     this.txtReasonCode = ((System.Windows.Controls.TextBox)(target));
     return;
     case 9:
     this.txtComment = ((System.Windows.Controls.TextBox)(target));
     return;
     case 10:
     this.txtStocksOnHand = ((System.Windows.Controls.TextBox)(target));
     return;
     case 11:
     this.txtSourceWarehouse = ((System.Windows.Controls.TextBox)(target));
     return;
     case 12:
     this.txtSourceLocation = ((System.Windows.Controls.TextBox)(target));
     return;
     case 13:
     this.txtSourceSalesman = ((System.Windows.Controls.TextBox)(target));
     return;
     case 14:
     this.txtDestinationWarehouse = ((System.Windows.Controls.TextBox)(target));
     return;
     case 15:
     this.txtDestinationLocation = ((System.Windows.Controls.TextBox)(target));
     return;
     case 16:
     this.txtDestinationSalesman = ((System.Windows.Controls.TextBox)(target));
     return;
     case 17:
     this.txtItemCode = ((System.Windows.Controls.TextBox)(target));
     return;
     case 18:
     this.cmbPriceType = ((System.Windows.Controls.ComboBox)(target));
     return;
     case 19:
     this.txtLC = ((System.Windows.Controls.TextBox)(target));
     return;
     case 20:
     this.txtCases = ((System.Windows.Controls.TextBox)(target));
     return;
     case 21:
     this.txtPieces = ((System.Windows.Controls.TextBox)(target));
     return;
     case 22:
     this.txtUnitPrice = ((System.Windows.Controls.TextBox)(target));
     return;
     case 23:
     this.txtExpiry = ((System.Windows.Controls.TextBox)(target));
     return;
     case 24:
     this.txtTaxRate = ((System.Windows.Controls.TextBox)(target));
     return;
     case 25:
     this.txtWarehouseCode = ((System.Windows.Controls.TextBox)(target));
     return;
     case 26:
     this.btnAdd = ((System.Windows.Controls.Button)(target));
     return;
     case 27:
     this.btnDelete = ((System.Windows.Controls.Button)(target));
     return;
     case 28:
     this.btnPrint = ((System.Windows.Controls.Button)(target));
     return;
     case 29:
     this.btnCancel = ((System.Windows.Controls.Button)(target));
     return;
     }
     this._contentLoaded = true;
 }
        private void LineItem()
        {
            IFormatProvider culture = new System.Globalization.CultureInfo("en-US", true);

            transaction.TransactionNumber = SelectedTransactionNumber;
            transaction.TransactionType = SelectedTransactionType.Code + " " + SelectedTransactionType.Description;
            transaction.DocumentNumber = DocumentNumber;
            transaction.TransactionDate = DateTime.Parse(TransactionDate, culture);
            transaction.SourceWarehouseCode = SelectedSourceWarehouse.Code;
            transaction.SourceWarehouse = SelectedSourceWarehouse.Name;
            transaction.SourceLocationCode = SelectedSourceLocation.Code;
            transaction.SourceLocation = SelectedSourceLocation.Location;
            transaction.DestinationWarehouseCode = SelectedDestinationWarehouse.Code;
            transaction.DestinationWarehouse = SelectedDestinationWarehouse.Name;
            transaction.DestinationLocationCode = SelectedDestinationLocation.Code;
            transaction.DestinationLocation = SelectedDestinationLocation.Location;
            transaction.ReasonCode = SelectedReason.ReasonCode;
            transaction.Reason = SelectedReason.Description;
            transaction.Comment = Comment;

            //Add new entry to database
            if (SelectedTransactionNumber == latestTransNo)
            {
                if (IsLineable)
                {
                    transaction.AddTransactionEntry(transaction);
                }
            }

            var v = new LineItemView();
            var vm = new LineItemViewModel(this.transaction);
        }
Exemple #4
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.viewModel = ((ESI_ITE.ViewModel.LineItemViewModel)(target));
                return;

            case 2:
                this.grdTransactionHeader = ((System.Windows.Controls.Grid)(target));
                return;

            case 3:
                this.txtWeeksCover = ((System.Windows.Controls.TextBox)(target));
                return;

            case 4:
                this.txtTransactionNumber = ((System.Windows.Controls.TextBox)(target));
                return;

            case 5:
                this.txtDocumentNumber = ((System.Windows.Controls.TextBox)(target));
                return;

            case 6:
                this.txtTransactionDate = ((System.Windows.Controls.TextBox)(target));
                return;

            case 7:
                this.txtTransactionType = ((System.Windows.Controls.TextBox)(target));
                return;

            case 8:
                this.txtReasonCode = ((System.Windows.Controls.TextBox)(target));
                return;

            case 9:
                this.txtComment = ((System.Windows.Controls.TextBox)(target));
                return;

            case 10:
                this.txtStocksOnHand = ((System.Windows.Controls.TextBox)(target));
                return;

            case 11:
                this.txtSourceWarehouse = ((System.Windows.Controls.TextBox)(target));
                return;

            case 12:
                this.txtSourceLocation = ((System.Windows.Controls.TextBox)(target));
                return;

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

            case 14:
                this.txtDestinationWarehouse = ((System.Windows.Controls.TextBox)(target));
                return;

            case 15:
                this.txtDestinationLocation = ((System.Windows.Controls.TextBox)(target));
                return;

            case 16:
                this.txtDestinationSalesman = ((System.Windows.Controls.TextBox)(target));
                return;

            case 17:
                this.txtItemCode = ((System.Windows.Controls.TextBox)(target));
                return;

            case 18:
                this.cmbPriceType = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 19:
                this.txtLC = ((System.Windows.Controls.TextBox)(target));
                return;

            case 20:
                this.txtCases = ((System.Windows.Controls.TextBox)(target));
                return;

            case 21:
                this.txtPieces = ((System.Windows.Controls.TextBox)(target));
                return;

            case 22:
                this.txtUnitPrice = ((System.Windows.Controls.TextBox)(target));
                return;

            case 23:
                this.txtExpiry = ((System.Windows.Controls.TextBox)(target));
                return;

            case 24:
                this.txtTaxRate = ((System.Windows.Controls.TextBox)(target));
                return;

            case 25:
                this.txtWarehouseCode = ((System.Windows.Controls.TextBox)(target));
                return;

            case 26:
                this.btnAdd = ((System.Windows.Controls.Button)(target));
                return;

            case 27:
                this.btnDelete = ((System.Windows.Controls.Button)(target));
                return;

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

            case 29:
                this.btnCancel = ((System.Windows.Controls.Button)(target));
                return;
            }
            this._contentLoaded = true;
        }