/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromIceucheckserlotsingle(ref DataRow row, Iceucheckserlotsingle entity) { row.SetField("whse", entity.whse); row.SetField("prod", entity.prod); row.SetField("serlottype", entity.serlottype); row.SetField("nosnlots", entity.nosnlots); row.SetField("launchserlot", entity.launchserlot); row.SetField("isOptional", entity.isOptional); row.SetField("orderno", entity.orderno); row.SetField("ordersuf", entity.ordersuf); row.SetField("userfield", entity.userfield); }
public static Iceucheckserlotsingle BuildIceucheckserlotsingleFromRow(DataRow row) { Iceucheckserlotsingle entity = new Iceucheckserlotsingle(); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.prod = row.IsNull("prod") ? string.Empty : row.Field <string>("prod"); entity.serlottype = row.IsNull("serlottype") ? string.Empty : row.Field <string>("serlottype"); entity.nosnlots = row.IsNull("nosnlots") ? decimal.Zero : row.Field <decimal>("nosnlots"); entity.launchserlot = row.Field <bool>("launchserlot"); entity.isOptional = row.Field <bool>("isOptional"); entity.orderno = row.IsNull("orderno") ? 0 : row.Field <int>("orderno"); entity.ordersuf = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }