Exemple #1
0
        private void DataList1_DblClick(System.Object eventSender, System.EventArgs eventArgs)
        {
            // ERROR: Not supported in C#: OnErrorStatement

            if (string.IsNullOrEmpty(DataList1.BoundText))
            {
                return;
            }
            int lID = 0;

            lID = Convert.ToInt32(DataList1.BoundText);
            switch (gSection)
            {
            case -1:
                gID = Convert.ToInt32(DataList1.BoundText);
                this.Close();
                break;

            case 0:
                My.MyProject.Forms.frmStockItem.loadItem(ref Convert.ToInt32(DataList1.BoundText));
                //* Hiding frmstocklist
                //        frmStockList.Hide
                //*
                frmStockItem formIten = null;
                formIten.Show();
                break;

            case 1:
                My.MyProject.Forms.frmStockPricing.loadItem(ref Convert.ToInt32(DataList1.BoundText));
                //* Hiding Stocklist
                //        frmStockList.Hide
                //*
                frmStockPricing formPrice = null;
                formPrice.Show();
                break;
            }
            if (modApplication.blNextItem == true)
            {
                gRS.Requery();
                //UPGRADE_NOTE: Refresh was upgraded to CtlRefresh. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="A9E4979A-37FA-4718-9994-97DD76ED70A7"'
                DataList1.CtlRefresh();
                modApplication.blNextItem = false;
            }
        }
Exemple #2
0
        private void doSearchBC()
        {
            ADODB.Recordset rj      = default(ADODB.Recordset);
            string          sql     = null;
            string          lString = null;

            // ERROR: Not supported in C#: OnErrorStatement


            lString = Strings.Trim(txtBCode.Text);
            lString = Strings.Replace(lString, "  ", " ");
            lString = Strings.Replace(lString, "  ", " ");
            lString = Strings.Replace(lString, "  ", " ");
            lString = Strings.Replace(lString, "  ", " ");
            lString = Strings.Replace(lString, "  ", " ");
            lString = Strings.Replace(lString, "  ", " ");

            int lID = 0;

            if (string.IsNullOrEmpty(Strings.Trim(lString)))
            {
            }
            else
            {
                txtBCode.SelectionStart  = 0;
                txtBCode.SelectionLength = 999;

                rj = modRecordSet.getRS(ref "SELECT Catalogue.Catalogue_StockItemID, Catalogue.Catalogue_Barcode, StockItem.StockItemID, StockItem.StockItem_Name FROM Catalogue INNER JOIN StockItem ON Catalogue.Catalogue_StockItemID = StockItem.StockItemID WHERE (((Catalogue.Catalogue_Barcode)='" + lString + "') AND ((Catalogue.Catalogue_Disabled)=False));");
                if (rj.RecordCount > 0)
                {
                    txtSearch.Text = rj.Fields("StockItem_Name").Value;
                    //doSearch

                    //If DataList1.BoundText = "" Then Exit Sub
                    lID = rj.Fields("Catalogue_StockItemID").Value;
                    //DataList1.BoundText
                    switch (gSection)
                    {
                    case -1:
                        gID = rj.Fields("Catalogue_StockItemID").Value;
                        //DataList1.BoundText
                        this.Close();
                        break;

                    case 0:
                        My.MyProject.Forms.frmStockItem.loadItem(ref rj.Fields("Catalogue_StockItemID").Value);
                        //DataList1.BoundText
                        //* Hiding frmstocklist
                        this.Hide();
                        //*
                        frmStockItem formItem = null;
                        formItem.Show();
                        break;

                    case 1:
                        My.MyProject.Forms.frmStockPricing.loadItem(ref rj.Fields("Catalogue_StockItemID").Value);
                        // DataList1.BoundText
                        //* Hiding Stocklist
                        this.Hide();
                        //*
                        frmStockPricing formPrice = null;
                        formPrice.Show();
                        break;
                    }
                    //gRS.Requery
                    //DataList1.Refresh
                }
            }
        }