DateTime dtStart = rule.StartDate;
DateTime dtEnd = rule.EndDate;
// DateTime dtStart = new DateTime(2009,1,1);
// DateTime dtEnd = new DateTime(2009,1,2);
DataTable dtClone = dtReserve.Clone();
DataView dv = dtReserve.DefaultView;
dv.RowFilter = "leave_date >= '" + dtStart.ToString() + "' and leave_date <= '" + dtEnd + "'";
IEnumerator rators = dv.GetEnumerator();
//DataRow[] rows = dtReserve.DefaultView.RowFilter("leave_date >= '" + dtStart.ToString() + "' and leave_date <= '" + dtEnd + "'");
while (rators.MoveNext())
{
object obj = rators.Current;
dtClone.ImportRow(((DataRowView)obj).Row);
}
return dtClone;
DateTime dtEnd = rule.EndDate;
// DateTime dtStart = new DateTime(2009,1,1);
// DateTime dtEnd = new DateTime(2009,1,2);
DataTable dtClone = dtReserve.Clone();
DataView dv = dtReserve.DefaultView;
dv.RowFilter = "leave_date >= '" + dtStart.ToString() + "' and leave_date <= '" + dtEnd + "'";
IEnumerator rators = dv.GetEnumerator();
//DataRow[] rows = dtReserve.DefaultView.RowFilter("leave_date >= '" + dtStart.ToString() + "' and leave_date <= '" + dtEnd + "'");
while (rators.MoveNext())
{
object obj = rators.Current;
dtClone.ImportRow(((DataRowView)obj).Row);
}
return dtClone;