clone datatable
Code .NET SQL :: ASP.NET :: C#
Page 1 sur 1
clone datatable
- Code:
string filter = string.Empty;
bool and = false;
if (ShowEvaluation || ShowSeance || ShowTravail)
{
if (ShowEvaluation)
{
filter = "Evaluation = 1";
and = true;
}
if (ShowSeance)
{
if (and)
filter += " AND ";
filter = "Contenu Is Not Null";
}
if (ShowTravail)
{
if (and)
filter += " AND ";
filter += "nbPj>0";
}
DataRow[] datarows = result.Table.Select(filter);
DataTable dt = result.Table.Clone();
foreach (DataRow dr in datarows)
dt.ImportRow(dr);
resultSupp = dt;
return dt.DefaultView;
}
Code .NET SQL :: ASP.NET :: C#
Page 1 sur 1
Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum