using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
namespace Utility
{
public class FilterDataTableForInQuery
{
public DataTable FilterDataTable(DataTable dtLocal, string value)
{
dtLocal.DefaultView.RowStateFilter = DataViewRowState.OriginalRows;
if (value != string.Empty)
{
dtLocal.DefaultView.RowFilter = "ID in( " + value + ")";
return dtLocal.DefaultView.ToTable();
}
else
{
return null;
}
}
}
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment