Guest User

Untitled

a guest
Jan 18th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. foreach (DataRow row in dt.Rows)
  2. {
  3. if (row.RowState == DataRowState.Added)
  4. {
  5. row["CreatedOn"] = DateTime.Now;
  6. row["CreatedBy"] = GlobalProp.UserName;
  7. row["ModifiedOn"] = DateTime.Now;
  8. row["ModifiedBy"] = GlobalProp.UserName;
  9. }
  10. else if (row.RowState == DataRowState.Modified)
  11. {
  12. row["ModifiedOn"] = DateTime.Now;
  13. row["ModifiedBy"] = GlobalProp.UserName;
  14. }
  15. }
Add Comment
Please, Sign In to add comment