/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromOeordercopypricing(ref DataRow row, Oeordercopypricing entity) { row.SetField("orderno", entity.orderno); row.SetField("ordersuf", entity.ordersuf); row.SetField("quoteno", entity.quoteno); row.SetField("jobfl", entity.jobfl); row.SetField("jobflenabled", entity.jobflenabled); row.SetField("whsefl", entity.whsefl); row.SetField("whseflenabled", entity.whseflenabled); row.SetField("jobno", entity.jobno); row.SetField("newenddt", entity.newenddt); row.SetField("updateexisting", entity.updateexisting); row.SetField("updateactive", entity.updateactive); row.SetField("userfield", entity.userfield); }
public static Oeordercopypricing BuildOeordercopypricingFromRow(DataRow row) { Oeordercopypricing entity = new Oeordercopypricing(); entity.orderno = row.IsNull("orderno") ? 0 : row.Field <int>("orderno"); entity.ordersuf = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf"); entity.quoteno = row.IsNull("quoteno") ? string.Empty : row.Field <string>("quoteno"); entity.jobfl = row.Field <bool>("jobfl"); entity.jobflenabled = row.Field <bool>("jobflenabled"); entity.whsefl = row.Field <bool>("whsefl"); entity.whseflenabled = row.Field <bool>("whseflenabled"); entity.jobno = row.IsNull("jobno") ? string.Empty : row.Field <string>("jobno"); entity.newenddt = row.Field <DateTime?>("newenddt"); entity.updateexisting = row.Field <bool>("updateexisting"); entity.updateactive = row.Field <bool>("updateactive"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }