本文整理匯總了C#中Category.Clear方法的典型用法代碼示例。如果您正苦於以下問題:C# Category.Clear方法的具體用法?C# Category.Clear怎麽用?C# Category.Clear使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Category
的用法示例。
在下文中一共展示了Category.Clear方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: FillByWhereClause
public virtual int FillByWhereClause(Category.CategoriesDataTable 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 CategoryID, CategoryName, Description,
Picture, CreateID, CreateUser, ModifyID, ModifyUser FROM Categories " +
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: Fill
public virtual int Fill(Category.ChangeLogDataTable 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;
}
示例3: FillBy
public virtual int FillBy(Category.CategoriesDataTable dataTable, int CategoryID) {
this.Adapter.SelectCommand = this.CommandCollection[1];
this.Adapter.SelectCommand.Parameters[0].Value = ((int)(CategoryID));
if ((this.ClearBeforeFill == true)) {
dataTable.Clear();
}
int returnValue = this.Adapter.Fill(dataTable);
return returnValue;
}