public void Load(DataRow dr) { foreach (PropertyInfo ProInfo in _HR_Master_User.GetType().GetProperties()) { _HR_Master_User.GetType().GetField("Edit" + ProInfo.Name).SetValue(_HR_Master_User, false); if (dr.Table.Columns.Contains(ProInfo.Name)) { if (!dr.IsNull(ProInfo.Name)) { ProInfo.SetValue(_HR_Master_User, dr[ProInfo.Name], null); //_HR_Master_User.GetType().GetField("Edit" + ProInfo.Name).SetValue(_HR_Master_User, true); } } } }