DataTable dtnew = new DataTable();
dtnew = dtPayment.Clone();
dtnew.Rows.Clear();
IEnumerable<DataRow> dtrows = (from f in dtPayment.AsEnumerable()
where f["Amount"].ToString().Trim() != ""
select f).ToArray();
dtrows.CopyToDataTable(dtnew, System.Data.LoadOption.PreserveChanges);
dtnew = dtPayment.Clone();
dtnew.Rows.Clear();
IEnumerable<DataRow> dtrows = (from f in dtPayment.AsEnumerable()
where f["Amount"].ToString().Trim() != ""
select f).ToArray();
dtrows.CopyToDataTable(dtnew, System.Data.LoadOption.PreserveChanges);
No comments:
Post a Comment