当前位置: 首页>>代码示例>>C#>>正文


C# ADODB.Recordset类代码示例

本文整理汇总了C#中ADODB.Recordset的典型用法代码示例。如果您正苦于以下问题:C# ADODB.Recordset类的具体用法?C# ADODB.Recordset怎么用?C# ADODB.Recordset使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ADODB.Recordset类属于命名空间,在下文中一共展示了ADODB.Recordset类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: db_access

        public object[] db_access(string strSQL)
        {
            ADODB.Connection objCon;
            ADODB.Recordset objRec;
            object[,] dataRows;
            object[] dataSuite;
            string strCon;

            objCon = new ADODB.Connection();
            objRec = new ADODB.Recordset();

            //establish the connection string and open the database connection
            strCon = "driver={MySQL ODBC 5.1 Driver};server=107.22.232.228;uid=qa_people;pwd=thehandcontrols;" +
                "database=functional_test_data;option=3";

            objCon.Open(strCon);

            //execute the SQL and return the recrodset of results
            objRec = objCon.Execute(strSQL, out missing, 0);

            //populate a two dinmensional object array with the results
            dataRows = objRec.GetRows();

            //get a one dimensional array that can be placed into the Test Suite dropdown
            dataSuite = thinArray(dataRows);

            //close the recordset
            objRec.Close();

            //close the database connection
            objCon.Close();

            return dataSuite;
        }
开发者ID:modulexcite,项目名称:StudentSuccessDashboard,代码行数:34,代码来源:dbUpdater.cs

示例2: LoadAll

		override internal void LoadAll()
		{
			ADODB.Connection cnn = new ADODB.Connection();
			ADODB.Recordset rs = new ADODB.Recordset();
			ADOX.Catalog cat = new ADOX.Catalog();
    
			// Open the Connection
			cnn.Open(dbRoot.ConnectionString, null, null, 0);
			cat.ActiveConnection = cnn;

			ADOX.Procedure proc = cat.Procedures[this.Procedure.Name];
       
			// Retrieve Parameter information
			rs.Source = proc.Command as ADODB.Command;
			rs.Fields.Refresh();

			Pervasive.PervasiveResultColumn resultColumn;

			if(rs.Fields.Count > 0)
			{
				int ordinal = 0;
			
				foreach(ADODB.Field field in rs.Fields)
				{
					resultColumn = this.dbRoot.ClassFactory.CreateResultColumn() as Pervasive.PervasiveResultColumn;
					resultColumn.dbRoot = this.dbRoot;
					resultColumn.ResultColumns = this;

					resultColumn.name = field.Name;
					resultColumn.ordinal = ordinal++;
					resultColumn.typeName = field.Type.ToString();

					this._array.Add(resultColumn);
				}
			}

			cnn.Close();
		}
开发者ID:attila3453,项目名称:alsing,代码行数:38,代码来源:ResultColumns.cs

示例3: cmdPrev_Click

        private void cmdPrev_Click(System.Object eventSender, System.EventArgs eventArgs)
        {
            string sql = null;
            string lString = null;

            mID_Renamed = 0;
            mID_Renamed = My.MyProject.Forms.frmMonthendList.getItem(ref 7);
            if (mID_Renamed) {
                gRS = modRecordSet.getRS(ref "SELECT DayEnd.DayEndID, Format([DayEnd_Date],'ddd dd mmm yyyy') AS theDay FROM DayEnd WHERE DayEnd.DayEnd_MonthEndID = " + mID_Renamed + " ORDER BY DayEnd.DayEndID DESC;");
                //Display the list of Titles in the DataCombo
                DataList1.DataSource = gRS;
                DataList1.listField = "theDay";

                //Bind the DataCombo to the ADO Recordset
                //UPGRADE_ISSUE: VBControlExtender property DataList1.DataSource is not supported at runtime. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="74E732F3-CAD8-417B-8BC9-C205714BB4A7"'
                DataList1.DataSource = gRS;
                DataList1.boundColumn = "DayEndID";
            } else {
                gRS = modRecordSet.getRS(ref "SELECT DayEnd.DayEndID, Format([DayEnd_Date],'ddd dd mmm yyyy') AS theDay FROM Company AS Company_1 INNER JOIN (Company RIGHT JOIN DayEnd ON Company.Company_DayEndID = DayEnd.DayEndID) ON Company_1.Company_MonthEndID = DayEnd.DayEnd_MonthEndID Where (((Company.CompanyID) Is Null)) ORDER BY DayEnd.DayEndID DESC;");
                //Display the list of Titles in the DataCombo
                DataList1.DataSource = gRS;
                DataList1.listField = "theDay";

                //Bind the DataCombo to the ADO Recordset
                DataList1.DataSource = gRS;
                DataList1.boundColumn = "DayEndID";
            }
        }
开发者ID:nodoid,项目名称:PointOfSale,代码行数:28,代码来源:frmDayEndListNew.cs

示例4: RefreshLoad

        public object RefreshLoad(ref short Index)
        {
            // ERROR: Not supported in C#: OnErrorStatement

            ADODB.Recordset rs = default(ADODB.Recordset);
            ADODB.Recordset rst = default(ADODB.Recordset);

            rs = new ADODB.Recordset();

            rst = new ADODB.Recordset();
            //TheSelectedPrinterNew = 0
            rs = modRecordSet.getRS(ref "SELECT * FROM Label WHERE Label.Label_Type=" + Index + " ORDER BY LabelID");

            DataList1.DataSource = rs;
            DataList1.listField = "Label_Name";

            //Bind the DataCombo to the ADO Recordset

            //UPGRADE_ISSUE: VBControlExtender property DataList1.DataSource is not supported at runtime. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="74E732F3-CAD8-417B-8BC9-C205714BB4A7"'
            DataList1.DataSource = rs;
            DataList1.boundColumn = "LabelID";
            //if the Type was Shelf Talker set option button to true else set Barcode option button to true
            if (modApplication.TheType == 1) {
                this.option1[1].Checked = true;
            } else if (modApplication.TheType == 2) {
                this.option1[2].Checked = true;
            }

            loadLanguage();
            this.ShowDialog();
        }
开发者ID:nodoid,项目名称:PointOfSale,代码行数:31,代码来源:frmDesign.cs

示例5: loadADORecordset

 public static ADODB.Recordset loadADORecordset(string filepath)
 {
     ADODB.Recordset record = new ADODB.Recordset();
     const int adCmdFile = 256;
     ((ADODB.Recordset)record).Open(filepath, "Provider=MSPersist;", ADODB.CursorTypeEnum.adOpenDynamic, ADODB.LockTypeEnum.adLockOptimistic, adCmdFile);
     return record;
 }
开发者ID:mescalitog,项目名称:xTangoFacturas,代码行数:7,代码来源:Commons.cs

示例6: loadItem

        public void loadItem()
        {
            ADODB.Recordset rj = default(ADODB.Recordset);
            System.Windows.Forms.CheckBox oCheck = null;

            adoPrimaryRS = modRecordSet.getRS(ref "SELECT Company_HOParamBit FROM Company");

            const short gReOrderLvl = 1;
            const short gEmployeePer = 2;
            const short gWaitronCount = 4;
            const short gActualCost = 8;
            const short gPromotion = 16;
            const short gRecipe = 32;

             // ERROR: Not supported in C#: OnErrorStatement

            //Bind the check boxes to the data provider
            this._chkBit_1.CheckState = System.Math.Abs(Convert.ToInt32(Convert.ToBoolean(adoPrimaryRS.Fields("Company_HOParamBit").Value & gReOrderLvl)));
            this._chkBit_2.CheckState = System.Math.Abs(Convert.ToInt32(Convert.ToBoolean(adoPrimaryRS.Fields("Company_HOParamBit").Value & gEmployeePer)));
            this._chkBit_3.CheckState = System.Math.Abs(Convert.ToInt32(Convert.ToBoolean(adoPrimaryRS.Fields("Company_HOParamBit").Value & gWaitronCount)));
            this._chkBit_4.CheckState = System.Math.Abs(Convert.ToInt32(Convert.ToBoolean(adoPrimaryRS.Fields("Company_HOParamBit").Value & gActualCost)));
            this._chkBit_5.CheckState = System.Math.Abs(Convert.ToInt32(Convert.ToBoolean(adoPrimaryRS.Fields("Company_HOParamBit").Value & gPromotion)));
            this._chkBit_6.CheckState = System.Math.Abs(Convert.ToInt32(Convert.ToBoolean(adoPrimaryRS.Fields("Company_HOParamBit").Value & gRecipe)));

            ShowDialog();
        }
开发者ID:nodoid,项目名称:PointOfSale,代码行数:26,代码来源:frmMainHOParam.cs

示例7: getRSwaitron

 public static ADODB.Recordset getRSwaitron(ref object sql, ref ADODB.Connection cn)
 {
     ADODB.Recordset functionReturnValue = default(ADODB.Recordset);
     functionReturnValue = new ADODB.Recordset();
     functionReturnValue.CursorLocation = ADODB.CursorLocationEnum.adUseClient;
     functionReturnValue.Open(sql, cn, ADODB.CursorTypeEnum.adOpenStatic, ADODB.LockTypeEnum.adLockOptimistic);
     return functionReturnValue;
 }
开发者ID:nodoid,项目名称:PointOfSale,代码行数:8,代码来源:modRecordSet.cs

示例8: getRS

 public static ADODB.Recordset getRS(ref string sql)
 {
     ADODB.Recordset functionReturnValue = default(ADODB.Recordset);
     functionReturnValue = new ADODB.Recordset();
     functionReturnValue.CursorLocation = ADODB.CursorLocationEnum.adUseClient;
     functionReturnValue.Open(sql, cnnDB, ADODB.CursorTypeEnum.adOpenStatic, ADODB.LockTypeEnum.adLockOptimistic, -1);
     return functionReturnValue;
     //Debug.Print(sql)
 }
开发者ID:nodoid,项目名称:PointOfSale,代码行数:9,代码来源:modRecordSet.cs

示例9: loadFilter

        public bool loadFilter(ref string filter_Renamed)
        {
            bool functionReturnValue = false;
            ADODB.Recordset rs = new ADODB.Recordset();
            ADODB.Recordset RSitem = new ADODB.Recordset();
            short lCNT = 0;
            rs = modRecordSet.getRS(ref "SELECT * From ftOrderSet Where (((ftSet_Group) = 'order')) ORDER BY ftSet_Order;");
            if (rs.BOF | rs.EOF) {
                functionReturnValue = false;
            } else {
                lCNT = -1;
                objectArray = new object[rs.RecordCount];
                while (!(rs.EOF)) {
                    lCNT = lCNT + 1;
                    switch (rs.Fields("ftset_type").Value) {
                        case 2:

                            if (lCNT) {
                                //_frmList_0.
                                //frmList.Load(lCNT)
                                //cmdList.Load(lCNT)
                                cmdList[lCNT].Parent = _frmList_0;
                                //lblList.Load(lCNT)
                                _lblList_0.Parent = _frmList_0;
                            }

                            _frmList_0.Visible = true;
                            _cmdList_0.Visible = true;
                            _lblList_0.Visible = true;
                            if (lCNT)
                                _frmList_0.Top = sizeConvertors.twipsToPixels(lCNT * sizeConvertors.pixelToTwips(_frmList_0.Height, false) + sizeConvertors.pixelToTwips(_frmList_0.Top, false), false);
                            _frmList_0.Text = rs.Fields("ftset_DisplayName").Value;
                            _frmList_0.Tag = rs.Fields("ftset_Name").Value;
                            _lblList_0.Text = "";
                            RSitem = modRecordSet.getRS(ref "SELECT ftData_Heading From ftOrder WHERE (ftData_PersonID = " + modRecordSet.gPersonID + ") AND (ftData_FieldName = '" + Strings.Replace(_frmList_0.Tag, "'", "''") + "')");
                            if (RSitem.BOF | RSitem.EOF) {
                            } else {
                                _lblList_0.Text = RSitem.Fields("ftData_Heading").Value;
                            }

                            objectArray[lCNT] = _frmList_0;

                            break;
                    }
                    rs.MoveNext();
                }
                this.Height = sizeConvertors.twipsToPixels(objectArray[Information.UBound(objectArray)].Top + objectArray[Information.UBound(objectArray)].Height + 1000, false);

                loadLanguage();
                ShowDialog();
                functionReturnValue = true;
            }
            return functionReturnValue;
        }
开发者ID:nodoid,项目名称:PointOfSale,代码行数:54,代码来源:frmFilterOrder.cs

示例10: loadItem

        public void loadItem(ref int id)
        {
            ADODB.Recordset rs = default(ADODB.Recordset);
            int lID = 0;
            System.Windows.Forms.TextBox oText = null;
            System.Windows.Forms.CheckBox oCheck = null;
             // ERROR: Not supported in C#: OnErrorStatement

            if (id) {
                adoPrimaryRS = modRecordSet.getRS(ref "SELECT PriceSet.PriceSetID, PriceSet.PriceSet_Name, PriceSet.PriceSet_StockItemID, PriceSet.PriceSet_Disabled From PriceSet WHERE (((PriceSet.PriceSetID)=" + id + "));");
            } else {
                adoPrimaryRS = modRecordSet.getRS(ref "select * from [PriceSet]");
                adoPrimaryRS.AddNew();
                this.Text = this.Text + "[New Record]";
                mbAddNewFlag = true;
            }
            setup();

            foreach (TextBox oText_loopVariable in txtFields) {
                oText = oText_loopVariable;
                oText.DataBindings.Add(adoPrimaryRS);
                oText.MaxLength = adoPrimaryRS.Fields(oText.DataBindings).DefinedSize;
            }

            //Bind the check boxes to the data provider
            foreach (CheckBox oCheck_loopVariable in chkFields) {
                oCheck = oCheck_loopVariable;
                lID = adoPrimaryRS.Fields("PriceSet_StockItemID").Value;
                if (lID != 0) {
                    rs = modRecordSet.getRS(ref "SELECT StockItem.StockItem_Name FROM StockItem WHERE (StockItemID = " + lID + ")");
                    if (rs.BOF | rs.EOF) {
                        this.lblStockItem.Text = "No Stock Item Selected ...";
                        this.lblStockItem.Tag = 0;
                    } else {
                        this.lblStockItem.Text = rs("StockItem_Name");
                        this.lblStockItem.Tag = lID;
                    }

                }
                oCheck.DataBindings.Add(adoPrimaryRS);
            }
            if (_chkFields_0.CheckState == 2)
                _chkFields_0.CheckState = System.Windows.Forms.CheckState.Unchecked;
            buildDataControls();
            mbDataChanged = false;
            setup();

            loadLanguage();
            ShowDialog();
        }
开发者ID:nodoid,项目名称:PointOfSale,代码行数:50,代码来源:frmPriceSet.cs

示例11: MyLoad

        public object MyLoad()
        {
            ADODB.Recordset rs = default(ADODB.Recordset);
            ADODB.Recordset rst = new ADODB.Recordset();

            rs = modRecordSet.getRS(ref "SELECT * FROM Label WHERE Label.Label_Type=" + 2 + "");

            DataList1.DataSource = rs;
            DataList1.listField = "Label_Name";

            //Bind the DataCombo to the ADO Recordset
            //UPGRADE_ISSUE: VBControlExtender property DataList1.DataSource is not supported at runtime. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="74E732F3-CAD8-417B-8BC9-C205714BB4A7"'
            DataList1.DataSource = rs;
            DataList1.boundColumn = "LabelID";

            loadLanguage();
            this.ShowDialog();
        }
开发者ID:nodoid,项目名称:PointOfSale,代码行数:18,代码来源:frmDesign.cs

示例12: getRSreport

        public static ADODB.Recordset getRSreport(ref string sql)
        {
            ADODB.Recordset functionReturnValue = default(ADODB.Recordset);
            string Path = null;
            string strDBPath = null;
             // ERROR: Not supported in C#: OnErrorStatement

            functionReturnValue = new ADODB.Recordset();
            functionReturnValue.CursorLocation = ADODB.CursorLocationEnum.adUseClient;
            Debug.Print(sql);
            functionReturnValue.Open(sql, cnnDBreport, ADODB.CursorTypeEnum.adOpenStatic, ADODB.LockTypeEnum.adLockOptimistic);
            return functionReturnValue;
            getRSreport_Error:

            if (cnnDBreport == null) {
                Interaction.MsgBox(Err().Number + " " + Err().Description + " " + Err().Source + Constants.vbCrLf + Constants.vbCrLf + " cnnDBreport object has not been made.");
            } else if (Err().Description == "Not a valid password.") {
                Interaction.MsgBox("Error while getRSreport and Error is :" + Err().Number + " " + Err().Description + " " + Err().Source + Constants.vbCrLf + Constants.vbCrLf + cnnDBreport.ConnectionString + Constants.vbCrLf + Constants.vbCrLf + " --- " + cnnDBreport.State);

                modRecordSet.cnnDB.Close();
                //UPGRADE_NOTE: Object cnnDB 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"'
                modRecordSet.cnnDB = null;
                modRecordSet.cnnDB = new ADODB.Connection();
                //UPGRADE_WARNING: Couldn't resolve default property of object strDBPath. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                strDBPath = modRecordSet.serverPath + "pricing.mdb";
                //UPGRADE_WARNING: Couldn't resolve default property of object strDBPath. 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 Path. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                Path = strDBPath + ";Jet " + "OLEDB:Database Password=lqd";
                //cnnDB.CursorLocation = adUseClient
                //UPGRADE_WARNING: Couldn't resolve default property of object Path. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                modRecordSet.cnnDB.Open("Provider=Microsoft.ACE.OLEDB.12.0;Mode=Share Deny Read|Share Deny Write;Persist Security Info=False;Data Source= " + Path);
                modRecordSet.cnnDB.Execute("ALTER DATABASE PASSWORD Null " + " " + "lqd");
                modRecordSet.cnnDB.Close();
                //UPGRADE_NOTE: Object cnnDB 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"'
                modRecordSet.cnnDB = null;
                modRecordSet.openConnection();

            } else {
                Interaction.MsgBox("Error while getRSreport and Error is :" + Err().Number + " " + Err().Description + " " + Err().Source + Constants.vbCrLf + Constants.vbCrLf + cnnDBreport.ConnectionString + Constants.vbCrLf + Constants.vbCrLf + " --- " + cnnDBreport.State);
            }
             // ERROR: Not supported in C#: ResumeStatement

            return functionReturnValue;
        }
开发者ID:nodoid,项目名称:PointOfSale,代码行数:44,代码来源:modReport.cs

示例13: loadItem

        public void loadItem(ref int id)
        {
            System.Windows.Forms.TextBox oText = null;
            System.Windows.Forms.CheckBox oCheck = null;
            if (id) {
                adoPrimaryRS = modRecordSet.getRS(ref "select * from PrintGroup WHERE PrintGroupID = " + id);
            } else {
                adoPrimaryRS = modRecordSet.getRS(ref "select * from PrintGroup");
                adoPrimaryRS.AddNew();
                this.Text = this.Text + " [New record]";
                mbAddNewFlag = true;
            }
            setup();
            foreach (TextBox oText_loopVariable in this.txtFields) {
                oText = oText_loopVariable;
                oText.DataBindings.Add(adoPrimaryRS);
                oText.MaxLength = adoPrimaryRS.Fields(oText.DataBindings).DefinedSize;
            }
            foreach (TextBox oText_loopVariable in this.txtInteger) {
                oText = oText_loopVariable;
                oText.DataBindings.Add(adoPrimaryRS);
                oText.Leave += txtInteger_Leave;
            }
            buildDataControls();
            mbDataChanged = false;

            loadLanguage();
            ShowDialog();
        }
开发者ID:nodoid,项目名称:PointOfSale,代码行数:29,代码来源:frmPrintGroup.cs

示例14: loadItem

        public void loadItem(ref int id)
        {
            System.Windows.Forms.TextBox oText = null;
            System.Windows.Forms.CheckBox oCheck = null;
             // ERROR: Not supported in C#: OnErrorStatement

            if (id) {
                adoPrimaryRS = modRecordSet.getRS(ref "select * from StockGroup WHERE StockGRoupID = " + id);
            } else {
                adoPrimaryRS = modRecordSet.getRS(ref "select * from StockGroup");
                adoPrimaryRS.AddNew();
                this.Text = this.Text + " [New record]";
                mbAddNewFlag = true;
            }
            setup();
            BindingSource bind = new BindingSource();
            foreach (TextBox oText_loopVariable in this.txtFields) {
                oText = oText_loopVariable;
                bind.DataSource = adoPrimaryRS;
                oText.DataBindings.Add(bind.DataSource);
                oText.MaxLength = adoPrimaryRS.Fields(oText.DataBindings).DefinedSize;
            }

            foreach (CheckBox oCheck_loopVariable in this.chkFields) {
                oCheck = oCheck_loopVariable;
                oCheck.DataBindings.Add(bind.DataSource);
            }

            buildDataControls();
            mbDataChanged = false;

            loadLanguage();
            ShowDialog();
        }
开发者ID:nodoid,项目名称:PointOfSale,代码行数:34,代码来源:frmStockGroup.cs

示例15: loadItem

        public bool loadItem()
        {
            string sql = null;
            gUpdate = true;
            string lString = "";

            sql = "SELECT PricingGroup.PricingGroup_Name AS Department, StockItem.StockItem_Name, Catalogue.Catalogue_Barcode, Catalogue.Catalogue_Quantity, StockItem.StockItem_ListCost, Vat.Vat_Amount, POSCatalogueChannelLnk.POSCatalogueChannelLnk_Price, [Catalogue_Quantity]/[StockItem_Quantity]*[StockItem_ListCost] AS cost, [Catalogue_Quantity]/[StockItem_Quantity]*[StockItem_ListCost] AS exclusiveCost, [Catalogue_Quantity]/[StockItem_Quantity]*[StockItem_ListCost]*(1+[Vat_Amount]/100) AS inclusiveCost, IIf([POSCatalogueChannelLnk_Price],([POSCatalogueChannelLnk_Price]-[Catalogue_Quantity]/[StockItem_Quantity]*[StockItem_ListCost]*(1+[Vat_Amount]/100))/[POSCatalogueChannelLnk_Price]*100) AS gpPercentage, ([POSCatalogueChannelLnk_Price]-[Catalogue_Quantity]/[StockItem_Quantity]*[StockItem_ListCost]*(1+[Vat_Amount]/100)) AS profit, Channel.Channel_Name, Channel.ChannelID ";
            sql = sql + "FROM Channel INNER JOIN ((Vat INNER JOIN (POSCatalogueChannelLnk INNER JOIN ((StockItem INNER JOIN PricingGroup ON StockItem.StockItem_PricingGroupID = PricingGroup.PricingGroupID) INNER JOIN Catalogue ON StockItem.StockItemID = Catalogue.Catalogue_StockItemID) ON (POSCatalogueChannelLnk.POSCatalogueChannelLnk_StockItemID = Catalogue.Catalogue_StockItemID) AND (POSCatalogueChannelLnk.POSCatalogueChannelLnk_Quantity = Catalogue.Catalogue_Quantity)) ON Vat.VatID = StockItem.StockItem_VatID) LEFT JOIN StockitemOverwrite ON StockItem.StockItemID = StockitemOverwrite.StockitemOverwriteID) ON Channel.ChannelID = POSCatalogueChannelLnk.POSCatalogueChannelLnk_ChannelID ";
            sql = sql + "WHERE (((([POSCatalogueChannelLnk_Price]-[Catalogue_Quantity]/[StockItem_Quantity]*[StockItem_ListCost]*(1+[Vat_Amount]/100)))<=0) AND ((StockitemOverwrite.StockitemOverwriteID) Is Null) AND ((StockItem.StockItem_Disabled)=False) AND ((Channel.Channel_Disabled)=False) AND ((Channel.ChannelID)<>9) AND ((Catalogue.Catalogue_Disabled)=False));";

            gRS = modRecordSet.getRS(ref sql);
            if (gRS.RecordCount) {
                lString = lString + "There are " + gRS.RecordCount + " catalogue prices where your price is equal or less that the products cost price." + Constants.vbCrLf + Constants.vbCrLf;
            }
            sql = "SELECT PricingGroup.PricingGroup_Name AS Department, StockItem.StockItem_Name, Catalogue.Catalogue_Barcode, Catalogue.Catalogue_Quantity, StockItem.StockItem_ListCost, Vat.Vat_Amount, CatalogueChannelLnk.CatalogueChannelLnk_Price, Channel.Channel_Name, Channel.ChannelID ";
            sql = sql + "FROM Channel INNER JOIN ((Vat INNER JOIN (CatalogueChannelLnk INNER JOIN ((StockItem INNER JOIN PricingGroup ON StockItem.StockItem_PricingGroupID = PricingGroup.PricingGroupID) INNER JOIN Catalogue ON StockItem.StockItemID = Catalogue.Catalogue_StockItemID) ON (CatalogueChannelLnk.CatalogueChannelLnk_StockItemID = Catalogue.Catalogue_StockItemID) AND (CatalogueChannelLnk.CatalogueChannelLnk_Quantity = Catalogue.Catalogue_Quantity)) ON Vat.VatID = StockItem.StockItem_VatID) INNER JOIN StockitemOverwrite ON StockItem.StockItemID = StockitemOverwrite.StockitemOverwriteID) ON Channel.ChannelID = CatalogueChannelLnk.CatalogueChannelLnk_ChannelID ";
            sql = sql + "WHERE (((CatalogueChannelLnk.CatalogueChannelLnk_Price)=0) AND ((Channel.ChannelID)<>9) AND ((StockItem.StockItem_Disabled)=False) AND ((Channel.Channel_Disabled)=False) AND ((Catalogue.Catalogue_Disabled)=False));";
            gRSsq = modRecordSet.getRS(ref sql);
            if (gRSsq.RecordCount) {
                lString = lString + "There are " + gRS.RecordCount + " SQ catalogue prices set to ZERO." + Constants.vbCrLf + Constants.vbCrLf;
            }
            if (!string.IsNullOrEmpty(lString)) {
                lString = lString + "It is not advisable to post any changes to your Point Of Sale devices until you have resolved this prices.";
                this.lblDesc.Text = lString;
                ShowDialog();
            }
            return gUpdate;
        }
开发者ID:nodoid,项目名称:PointOfSale,代码行数:28,代码来源:frmUpdateWarning.cs


注:本文中的ADODB.Recordset类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。