/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromIcswlookupcriteria(ref DataRow row, Icswlookupcriteria entity) { row.SetField("prod", entity.prod); row.SetField("whse", entity.whse); row.SetField("arpvendno", entity.arpvendno); row.SetField("prodline", entity.prodline); row.SetField("lookupnm", entity.lookupnm); row.SetField("allicspstatusfl", entity.allicspstatusfl); row.SetField("kittype", entity.kittype); row.SetField("icswstatus", entity.icswstatus); row.SetField("quantitytype", entity.quantitytype); row.SetField("keywords", entity.keywords); row.SetField("recordlimit", entity.recordlimit); row.SetField("userfield", entity.userfield); }
public static Icswlookupcriteria BuildIcswlookupcriteriaFromRow(DataRow row) { Icswlookupcriteria entity = new Icswlookupcriteria(); entity.prod = row.IsNull("prod") ? string.Empty : row.Field <string>("prod"); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.arpvendno = row.IsNull("arpvendno") ? decimal.Zero : row.Field <decimal>("arpvendno"); entity.prodline = row.IsNull("prodline") ? string.Empty : row.Field <string>("prodline"); entity.lookupnm = row.IsNull("lookupnm") ? string.Empty : row.Field <string>("lookupnm"); entity.allicspstatusfl = row.Field <bool>("allicspstatusfl"); entity.kittype = row.IsNull("kittype") ? string.Empty : row.Field <string>("kittype"); entity.icswstatus = row.IsNull("icswstatus") ? string.Empty : row.Field <string>("icswstatus"); entity.quantitytype = row.IsNull("quantitytype") ? string.Empty : row.Field <string>("quantitytype"); entity.keywords = row.IsNull("keywords") ? string.Empty : row.Field <string>("keywords"); entity.recordlimit = row.IsNull("recordlimit") ? 0 : row.Field <int>("recordlimit"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }