/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromOereturninvoicelistresults(ref DataRow row, Oereturninvoicelistresults entity) { row.SetField("selectfl", entity.selectfl); row.SetField("orderno", entity.orderno); row.SetField("ordersuf", entity.ordersuf); row.SetField("shipto", entity.shipto); row.SetField("lineno", entity.lineno); row.SetField("shipprod", entity.shipprod); row.SetField("specnstype", entity.specnstype); row.SetField("qtyship", entity.qtyship); row.SetField("returnfl", entity.returnfl); row.SetField("unit", entity.unit); row.SetField("conv", entity.conv); row.SetField("price", entity.price); row.SetField("transtype", entity.transtype); row.SetField("npfl", entity.npfl); row.SetField("npallowretfl", entity.npallowretfl); row.SetField("userfield", entity.userfield); }
public static Oereturninvoicelistresults BuildOereturninvoicelistresultsFromRow(DataRow row) { Oereturninvoicelistresults entity = new Oereturninvoicelistresults(); entity.selectfl = row.Field <bool>("selectfl"); entity.orderno = row.IsNull("orderno") ? 0 : row.Field <int>("orderno"); entity.ordersuf = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf"); entity.shipto = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto"); entity.lineno = row.IsNull("lineno") ? 0 : row.Field <int>("lineno"); entity.shipprod = row.IsNull("shipprod") ? string.Empty : row.Field <string>("shipprod"); entity.specnstype = row.IsNull("specnstype") ? string.Empty : row.Field <string>("specnstype"); entity.qtyship = row.IsNull("qtyship") ? decimal.Zero : row.Field <decimal>("qtyship"); entity.returnfl = row.IsNull("returnfl") ? string.Empty : row.Field <string>("returnfl"); entity.unit = row.IsNull("unit") ? string.Empty : row.Field <string>("unit"); entity.conv = row.IsNull("conv") ? decimal.Zero : row.Field <decimal>("conv"); entity.price = row.IsNull("price") ? decimal.Zero : row.Field <decimal>("price"); entity.transtype = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype"); entity.npfl = row.Field <bool>("npfl"); entity.npallowretfl = row.Field <bool>("npallowretfl"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }