/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromPdsppricedetailresults(ref DataRow row, Pdsppricedetailresults entity) { row.SetField("Unit", entity.unit); row.SetField("Unitfl", entity.unitfl); row.SetField("BasePrice", entity.basePrice); row.SetField("BasePricefl", entity.basePricefl); row.SetField("ListPrice", entity.listPrice); row.SetField("ListPricefl", entity.listPricefl); row.SetField("Cost", entity.cost); row.SetField("Costfl", entity.costfl); row.SetField("userfield", entity.userfield); }
public static Pdsppricedetailresults BuildPdsppricedetailresultsFromRow(DataRow row) { Pdsppricedetailresults entity = new Pdsppricedetailresults(); entity.unit = row.IsNull("Unit") ? string.Empty : row.Field <string>("Unit"); entity.unitfl = row.Field <bool>("Unitfl"); entity.basePrice = row.IsNull("BasePrice") ? string.Empty : row.Field <string>("BasePrice"); entity.basePricefl = row.Field <bool>("BasePricefl"); entity.listPrice = row.IsNull("ListPrice") ? string.Empty : row.Field <string>("ListPrice"); entity.listPricefl = row.Field <bool>("ListPricefl"); entity.cost = row.IsNull("Cost") ? string.Empty : row.Field <string>("Cost"); entity.costfl = row.Field <bool>("Costfl"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }