/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromWebmodlistcriteria(ref DataRow row, Webmodlistcriteria entity) { row.SetField("profile", entity.profile); row.SetField("operator", entity.@operator); row.SetField("functionname", entity.functionname); row.SetField("screenname", entity.screenname); row.SetField("settingname", entity.settingname); row.SetField("level", entity.level); row.SetField("recordcountlimit", entity.recordcountlimit); row.SetField("webmodlistuserfield", entity.webmodlistuserfield); row.SetField("userfield", entity.userfield); }
public static Webmodlistcriteria BuildWebmodlistcriteriaFromRow(DataRow row) { Webmodlistcriteria entity = new Webmodlistcriteria(); entity.profile = row.IsNull("profile") ? string.Empty : row.Field <string>("profile"); entity.@operator = row.IsNull("operator") ? string.Empty : row.Field <string>("operator"); entity.functionname = row.IsNull("functionname") ? string.Empty : row.Field <string>("functionname"); entity.screenname = row.IsNull("screenname") ? string.Empty : row.Field <string>("screenname"); entity.settingname = row.IsNull("settingname") ? string.Empty : row.Field <string>("settingname"); entity.level = row.IsNull("level") ? string.Empty : row.Field <string>("level"); entity.recordcountlimit = row.IsNull("recordcountlimit") ? 0 : row.Field <int>("recordcountlimit"); entity.webmodlistuserfield = row.IsNull("webmodlistuserfield") ? string.Empty : row.Field <string>("webmodlistuserfield"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }