/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromRssjlookupcriteria(ref DataRow row, Rssjlookupcriteria entity) { row.SetField("groupnm", entity.groupnm); row.SetField("runty", entity.runty); row.SetField("fromhour", entity.fromhour); row.SetField("fromminute", entity.fromminute); row.SetField("fromampm", entity.fromampm); row.SetField("tohour", entity.tohour); row.SetField("tominute", entity.tominute); row.SetField("toampm", entity.toampm); row.SetField("userfield", entity.userfield); }
public static Rssjlookupcriteria BuildRssjlookupcriteriaFromRow(DataRow row) { Rssjlookupcriteria entity = new Rssjlookupcriteria(); entity.groupnm = row.IsNull("groupnm") ? string.Empty : row.Field <string>("groupnm"); entity.runty = row.IsNull("runty") ? string.Empty : row.Field <string>("runty"); entity.fromhour = row.IsNull("fromhour") ? 0 : row.Field <int>("fromhour"); entity.fromminute = row.IsNull("fromminute") ? 0 : row.Field <int>("fromminute"); entity.fromampm = row.IsNull("fromampm") ? string.Empty : row.Field <string>("fromampm"); entity.tohour = row.IsNull("tohour") ? 0 : row.Field <int>("tohour"); entity.tominute = row.IsNull("tominute") ? 0 : row.Field <int>("tominute"); entity.toampm = row.IsNull("toampm") ? string.Empty : row.Field <string>("toampm"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }