daily pastebin goal
58%
SHARE
TWEET

Untitled

a guest Jan 18th, 2019 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.             }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top