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


C# ADODB.Recordset.MoveLast方法代码示例

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


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

示例1: cmdUndo_Click

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

            ADODB.Recordset rs = default(ADODB.Recordset);
            ADODB.Recordset rst = default(ADODB.Recordset);
            ADODB.Recordset RsCh = default(ADODB.Recordset);
            ADODB.Recordset rsIn = default(ADODB.Recordset);
            rs = new ADODB.Recordset();
            rst = new ADODB.Recordset();
            rsIn = new ADODB.Recordset();

            RsCh = modRecordSet.getRS(ref "SELECT * FROM BClabelItemUndo");

            if (RsCh.RecordCount > 0) {
                rs = modRecordSet.getRS(ref "SELECT * FROM BClabelItemUndo");
                rs.MoveLast();
                rsIn = modRecordSet.getRS(ref "SELECT * FROM BClabelItem WHERE BClabelItemID =" + rs.Fields("BClabelItemID").Value + " AND BClabelItem_Field='" + rs.Fields("BClabelItem_Field").Value + "'");

                if (rsIn.RecordCount > 0) {
                    rst = modRecordSet.getRS(ref "DELETE * FROM BClabelItem WHERE BClabelItemID=" + rs.Fields("BClabelItemID").Value + "");

                    rst = modRecordSet.getRS(ref "DELETE * FROM BClabelItemUndo WHERE BClabelItemID=" + rs.Fields("BClabelItemID").Value + "");
                } else if (rsIn.RecordCount < 1) {
                    rst = modRecordSet.getRS(ref "INSERT INTO BClabelItem(BClabelItem_BCLabelID,BClabelItem_Line,BClabelItem_Field,BClabelItem_Align,BClabelItem_Size,BClabelItem_Bold,BClabelItem_Sample,BClabelItem_Disabled,BClabelItem_LabelID)VALUES(" + rs.Fields("BClabelItem_BCLabelID").Value + "," + rs.Fields("BClabelItem_Line").Value + ",'" + rs.Fields("BClabelItem_Field").Value + "'," + rs.Fields("BClabelItem_Align").Value + "," + rs.Fields("BClabelItem_Size").Value + "," + rs.Fields("BClabelItem_Bold").Value + ",'" + rs.Fields("BClabelItem_Sample").Value + "'," + rs.Fields("BClabelItem_Disabled").Value + "," + rs.Fields("BClabelItem_LabelID").Value + ")");
                    rst = modRecordSet.getRS(ref "DELETE * FROM BClabelItemUndo WHERE BClabelItemID=" + rs.Fields("BClabelItemID").Value + " and BClabelItem_Field='" + rs.Fields("BClabelItem_Field").Value + "'");
                }

                modApplication.TheSelectedPrinterNew = 2;
                labelsfile();
                //Unload frmPrinter
                //frmPrinter.selectPrinter
                //frmBarcodedesign.TheLoading
                //TheSelectedPrinterNew = 0

                //cmdExit_Click

            } else {
            }
        }
开发者ID:nodoid,项目名称:PointOfSale,代码行数:40,代码来源:frmBarcodeLoad.cs

示例2: cmdExit_Click

        private void cmdExit_Click(System.Object eventSender, System.EventArgs eventArgs)
        {
            //On Error GoTo ErrH
            ADODB.Recordset rs = default(ADODB.Recordset);
            ADODB.Recordset rst = default(ADODB.Recordset);
            ADODB.Recordset rsHave = default(ADODB.Recordset);
            ADODB.Recordset rsMaxID = default(ADODB.Recordset);
            short HoldBClabelItem_BCLabelID = 0;
            string TheSample = null;
            ADODB.Recordset rsInner = default(ADODB.Recordset);
            short HoldLaIDVaBack = 0;
            short TMaxID = 0;

            rs = new ADODB.Recordset();
            rst = new ADODB.Recordset();
            rsHave = new ADODB.Recordset();
            rsInner = new ADODB.Recordset();
            rsMaxID = new ADODB.Recordset();

            modApplication.IntDesign = 0;
            //New code

            rs = modRecordSet.getRS(ref "DELETE * FROM BClabelItemUndo");

            strheight = 0;
            strwidht = 0;

            rs = modRecordSet.getRS(ref "SELECT * FROM LabelItem WHERE labelItem_LabelID=" + modApplication.MyLIDWHole + "");

            if (rs.RecordCount == 1) {
                rs = modRecordSet.getRS(ref "DELETE * FROM LabelItem WHERE labelItem_LabelID=" + modApplication.MyLIDWHole + "");
                rs = modRecordSet.getRS(ref "DELETE * FROM Label WHERE LabelID=" + modApplication.MyLIDWHole + "");
                rs = modRecordSet.getRS(ref "DELETE * FROM BClabel WHERE BClabel_LabelID=" + modApplication.MyLIDWHole + "");
                rs = modRecordSet.getRS(ref "DELETE * FROM BClabelItem WHERE BClabelItem_LabelID=" + modApplication.MyLIDWHole + "");
                this.Close();
                My.MyProject.Forms.frmDesign.RefreshLoad(ref modApplication.TheType);
                return;

            } else {
            }

            rs = modRecordSet.getRS(ref "SELECT Max(LabelItem.labelItem_LabelID) as TheMaxID FROM LabelItem");
            TMaxID = rs.Fields("TheMaxID").Value;

            rs = modRecordSet.getRS(ref "SELECT * FROM LabelItem ORDER BY labelItem_LabelID");

            rs.MoveFirst();
            //Loading BClabelItem with Infor from LabelItem
            while (!(rs.EOF)) {
                 // ERROR: Not supported in C#: OnErrorStatement

                rsHave = modRecordSet.getRS(ref "SELECT * FROM BClabelItem WHERE BClabelItem_LabelID=" + rs.Fields("labelItem_LabelID").Value + "");
                HoldBClabelItem_BCLabelID = rsHave.Fields("BClabelItem_BCLabelID").Value;

                rst = modRecordSet.getRS(ref "DELETE * FROM BClabelItem WHERE BClabelItem_LabelID =" + rs.Fields("labelItem_LabelID").Value + "");

                rsInner = modRecordSet.getRS(ref "SELECT * FROM LabelItem WHERE labelItem_LabelID=" + rs.Fields("labelItem_LabelID").Value + "");
                while (!(rsInner.EOF)) {
                    if (Information.IsDBNull(rsInner.Fields("labelItem_Sample").Value)) {
                        TheSample = " ";
                    } else {
                        TheSample = rsInner.Fields("labelItem_Sample").Value;
                    }
                    rst = modRecordSet.getRS(ref "INSERT INTO BClabelItem(BClabelItem_BCLabelID,BClabelItem_Line,BClabelItem_Field,BClabelItem_Align,BClabelItem_Size,BClabelItem_Bold,BClabelItem_Sample,BClabelItem_Disabled,BClabelItem_LabelID)VALUES(" + HoldBClabelItem_BCLabelID + "," + rsInner.Fields("labelItem_Line").Value + ",'" + rsInner.Fields("labelItem_Field").Value + "'," + rsInner.Fields("labelItem_Align").Value + "," + rsInner.Fields("labelItem_Size").Value + "," + rsInner.Fields("labelItem_Bold").Value + ",'" + TheSample + "','" + 0 + "'," + rsInner.Fields("labelItem_LabelID").Value + ")");
                    rsInner.MoveNext();
                }

                HoldLaIDVaBack = rs.Fields("labelItem_LabelID").Value;
                rs.MoveNext();

                while (!(rs.Fields("labelItem_LabelID").Value != HoldLaIDVaBack)) {
                    if (rs.Fields("labelItem_LabelID").Value == TMaxID) {
                        rs.MoveLast();
                        rs.MoveNext();
                        break; // TODO: might not be correct. Was : Exit Do
                    }

                    rs.MoveNext();
                }

            }

            this.Close();
            My.MyProject.Forms.frmDesign.RefreshLoad(ref modApplication.TheType);
            //ErrH:    frmDesign.RefreshLoad TheType

            //frmdesign.RefreshLoad TheType
        }
开发者ID:nodoid,项目名称:PointOfSale,代码行数:88,代码来源:frmBarcodeLoad.cs


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