예제 #1
0
        public customer getCustomer(ref int id)
        {
            string sql = null;
            ADODB.Connection cn = default(ADODB.Connection);
            ADODB.Recordset rs = default(ADODB.Recordset);
            customer customer_Renamed = null;
            if (id) {

                cn = modRecordSet.openConnectionInstance();
                if (cn == null) {
                    Interaction.MsgBox("You are not connected to the 4POS BackOffice server! This task can only be performed if you are connected to the server. Please contact your System Administrator.", MsgBoxStyle.Exclamation, "BackOffice Connection Error");
                } else {
                    rs = new ADODB.Recordset();
                    sql = "SELECT Customer.*, [Customer_Current]+[Customer_30Days]+[Customer_60Days]+[Customer_90Days]+[Customer_120Days]+[Customer_150Days] AS balance From Customer WHERE CustomerID=" + id;
                    rs.Open(sql, cn, ADODB.CursorTypeEnum.adOpenStatic, ADODB.LockTypeEnum.adLockReadOnly, ADODB.CommandTypeEnum.adCmdText);
                    if (rs.RecordCount) {
                        customer_Renamed = new customer();
                        customer_Renamed.Key = rs.Fields("CustomerID").Value;
                        customer_Renamed.channelID = rs.Fields("Customer_ChannelID").Value;
                        customer_Renamed.creditLimit = rs.Fields("Customer_CreditLimit").Value;
                        customer_Renamed.department = rs.Fields("Customer_DepartmentName").Value + "";
                        customer_Renamed.fax = rs.Fields("Customer_Fax").Value + "";
                        customer_Renamed.name = rs.Fields("Customer_InvoiceName").Value + "";
                        customer_Renamed.outstanding = rs.Fields("balance").Value;
                        customer_Renamed.person = rs.Fields("Customer_FirstName").Value + " " + rs.Fields("Customer_Surname").Value;
                        customer_Renamed.physical = rs.Fields("Customer_PhysicalAddress").Value + "";
                        customer_Renamed.postal = rs.Fields("Customer_PostalAddress").Value + "";
                        customer_Renamed.signed_Renamed = customer_Renamed.person;
                        customer_Renamed.telephone = rs.Fields("Customer_Telephone").Value + "";
                        customer_Renamed.terms = rs.Fields("Customer_Terms").Value;
                        customer_Renamed.tax = rs.Fields("Customer_VATNumber").Value + "";
                    }
                }
            }
            return customer_Renamed;
        }
예제 #2
0
        public Collection search(ref string searchString)
        {
            string   lString          = null;
            customer customer_Renamed = null;
            short    lExit            = 0;

            // ERROR: Not supported in C#: OnErrorStatement

            mCol    = new Collection();
            lString = Strings.Trim(searchString);
            lString = Strings.Replace(lString, "  ", " ");
            lString = Strings.Replace(lString, "  ", " ");
            lString = Strings.Replace(lString, "  ", " ");
            lString = Strings.Replace(lString, "  ", " ");
            lString = Strings.Replace(lString, "  ", " ");
            lString = Strings.Replace(lString, "  ", " ");

            if (!string.IsNullOrEmpty(lString))
            {
                lString = Strings.Replace(lString, "'", "''");
                lString = "(Customer_InvoiceName LIKE '%" + Strings.Replace(lString, " ", "%' AND Customer_InvoiceName LIKE '%") + "%')";
            }
            else
            {
                lString = "";
            }
            gRS.filter = lString;

            if (gRS.RecordCount <= 0)
            {
                lString = Strings.Trim(searchString);
                lString = Strings.Replace(lString, "  ", " ");
                lString = Strings.Replace(lString, "  ", " ");
                lString = Strings.Replace(lString, "  ", " ");
                lString = Strings.Replace(lString, "  ", " ");
                lString = Strings.Replace(lString, "  ", " ");
                lString = Strings.Replace(lString, "  ", " ");
                if (!string.IsNullOrEmpty(lString))
                {
                    lString = Strings.Replace(lString, "'", "''");
                    lString = "(Customer_Surname LIKE '%" + Strings.Replace(lString, " ", "%' AND Customer_Surname LIKE '%") + "%')";
                }
                else
                {
                    lString = "";
                }
                gRS.filter = lString;
            }

            while (!(gRS.EOF))
            {
                customer_Renamed                = new customer();
                customer_Renamed.Key            = gRS.Fields("CustomerID").Value;
                customer_Renamed.channelID      = gRS.Fields("Customer_ChannelID").Value;
                customer_Renamed.creditLimit    = gRS.Fields("Customer_CreditLimit").Value;
                customer_Renamed.department     = gRS.Fields("Customer_DepartmentName").Value + "";
                customer_Renamed.fax            = gRS.Fields("Customer_Fax").Value + "";
                customer_Renamed.name           = gRS.Fields("Customer_InvoiceName").Value;
                customer_Renamed.outstanding    = gRS.Fields("balance").Value;
                customer_Renamed.person         = gRS.Fields("Customer_FirstName").Value + " " + gRS.Fields("Customer_Surname").Value;
                customer_Renamed.physical       = gRS.Fields("Customer_PhysicalAddress").Value + "";
                customer_Renamed.postal         = gRS.Fields("Customer_PostalAddress").Value + "";
                customer_Renamed.signed_Renamed = customer_Renamed.person;
                customer_Renamed.telephone      = gRS.Fields("Customer_Telephone").Value + "";
                customer_Renamed.terms          = gRS.Fields("Customer_Terms").Value;
                customer_Renamed.tax            = gRS.Fields("Customer_VATNumber").Value + "";
                mCol.Add(customer_Renamed, "k" + customer_Renamed.Key);
                lExit = lExit + 1;
                if (lExit == 50)
                {
                    break;                     // TODO: might not be correct. Was : Exit Do
                }
                gRS.moveNext();
            }
            return(mCol);
        }
예제 #3
0
        private void cmdInv_Click(System.Object eventSender, System.EventArgs eventArgs)
        {
            CrystalDecisions.CrystalReports.Engine.ReportDocument ReportNone = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
            int personID = 0;
            int posID = 0;
            string[] lArray = null;
            string lAddress = null;

            //On Error Resume Next
            ADODB.Connection cn = default(ADODB.Connection);
            short x = 0;
            string databaseName = null;
            int lID = 0;
            CrystalDecisions.CrystalReports.Engine.ReportDocument Report = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
            ADODB.Recordset rs = default(ADODB.Recordset);
            ADODB.Recordset rsItems = default(ADODB.Recordset);
            string sql = null;
            //UPGRADE_WARNING: Screen property Screen.MousePointer has a new behavior. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6BA9B8D2-2A32-4B6E-8D36-44949974A5B4"'
            System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.WaitCursor;

            if (lvTransaction.FocusedItem == null)
                return;
            //lID = Mid(Split(Me.lvTransaction.SelectedItem.Key, "_")(0), 2)
            if (Convert.ToDouble(Strings.Split(this.lvTransaction.FocusedItem.Name, "_")[2]) == 0) {
                Interaction.MsgBox("There is no Sale document attached!", MsgBoxStyle.Information);
                System.Windows.Forms.Cursor.Current = Cursors.Default;
                return;
            }
            lID = Convert.ToInt32(Strings.Split(this.lvTransaction.FocusedItem.Name, "_")[2]);
            //If openConnection() Then
            //    frmMain.lblPath.Caption = serverPath
            //    closeConnection
            //End If
            //Set cn = openConnectionInstance()
            //lMonth = cmbMonth.ItemData(cmbMonth.ListIndex)
            //Dim lLineitem As lineitem
            //If lMonth = gMonthEnd Then
            //    databaseName = ""
            //Else
            //    databaseName = "Month" & lMonth & ".mdb"
            //End If
            databaseName = Strings.Split(this.lvTransaction.FocusedItem.Name, "_")[1];

            cn = modRecordSet.openConnectionInstance(ref databaseName);
            if (cn == null) {
                return;
            }

            transaction lTransaction = new transaction();
            lineItem lLineitem = null;
            customer lCustomer = new customer();
            transactionSpecial lSpecial = new transactionSpecial();
            if (Convert.ToDouble(Strings.Split(this.lvTransaction.FocusedItem.Name, "_")[3]) == 2) {
                //sale
                //Dim Report As New cryReceipt
                //Set Report = New cryReceipt

                rs = new ADODB.Recordset();
                sql = "SELECT Sale.* From Sale WHERE (((SaleID)=" + lID + "));";
                rs.Open(sql, cn, ADODB.CursorTypeEnum.adOpenStatic, ADODB.LockTypeEnum.adLockReadOnly, ADODB.CommandTypeEnum.adCmdText);

                if (rs.RecordCount) {
                    lTransaction.cashierID = rs.Fields("Sale_PersonID").Value;
                    lTransaction.channelID = rs.Fields("Sale_ChannelID").Value;
                    lTransaction.managerID = rs.Fields("Sale_ManagerID").Value;
                    lTransaction.paymentDiscount = rs.Fields("Sale_Discount").Value;
                    lTransaction.paymentSlip = rs.Fields("Sale_Slip").Value;
                    lTransaction.paymentSubTotal = rs.Fields("Sale_SubTotal").Value;
                    lTransaction.paymentTender = rs.Fields("Sale_Tender").Value;
                    lTransaction.paymentTotal = rs.Fields("Sale_Total").Value;
                    lTransaction.paymentType = rs.Fields("Sale_PaymentType").Value;
                    lTransaction.posID = rs.Fields("Sale_POSID").Value;
                    lTransaction.transactionDate = rs.Fields("Sale_DatePOS").Value;
                    lTransaction.transactionID = rs.Fields("Sale_Reference").Value + "";
                    lTransaction.transactionType = "Sale";
                    //If prPrevSerial_p = True Then strSerial = rs("Sale_Serialref")
                    rs.Close();

                    rs = modRecordSet.getRS(ref "SELECT * FROM Company");
                    lTransaction.companyName = rs.Fields("Company_Name").Value;
                    //gParameters.companyName
                    lTransaction.footer = " ";
                    //gParameters.footer & ""
                    lTransaction.heading1 = rs.Fields("Company_PhysicalAddress").Value;
                    //gParameters.heading1 & ""
                    lTransaction.heading2 = " ";
                    //gParameters.heading2 & ""
                    lTransaction.heading3 = " ";
                    //gParameters.heading3 & ""
                    lTransaction.taxNumber = rs.Fields("Company_TaxNumber").Value;
                    //gParameters.taxNumber & ""
                    rs.Close();

                    sql = "SELECT [Person_FirstName] & ' ' & [Person_LastName] AS personName From Person WHERE (((PersonID)=" + lTransaction.cashierID + "));";
                    rs = modRecordSet.getRS(ref sql);
                    //rs.Open sql, cn, adOpenStatic, adLockReadOnly, adCmdText
                    if (rs.RecordCount) {
                        lTransaction.cashierName = rs.Fields("personName").Value + "";
                    }
                    rs.Close();

                    sql = "SELECT [Person_FirstName] & ' ' & [Person_LastName] AS personName From Person WHERE (((PersonID)=" + lTransaction.managerID + "));";
                    rs = modRecordSet.getRS(ref sql);
                    //rs.Open sql, cn, adOpenStatic, adLockReadOnly, adCmdText
                    if (rs.RecordCount) {
                        lTransaction.managerName = rs.Fields("personName").Value + "";
                    }
                    rs.Close();

                    sql = "SELECT POS_Name From POS WHERE (((POS.POSID)=" + lTransaction.posID + "));";
                    rs = modRecordSet.getRS(ref sql);
                    //rs.Open sql, cn, adOpenStatic, adLockReadOnly, adCmdText
                    if (rs.RecordCount) {
                        lTransaction.posName = rs.Fields("POS_Name").Value + "";
                    }
                    rs.Close();

                    //sql = "SELECT SaleItem.*, StockItem.StockItem_Name AS longName, StockItem.StockItem_ReceiptName AS receiptName, Catalogue.Catalogue_Barcode AS code,'Sale' as saleType FROM (StockItem INNER JOIN SaleItem ON StockItem.StockItemID = SaleItem.SaleItem_StockItemID) INNER JOIN Catalogue ON (Catalogue.Catalogue_Quantity = SaleItem.SaleItem_ShrinkQuantity) AND (SaleItem.SaleItem_StockItemID = Catalogue.Catalogue_StockItemID) WHERE (((SaleItem.SaleItem_DepositType)=0) AND ((SaleItem.SaleItem_SaleID)=" & lID & "))"
                    //sql = sql & " UNION "
                    //sql = sql & "SELECT SaleItem.*, Deposit.Deposit_Name AS longName, Deposit.Deposit_ReceiptName AS receiptName, Deposit.Deposit_Key AS code,'Deposit' as saleType FROM Deposit INNER JOIN SaleItem ON Deposit.DepositID = SaleItem.SaleItem_StockItemID WHERE (((SaleItem.SaleItem_DepositType)<>0) AND ((SaleItem.SaleItem_SaleID)=" & lID & "));"
                    sql = "SELECT SaleItem.*, 'Sale' AS saleType From SaleItem Where (((SaleItem.SaleItem_DepositType) = 0) And ((SaleItem.SaleItem_SaleID) = " + lID + "))";
                    sql = sql + " UNION ";
                    sql = sql + "SELECT SaleItem.*, 'Deposit' AS saleType From SaleItem WHERE (((SaleItem.SaleItem_DepositType)<>0) AND ((SaleItem.SaleItem_SaleID)=" + lID + "));";
                    rs.Open(sql, cn, ADODB.CursorTypeEnum.adOpenForwardOnly, ADODB.LockTypeEnum.adLockReadOnly, ADODB.CommandTypeEnum.adCmdText);
                    while (!(rs.EOF)) {
                        lLineitem = new lineItem();
                        lLineitem.build = 0;
                        lLineitem.depositType = rs.Fields("SaleItem_DepositType").Value;
                        lLineitem.id = rs.Fields("SaleItem_StockItemID").Value;
                        lLineitem.lineNo = rs.Fields("SaleItem_LineNo").Value;
                        lLineitem.originalPrice = rs.Fields("SaleItem_PriceOriginal").Value;
                        lLineitem.price = rs.Fields("SaleItem_Price").Value;
                        lLineitem.quantity = rs.Fields("SaleItem_Quantity").Value;
                        lLineitem.reversal = rs.Fields("SaleItem_Reversal").Value;
                        lLineitem.revoke = rs.Fields("SaleItem_Revoke").Value;
                        lLineitem.setBuild = rs.Fields("SaleItem_SetID").Value;
                        lLineitem.shrink = rs.Fields("SaleItem_ShrinkQuantity").Value;
                        lLineitem.vat = rs.Fields("SaleItem_Vat").Value;
                        lLineitem.transactionType = rs.Fields("SaleType").Value + "";
                        //lLineitem.code = rs("Code") & ""
                        switch (lLineitem.depositType) {
                            case 0:
                                sql = "SELECT StockItem.StockItem_Name AS longName, StockItem.StockItem_ReceiptName AS receiptName From StockItem WHERE (((StockItemID)=" + rs.Fields("SaleItem_StockItemID").Value + "));";
                                rsItems = modRecordSet.getRS(ref sql);
                                if (rsItems.RecordCount) {
                                    lLineitem.name = rs.Fields("SaleItem_ShrinkQuantity").Value + " x " + rsItems.Fields("longName").Value;
                                    lLineitem.receiptName = rs.Fields("SaleItem_ShrinkQuantity").Value + "x" + rsItems.Fields("receiptName").Value;
                                }
                                rsItems.Close();
                                sql = "SELECT Catalogue.Catalogue_Barcode AS code FROM Catalogue WHERE (Catalogue.Catalogue_Quantity = " + rs.Fields("SaleItem_ShrinkQuantity").Value + ") AND (Catalogue.Catalogue_StockItemID = " + rs.Fields("SaleItem_StockItemID").Value + ");";
                                rsItems = modRecordSet.getRS(ref sql);
                                if (rsItems.RecordCount) {
                                    lLineitem.code = rsItems.Fields("Code").Value + "";
                                }
                                rsItems.Close();
                                break;
                            case 1:
                                sql = "SELECT Deposit.Deposit_Name AS longName, Deposit.Deposit_ReceiptName AS receiptName, Deposit.Deposit_Key AS code From Deposit WHERE (((DepositID)=" + rs.Fields("SaleItem_StockItemID").Value + "));";
                                rsItems = modRecordSet.getRS(ref sql);
                                if (rsItems.RecordCount) {
                                    lLineitem.name = rs.Fields("longName").Value + "-Unit";
                                    lLineitem.receiptName = rs.Fields("receiptName").Value + "(U)";
                                    lLineitem.code = rsItems.Fields("Code").Value + "";
                                }
                                rsItems.Close();
                                break;
                            case 2:
                                sql = "SELECT Deposit.Deposit_Name AS longName, Deposit.Deposit_ReceiptName AS receiptName, Deposit.Deposit_Key AS code From Deposit WHERE (((DepositID)=" + rs.Fields("SaleItem_StockItemID").Value + "));";
                                rsItems = modRecordSet.getRS(ref sql);
                                if (rsItems.RecordCount) {
                                    lLineitem.name = rs.Fields("longName").Value + "-Empty Crate";
                                    lLineitem.receiptName = rs.Fields("receiptName").Value + "(E)";
                                    lLineitem.code = rsItems.Fields("Code").Value + "";
                                }
                                rsItems.Close();
                                break;
                            case 3:
                                sql = "SELECT Deposit.Deposit_Name AS longName, Deposit.Deposit_ReceiptName AS receiptName, Deposit.Deposit_Key AS code From Deposit WHERE (((DepositID)=" + rs.Fields("SaleItem_StockItemID").Value + "));";
                                rsItems = modRecordSet.getRS(ref sql);
                                if (rsItems.RecordCount) {
                                    lLineitem.name = rs.Fields("longName").Value + "-Full Case";
                                    lLineitem.receiptName = rs.Fields("receiptName").Value + "(F)";
                                    lLineitem.code = rsItems.Fields("Code").Value + "";
                                }
                                rsItems.Close();
                                break;
                        }
                        lTransaction.lineItems.Add(ref lLineitem);
                        rs.MoveNext();
                    }
                    rs.Close();

                    sql = "SELECT Customer.*, CustomerTransaction.* FROM (CustomerTransaction INNER JOIN Sale ON CustomerTransaction.CustomerTransaction_ReferenceID = Sale.SaleID) INNER JOIN Customer ON CustomerTransaction.CustomerTransaction_CustomerID = Customer.CustomerID WHERE (((Sale.SaleID)=" + lID + "));";
                    rs.Open(sql, cn, ADODB.CursorTypeEnum.adOpenStatic, ADODB.LockTypeEnum.adLockReadOnly, ADODB.CommandTypeEnum.adCmdText);
                    if (rs.RecordCount) {
                        lCustomer.channelID = lTransaction.channelID;
                        lCustomer.creditLimit = rs.Fields("Customer_ChannelID").Value;
                        lCustomer.department = rs.Fields("Customer_DepartmentName").Value + "";
                        lCustomer.fax = rs.Fields("Customer_Fax").Value + "";
                        lCustomer.Key = rs.Fields("CustomerID").Value;
                        lCustomer.name = rs.Fields("Customer_InvoiceName").Value + "";
                        lCustomer.outstanding = 0;
                        lCustomer.person = rs.Fields("Customer_FirstName").Value + " " + rs.Fields("Customer_Surname").Value;
                        lCustomer.physical = rs.Fields("Customer_PhysicalAddress").Value + "";
                        lCustomer.postal = rs.Fields("Customer_PostalAddress").Value + "";
                        lCustomer.signed_Renamed = rs.Fields("CustomerTransaction_PersonName").Value;
                        lCustomer.telephone = rs.Fields("Customer_Telephone").Value + "";
                        lCustomer.terms = Convert.ToInt16(rs.Fields("Customer_Terms").Value + "");
                        lCustomer.tax = rs.Fields("Customer_VatNumber").Value + "";
                        if (rs.Fields("CustomerTransaction_TransactionTypeID").Value == 3) {
                            lTransaction.transactionType = "Payment";
                            lTransaction.paymentDiscount = 0;
                        }
                        lTransaction.customer_Renamed = lCustomer;
                    }
                    rs.Close();
                    sql = "SELECT Consignment.* FROM Consignment INNER JOIN Sale ON Consignment.Consignment_SaleID = Sale.SaleID WHERE (((Sale.SaleID)=" + lID + "));";
                    rs.Open(sql, cn, ADODB.CursorTypeEnum.adOpenForwardOnly, ADODB.LockTypeEnum.adLockReadOnly, ADODB.CommandTypeEnum.adCmdText);
                    if (rs.BOF & rs.EOF) {
                    } else {
                        lSpecial.address = rs.Fields("Consignment_Address").Value;
                        lSpecial.mobile = rs.Fields("Consignment_Mobile").Value;
                        lSpecial.name = rs.Fields("Consignment_Name").Value;
                        lSpecial.quote = 0;
                        lSpecial.saleID = lID;
                        lSpecial.telephone = rs.Fields("Consignment_Number").Value;
                        lSpecial.transactionType = "Consignment";
                        lTransaction.transactionSpecial_Renamed = lSpecial;
                    }
                    rs.Close();

                    sql = "SELECT Consignment.* FROM Consignment INNER JOIN Sale ON Consignment.Consignment_CompleteSaleID = Sale.SaleID WHERE (((Sale.SaleID)=" + lID + "));";
                    rs.Open(sql, cn, ADODB.CursorTypeEnum.adOpenForwardOnly, ADODB.LockTypeEnum.adLockReadOnly, ADODB.CommandTypeEnum.adCmdText);
                    if (rs.BOF & rs.EOF) {
                    } else {
                        lSpecial.address = rs.Fields("Consignment_Address").Value;
                        lSpecial.mobile = rs.Fields("Consignment_Mobile").Value;
                        lSpecial.name = rs.Fields("Consignment_Name").Value;
                        lSpecial.quote = 0;
                        lSpecial.saleID = lID;
                        lSpecial.telephone = rs.Fields("Consignment_Number").Value;
                        lSpecial.transactionType = "Consignment Complete";
                        lTransaction.transactionSpecial_Renamed = lSpecial;
                    }

                    printTransactionA4(ref lTransaction);
                }

            } else if (Convert.ToDouble(Strings.Split(this.lvTransaction.FocusedItem.Name, "_")[3]) == 3) {
                //payment
                //Dim Report As New cryPayment
                Report.Load("cryPayment.rpt");
                rs = modRecordSet.getRS(ref "SELECT * FROM Company");
                Report.SetParameterValue("txtCompanyName", rs.Fields("Company_Name"));
                if (Information.IsDBNull(rs.Fields("Company_PhysicalAddress").Value)) {
                } else {
                    lAddress = Strings.Replace(rs.Fields("Company_PhysicalAddress").Value, Constants.vbCrLf, ", ");
                    if (Strings.Right(lAddress, 2) == ", ") {
                        lAddress = Strings.Left(lAddress, Strings.Len(lAddress) - 2);
                    }
                }
                Report.SetParameterValue("txtCompanyDetails1", lAddress);
                if (Information.IsDBNull(rs.Fields("Company_Telephone").Value)) {
                } else {
                    Report.SetParameterValue("txtCompanyDetails2", rs.Fields("Company_Telephone"));
                }
                if (Information.IsDBNull(rs.Fields("Company_TaxNumber").Value)) {
                } else {
                    Report.SetParameterValue("txtCompanyDetails4", "TAX NO :" + rs.Fields("Company_TaxNumber").Value);
                }
                //If lTransaction.heading2 <> "" Then
                //    Report.txtCompanyDetails2.SetText lTransaction.heading2
                //    If lTransaction.heading3 <> "" Then
                //        Report.txtCompanyDetails3.SetText lTransaction.heading3
                //
                //    Else
                //        If lTransaction.taxNumber <> "" Then
                //            Report.txtCompanyDetails4.SetText "TAX NO :" & lTransaction.taxNumber
                //        End If
                //    End If
                //Else
                //    If lTransaction.heading3 <> "" Then
                //        Report.txtCompanyDetails2.SetText lTransaction.heading3
                //    Else
                //        If lTransaction.taxNumber <> "" Then
                //            Report.txtCompanyDetails2.SetText "TAX NO :" & lTransaction.taxNumber
                //        End If
                //    End If
                //End If
                rs.Close();
                Report.SetParameterValue("txtCustomer", _txtFields_2.Text);
                if (!string.IsNullOrEmpty(_txtFields_6.Text)) {
                    lArray = Strings.Split(_txtFields_6.Text, Constants.vbCrLf);
                    Report.SetParameterValue("txtCustAddress1", lArray[0]);
                    if (Information.UBound(lArray) >= 1)
                        Report.SetParameterValue("txtCustAddress2", lArray[1]);
                    if (Information.UBound(lArray) >= 2)
                        Report.SetParameterValue("txtCustAddress3", lArray[2]);
                    if (Information.UBound(lArray) >= 3)
                        Report.SetParameterValue("txtCustAddress4", lArray[3]);

                }
                if (!string.IsNullOrEmpty(_txtFields_0.Text))
                    Report.SetParameterValue("txtCustAddress5", "TAX NO: " + _txtFields_0.Text);

                //If LCase(databaseName) = "pricing.mdb" Then
                //    sql = "SELECT Sale.SaleID, POS.POS_Name, Person.Person_FirstName, Person.Person_LastName, Sale.Sale_Date, Sale.Sale_DatePOS, Sale.Sale_Reference, Sale.Sale_Total, Sale.Sale_Tender FROM (Sale INNER JOIN POS ON Sale.Sale_PosID = POS.POSID) INNER JOIN Person ON Sale.Sale_PersonID = Person.PersonID WHERE (((Sale.SaleID)=" & lID & "));"
                //Else
                //    sql = "SELECT Sale.SaleID, POS.POS_Name, M_Person.Person_FirstName, M_Person.Person_LastName, Sale.Sale_Date, Sale.Sale_DatePOS, Sale.Sale_Reference, Sale.Sale_Total, Sale.Sale_Tender FROM (Sale INNER JOIN POS ON Sale.Sale_PosID = POS.POSID) INNER JOIN M_Person ON Sale.Sale_PersonID = M_Person.PersonID WHERE (((Sale.SaleID)=" & lID & "));"
                //End If
                //sql = "SELECT Sale.SaleID, POS.POS_Name, Person.Person_FirstName, Person.Person_LastName, Sale.Sale_Date, Sale.Sale_DatePOS, Sale.Sale_Reference, Sale.Sale_Total, Sale.Sale_Tender FROM (Sale INNER JOIN POS ON Sale.Sale_PosID = POS.POSID) INNER JOIN Person ON Sale.Sale_PersonID = Person.PersonID WHERE (((Sale.SaleID)=" & lID & "));"
                sql = "SELECT Sale.* From Sale WHERE (((SaleID)=" + lID + "));";
                rs.Open(sql, cn, ADODB.CursorTypeEnum.adOpenStatic, ADODB.LockTypeEnum.adLockReadOnly, ADODB.CommandTypeEnum.adCmdText);

                if (rs.RecordCount) {
                    posID = rs.Fields("Sale_PosID").Value;
                    personID = rs.Fields("Sale_PersonID").Value;
                    Report.SetParameterValue("txtInvoiceNumber", rs.Fields("Sale_Reference"));
                    Report.SetParameterValue("txtInvoiceDate", Strings.Format(rs.Fields("Sale_DatePOS").Value, "dd mmm yyyy hh:mm"));
                    //Report.txtPOS.SetText rs("POS_Name")
                    //Report.txtCashier.SetText rs("Person_FirstName") & rs("Person_LastName")
                    Report.SetParameterValue("txtAmount", Strings.FormatNumber(rs.Fields("Sale_Total").Value, 2));
                    Report.SetParameterValue("txtChange", Strings.FormatNumber(rs.Fields("Sale_Tender").Value - rs.Fields("Sale_Total").Value, 2));
                    // lTransaction.paymentTotal - lTransaction.paymentTender, 2)
                    Report.SetParameterValue("txtTender", Strings.FormatNumber(rs.Fields("Sale_Tender").Value, 2));
                    //  lTransaction.paymentTender, 2)
                    //Report.txtPaidBy.SetText lTransaction.customer.signed
                    Report.ReportDefinition.Sections("txtPaidBy").SectionFormat.EnableSuppress = true;
                    rs.Close();

                    sql = "SELECT [Person_FirstName] & ' ' & [Person_LastName] AS personName From Person WHERE (((PersonID)=" + personID + "));";
                    rs = modRecordSet.getRS(ref sql);
                    if (rs.RecordCount) {
                        Report.SetParameterValue("txtCashier", rs.Fields("personName").Value + "");
                    }
                    rs.Close();

                    sql = "SELECT POS_Name From POS WHERE (((POS.POSID)=" + posID + "));";
                    rs = modRecordSet.getRS(ref sql);
                    if (rs.RecordCount) {
                        Report.SetParameterValue("txtPOS", rs.Fields("POS_Name").Value + "");
                    }
                    rs.Close();

                    sql = "SELECT CustomerTransaction.CustomerTransaction_TransactionTypeID, CustomerTransaction.CustomerTransaction_Amount, CustomerTransaction.CustomerTransaction_ReferenceID From CustomerTransaction WHERE (((CustomerTransaction.CustomerTransaction_TransactionTypeID)=8) AND ((CustomerTransaction.CustomerTransaction_ReferenceID)=" + lID + "));";
                    Debug.Print(sql);
                    rs.Open(sql, cn, ADODB.CursorTypeEnum.adOpenStatic, ADODB.LockTypeEnum.adLockReadOnly, ADODB.CommandTypeEnum.adCmdText);
                    if (rs.RecordCount) {
                        Report.SetParameterValue("txtSettlement", Strings.FormatNumber(rs.Fields("CustomerTransaction_Amount").Value, 2));
                    } else {
                        Report.SetParameterValue("txtSettlement", Strings.FormatNumber("0.00", 2));
                    }

                    My.MyProject.Forms.frmReportShow.Text = "Customer Statement";
                    My.MyProject.Forms.frmReportShow.CRViewer1.ReportSource = Report;
                    My.MyProject.Forms.frmReportShow.mReport = Report;
                    My.MyProject.Forms.frmReportShow.sMode = "0";
                    My.MyProject.Forms.frmReportShow.CRViewer1.Refresh();
                    System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default;
                    My.MyProject.Forms.frmReportShow.ShowDialog();
                } else {
                    ReportNone.Load("cryNoRecords.rpt");
                    ReportNone.SetParameterValue("txtCompanyName", rs.Fields("Company_Name"));
                    ReportNone.SetParameterValue("txtTitle", "Customer Statement");
                    //UPGRADE_WARNING: Couldn't resolve default property of object ReportNone.txtTitle. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                    My.MyProject.Forms.frmReportShow.Text = ReportNone.ParameterFields("txtTitle").ToString;
                    My.MyProject.Forms.frmReportShow.CRViewer1.ReportSource = ReportNone;
                    My.MyProject.Forms.frmReportShow.mReport = ReportNone;
                    My.MyProject.Forms.frmReportShow.sMode = "0";
                    My.MyProject.Forms.frmReportShow.CRViewer1.Refresh();
                    System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default;
                    My.MyProject.Forms.frmReportShow.ShowDialog();
                    return;
                }

            }
        }
예제 #4
0
        public Collection search(ref string searchString)
        {
            string lString = null;
            customer customer_Renamed = null;
            short lExit = 0;
             // ERROR: Not supported in C#: OnErrorStatement

            mCol = new Collection();
            lString = Strings.Trim(searchString);
            lString = Strings.Replace(lString, "  ", " ");
            lString = Strings.Replace(lString, "  ", " ");
            lString = Strings.Replace(lString, "  ", " ");
            lString = Strings.Replace(lString, "  ", " ");
            lString = Strings.Replace(lString, "  ", " ");
            lString = Strings.Replace(lString, "  ", " ");

            if (!string.IsNullOrEmpty(lString)) {
                lString = Strings.Replace(lString, "'", "''");
                lString = "(Customer_InvoiceName LIKE '%" + Strings.Replace(lString, " ", "%' AND Customer_InvoiceName LIKE '%") + "%')";
            } else {
                lString = "";
            }
            gRS.filter = lString;

            if (gRS.RecordCount <= 0) {
                lString = Strings.Trim(searchString);
                lString = Strings.Replace(lString, "  ", " ");
                lString = Strings.Replace(lString, "  ", " ");
                lString = Strings.Replace(lString, "  ", " ");
                lString = Strings.Replace(lString, "  ", " ");
                lString = Strings.Replace(lString, "  ", " ");
                lString = Strings.Replace(lString, "  ", " ");
                if (!string.IsNullOrEmpty(lString)) {
                    lString = Strings.Replace(lString, "'", "''");
                    lString = "(Customer_Surname LIKE '%" + Strings.Replace(lString, " ", "%' AND Customer_Surname LIKE '%") + "%')";
                } else {
                    lString = "";
                }
                gRS.filter = lString;
            }

            while (!(gRS.EOF)) {
                customer_Renamed = new customer();
                customer_Renamed.Key = gRS.Fields("CustomerID").Value;
                customer_Renamed.channelID = gRS.Fields("Customer_ChannelID").Value;
                customer_Renamed.creditLimit = gRS.Fields("Customer_CreditLimit").Value;
                customer_Renamed.department = gRS.Fields("Customer_DepartmentName").Value + "";
                customer_Renamed.fax = gRS.Fields("Customer_Fax").Value + "";
                customer_Renamed.name = gRS.Fields("Customer_InvoiceName").Value;
                customer_Renamed.outstanding = gRS.Fields("balance").Value;
                customer_Renamed.person = gRS.Fields("Customer_FirstName").Value + " " + gRS.Fields("Customer_Surname").Value;
                customer_Renamed.physical = gRS.Fields("Customer_PhysicalAddress").Value + "";
                customer_Renamed.postal = gRS.Fields("Customer_PostalAddress").Value + "";
                customer_Renamed.signed_Renamed = customer_Renamed.person;
                customer_Renamed.telephone = gRS.Fields("Customer_Telephone").Value + "";
                customer_Renamed.terms = gRS.Fields("Customer_Terms").Value;
                customer_Renamed.tax = gRS.Fields("Customer_VATNumber").Value + "";
                mCol.Add(customer_Renamed, "k" + customer_Renamed.Key);
                lExit = lExit + 1;
                if (lExit == 50)
                    break; // TODO: might not be correct. Was : Exit Do
                gRS.moveNext();

            }
            return mCol;
        }
예제 #5
0
        public void loadCurrent(ref string lPath = "")
        {
            int intLineNo = 0;
            int prTender = 0;
            int y = 0;
            string gPath = null;
            Scripting.FileSystemObject fso = new Scripting.FileSystemObject();
            Scripting.TextStream textstream = default(Scripting.TextStream);
            //UPGRADE_NOTE: lineitem was upgraded to lineitem_Renamed. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="A9E4979A-37FA-4718-9994-97DD76ED70A7"'
            lineItem lineitem_Renamed = null;
            //UPGRADE_NOTE: customer was upgraded to customer_Renamed. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="A9E4979A-37FA-4718-9994-97DD76ED70A7"'
            customer customer_Renamed = null;
            //UPGRADE_NOTE: transactionSpecial was upgraded to transactionSpecial_Renamed. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="A9E4979A-37FA-4718-9994-97DD76ED70A7"'
            transactionSpecial transactionSpecial_Renamed = null;
            string lString = null;
            string[] dataArray = null;
            string[] lineArray = null;
            int x = 0;
            bool bool1 = false;
            //UPGRADE_NOTE: Object mvarcustomer may not be destroyed until it is garbage collected. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6E35BFF6-CD74-4B09-9689-3E1A43DF8969"'
            mvarcustomer = null;
            //UPGRADE_NOTE: Object mvartransactionSpecial may not be destroyed until it is garbage collected. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6E35BFF6-CD74-4B09-9689-3E1A43DF8969"'
            mvartransactionSpecial = null;
            //UPGRADE_NOTE: Object mvarlineitems may not be destroyed until it is garbage collected. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6E35BFF6-CD74-4B09-9689-3E1A43DF8969"'
            mvarlineitems = null;

            //On Local Error Resume Next
             // ERROR: Not supported in C#: OnErrorStatement

            bool1 = false;

            //UPGRADE_WARNING: Couldn't resolve default property of object gPath. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            if (string.IsNullOrEmpty(lPath))
                lPath = gPath + "current.tra";
            string[] lArray = null;
            if (fso.FileExists(lPath)) {
                textstream = fso.OpenTextFile(lPath, Scripting.IOMode.ForReading, true);
                lString = textstream.ReadAll;
                //UPGRADE_WARNING: Couldn't resolve default property of object dataArray. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                dataArray = Strings.Split(lString, Strings.Chr(255));
                for (x = Information.LBound(dataArray); x <= Information.UBound(dataArray); x++) {

                    //UPGRADE_WARNING: Couldn't resolve default property of object dataArray(x). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                    if (!string.IsNullOrEmpty(dataArray[x])) {
                        //UPGRADE_WARNING: Couldn't resolve default property of object dataArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                        //UPGRADE_WARNING: Couldn't resolve default property of object lineArray. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                        lineArray = Strings.Split(dataArray[x], Strings.Chr(254));
                        switch (lineArray[0]) {
                            case "tran":
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                mvarchannelID = lineArray[3];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                mvarcashierID = lineArray[1];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                mvarcashierName = lineArray[2];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                mvarchannelID = lineArray[3];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                mvarcompanyName = lineArray[4];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                mvardeleted = lineArray[5];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                mvarfooter = lineArray[6];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                mvarheading1 = lineArray[7];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                mvarheading2 = lineArray[8];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                mvarheading3 = lineArray[9];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                mvarmanagerID = lineArray[10];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                mvarmanagerName = lineArray[11];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                mvarpaymentDiscount = lineArray[12];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                mvarpaymentSlip = lineArray[13];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                mvarpaymentSubTotal = lineArray[14];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                mvarpaymentTender = lineArray[15];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                mvarpaymentTotal = lineArray[16];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                mvarpaymentType = lineArray[17];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                mvarposID = lineArray[18];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                mvarposName = lineArray[19];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                mvartaxNumber = lineArray[20];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                mvartransactionDate = lineArray[21];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                mvartransactionID = lineArray[22];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                mvartransactionType = lineArray[23];

                                //Additional Code
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                mvarCard = lineArray[26];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                mvarSerial = lineArray[27];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                mvarOrder = lineArray[28];

                                //Additional Split
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                mvarSplitCash = lineArray[29];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                mvarSplitDebit = lineArray[30];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                mvarSplitCredit = lineArray[31];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                mvarSplitCheque = lineArray[32];

                                //For Gratuity
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                mvarpaymentGratuity = lineArray[33];
                                //For DisChk
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                mvarDisChk = lineArray[34];

                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(35). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                if (Information.UBound(lineArray) > 34 & !string.IsNullOrEmpty(lineArray[35])) {
                                    //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                    //UPGRADE_WARNING: Couldn't resolve default property of object lArray. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                    lArray = Strings.Split(lineArray[35], "/");
                                    mvardeposit = new int[Information.UBound(lArray) + 1];

                                    for (y = 1; y <= Information.UBound(lArray); y++) {
                                        //UPGRADE_WARNING: Couldn't resolve default property of object y. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                        //UPGRADE_WARNING: Couldn't resolve default property of object lArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                        mvardeposit[y] = lArray[y];
                                    }
                                }
                                break;

                            case "spec":
                                transactionSpecial_Renamed = new transactionSpecial();
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                transactionSpecial_Renamed.address = lineArray[1];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                transactionSpecial_Renamed.mobile = lineArray[2];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                transactionSpecial_Renamed.name = lineArray[3];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                transactionSpecial_Renamed.quote = lineArray[4];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                transactionSpecial_Renamed.saleID = lineArray[5];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                transactionSpecial_Renamed.telephone = lineArray[6];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                transactionSpecial_Renamed.transactionType = lineArray[7];
                                mvartransactionSpecial = transactionSpecial_Renamed;
                                break;

                            case "cust":
                                customer_Renamed = new customer();
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                customer_Renamed.channelID = lineArray[1];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                customer_Renamed.creditLimit = lineArray[2];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                customer_Renamed.department = lineArray[3];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                customer_Renamed.fax = lineArray[4];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                customer_Renamed.Key = lineArray[5];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                customer_Renamed.name = lineArray[6];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                customer_Renamed.outstanding = lineArray[7];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                customer_Renamed.person = lineArray[8];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                customer_Renamed.physical = lineArray[9];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                customer_Renamed.postal = lineArray[10];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                customer_Renamed.signed_Renamed = lineArray[11];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                customer_Renamed.telephone = lineArray[12];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                customer_Renamed.terms = lineArray[13];

                                if (Information.UBound(lineArray) == 14) {
                                    //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                    customer_Renamed.tax = lineArray[14];
                                } else {
                                    customer_Renamed.tax = "";
                                }

                                mvarcustomer = customer_Renamed;
                                break;
                            case "item":
                                lineitem_Renamed = new lineItem();
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                lineitem_Renamed.build = lineArray[1];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                lineitem_Renamed.code = lineArray[2];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                lineitem_Renamed.depositType = lineArray[3];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                lineitem_Renamed.id = lineArray[4];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                lineitem_Renamed.lineNo = lineArray[5];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                lineitem_Renamed.name = lineArray[6];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                lineitem_Renamed.originalPrice = lineArray[7];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                lineitem_Renamed.price = lineArray[8];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                lineitem_Renamed.quantity = lineArray[9];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                lineitem_Renamed.receiptName = lineArray[10];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                lineitem_Renamed.dataType = lineArray[11];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                lineitem_Renamed.reversal = lineArray[12];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                lineitem_Renamed.revoke = lineArray[13];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                lineitem_Renamed.setBuild = lineArray[14];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                lineitem_Renamed.shrink = lineArray[15];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                lineitem_Renamed.transactionType = lineArray[16];

                                modRecordSet.intCur = modRecordSet.intCur + 1;
                                //UPGRADE_WARNING: Couldn't resolve default property of object prTender. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                prTender = true;
                                bool1 = true;

                                //On Local Error Resume Next
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                lineitem_Renamed.vat = lineArray[17];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                lineitem_Renamed.increment = lineArray[18];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                lineitem_Renamed.cashPrice = lineArray[19];
                                //changed for airtime
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                lineitem_Renamed.sPin = lineArray[20];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                lineitem_Renamed.sSerial = lineArray[21];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                lineitem_Renamed.sExpiry = lineArray[22];
                                //UPGRADE_WARNING: Couldn't resolve default property of object lineArray(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                                lineitem_Renamed.atitem = lineArray[23];
                                //changed for airtime
                                mvarlineitems.Add(ref lineitem_Renamed);
                                break;

                        }
                    }
                }
            }

            if (bool1 == true) {

                //UPGRADE_WARNING: Couldn't resolve default property of object intLineNo. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                intLineNo = lineitem_Renamed.lineNo;
            } else {
                //UPGRADE_WARNING: Couldn't resolve default property of object intLineNo. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                intLineNo = 0;
            }

            return;
            Load_Err:
            Interaction.MsgBox(Err().Number + " : " + Err().Description);
             // ERROR: Not supported in C#: ResumeStatement
        }