本文整理汇总了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 {
}
}
示例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
}