/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromIcproductremandefaults(ref DataRow row, Icproductremandefaults entity) { row.SetField("prod", entity.prod); row.SetField("impliedcoreprod", entity.impliedcoreprod); row.SetField("dirtycoreprod", entity.dirtycoreprod); row.SetField("implyqty", entity.implyqty); row.SetField("custcoregrcfl", entity.custcoregrcfl); row.SetField("vendcoregrcfl", entity.vendcoregrcfl); row.SetField("custgraceper", entity.custgraceper); row.SetField("vendgraceper", entity.vendgraceper); row.SetField("userfield", entity.userfield); }
public static Icproductremandefaults BuildIcproductremandefaultsFromRow(DataRow row) { Icproductremandefaults entity = new Icproductremandefaults(); entity.prod = row.IsNull("prod") ? string.Empty : row.Field <string>("prod"); entity.impliedcoreprod = row.IsNull("impliedcoreprod") ? string.Empty : row.Field <string>("impliedcoreprod"); entity.dirtycoreprod = row.IsNull("dirtycoreprod") ? string.Empty : row.Field <string>("dirtycoreprod"); entity.implyqty = row.IsNull("implyqty") ? 0 : row.Field <int>("implyqty"); entity.custcoregrcfl = row.Field <bool>("custcoregrcfl"); entity.vendcoregrcfl = row.Field <bool>("vendcoregrcfl"); entity.custgraceper = row.IsNull("custgraceper") ? 0 : row.Field <int>("custgraceper"); entity.vendgraceper = row.IsNull("vendgraceper") ? 0 : row.Field <int>("vendgraceper"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }