本文整理汇总了C#中Product.Clear方法的典型用法代码示例。如果您正苦于以下问题:C# Product.Clear方法的具体用法?C# Product.Clear怎么用?C# Product.Clear使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Product
的用法示例。
在下文中一共展示了Product.Clear方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FillByWhereClause
public virtual int FillByWhereClause(Product.ProductsDataTable dataTable, string whereClause, System.Data.OleDb.OleDbParameter[] parameters)
{
System.Data.OleDb.OleDbCommand command = new System.Data.OleDb.OleDbCommand();
command.Connection = this.Connection;
command.CommandText = "SELECT ProductID, ProductName, SupplierID, CategoryID, QuantityPerUnit, UnitPrice" +
", UnitsInStock, UnitsOnOrder, ReorderLevel, Discontinued, CreateID, CreateUser, " +
"ModifyID, ModifyUser FROM Products " + whereClause + ";";
command.CommandType = System.Data.CommandType.Text;
if (null != parameters)
command.Parameters.AddRange(parameters);
this.Adapter.SelectCommand = command;
if ((this.ClearBeforeFill == true))
{
dataTable.Clear();
}
int returnValue = this.Adapter.Fill(dataTable);
return returnValue;
}
示例2: FillBy
public virtual int FillBy(Product.ProductsDataTable dataTable, int ProductID) {
this.Adapter.SelectCommand = this.CommandCollection[1];
this.Adapter.SelectCommand.Parameters[0].Value = ((int)(ProductID));
if ((this.ClearBeforeFill == true)) {
dataTable.Clear();
}
int returnValue = this.Adapter.Fill(dataTable);
return returnValue;
}
示例3: Fill
public virtual int Fill(Product.ChangeLogsDataTable dataTable, int ID, System.Nullable<int> MAX_SequenceNumber_, System.Nullable<int> MAX_SequenceNumber_1, string ChangeUser) {
this.Adapter.SelectCommand = this.CommandCollection[0];
this.Adapter.SelectCommand.Parameters[0].Value = ((int)(ID));
if ((MAX_SequenceNumber_.HasValue == true)) {
this.Adapter.SelectCommand.Parameters[1].Value = ((int)(MAX_SequenceNumber_.Value));
}
else {
this.Adapter.SelectCommand.Parameters[1].Value = System.DBNull.Value;
}
if ((MAX_SequenceNumber_1.HasValue == true)) {
this.Adapter.SelectCommand.Parameters[2].Value = ((int)(MAX_SequenceNumber_1.Value));
}
else {
this.Adapter.SelectCommand.Parameters[2].Value = System.DBNull.Value;
}
if ((ChangeUser == null)) {
this.Adapter.SelectCommand.Parameters[3].Value = System.DBNull.Value;
}
else {
this.Adapter.SelectCommand.Parameters[3].Value = ((string)(ChangeUser));
}
if ((this.ClearBeforeFill == true)) {
dataTable.Clear();
}
int returnValue = this.Adapter.Fill(dataTable);
return returnValue;
}