/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromItemlotsummary(ref DataRow row, Itemlotsummary entity) { row.SetField("sortorder", entity.sortorder); row.SetField("days_text", entity.daysText); row.SetField("num_lots", entity.numLots); row.SetField("qty", entity.qty); row.SetField("itemlotsummaryuserfield", entity.itemlotsummaryuserfield); row.SetField("userfield", entity.userfield); }
public static Itemlotsummary BuildItemlotsummaryFromRow(DataRow row) { Itemlotsummary entity = new Itemlotsummary(); entity.sortorder = row.IsNull("sortorder") ? 0 : row.Field <int>("sortorder"); entity.daysText = row.IsNull("days_text") ? string.Empty : row.Field <string>("days_text"); entity.numLots = row.IsNull("num_lots") ? 0 : row.Field <int>("num_lots"); entity.qty = row.IsNull("qty") ? 0 : row.Field <int>("qty"); entity.itemlotsummaryuserfield = row.IsNull("itemlotsummaryuserfield") ? string.Empty : row.Field <string>("itemlotsummaryuserfield"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }