/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromArsbbillinglistresults(ref DataRow row, Arsbbillinglistresults entity) { row.SetField("billingtype", entity.billingtype); row.SetField("billingprimarykey", entity.billingprimarykey); row.SetField("billingsecondarykey", entity.billingsecondarykey); row.SetField("billingtypedisplay", entity.billingtypedisplay); row.SetField("billingdescdisplay", entity.billingdescdisplay); row.SetField("chargebofl", entity.chargebofl); row.SetField("chargefrght", entity.chargefrght); row.SetField("flatordamt", entity.flatordamt); row.SetField("flatpkgamt", entity.flatpkgamt); row.SetField("freightpct", entity.freightpct); row.SetField("transproc", entity.transproc); row.SetField("custname", entity.custname); row.SetField("carriername", entity.carriername); row.SetField("pmsbrowid", entity.pmsbrowid.ToByteArray()); row.SetField("user1", entity.user1); row.SetField("user2", entity.user2); row.SetField("user3", entity.user3); row.SetField("user4", entity.user4); row.SetField("user5", entity.user5); row.SetField("user6", entity.user6); row.SetField("user7", entity.user7); row.SetField("user8", entity.user8); row.SetField("user9", entity.user9); row.SetField("userfield", entity.userfield); }
public static Arsbbillinglistresults BuildArsbbillinglistresultsFromRow(DataRow row) { Arsbbillinglistresults entity = new Arsbbillinglistresults(); entity.billingtype = row.IsNull("billingtype") ? string.Empty : row.Field <string>("billingtype"); entity.billingprimarykey = row.IsNull("billingprimarykey") ? string.Empty : row.Field <string>("billingprimarykey"); entity.billingsecondarykey = row.IsNull("billingsecondarykey") ? string.Empty : row.Field <string>("billingsecondarykey"); entity.billingtypedisplay = row.IsNull("billingtypedisplay") ? string.Empty : row.Field <string>("billingtypedisplay"); entity.billingdescdisplay = row.IsNull("billingdescdisplay") ? string.Empty : row.Field <string>("billingdescdisplay"); entity.chargebofl = row.Field <bool>("chargebofl"); entity.chargefrght = row.Field <bool>("chargefrght"); entity.flatordamt = row.IsNull("flatordamt") ? decimal.Zero : row.Field <decimal>("flatordamt"); entity.flatpkgamt = row.IsNull("flatpkgamt") ? decimal.Zero : row.Field <decimal>("flatpkgamt"); entity.freightpct = row.IsNull("freightpct") ? decimal.Zero : row.Field <decimal>("freightpct"); entity.transproc = row.IsNull("transproc") ? string.Empty : row.Field <string>("transproc"); entity.custname = row.IsNull("custname") ? string.Empty : row.Field <string>("custname"); entity.carriername = row.IsNull("carriername") ? string.Empty : row.Field <string>("carriername"); entity.pmsbrowid = row.Field <byte[]>("pmsbrowid").ToStringEncoded(); entity.user1 = row.IsNull("user1") ? string.Empty : row.Field <string>("user1"); entity.user2 = row.IsNull("user2") ? string.Empty : row.Field <string>("user2"); entity.user3 = row.IsNull("user3") ? string.Empty : row.Field <string>("user3"); entity.user4 = row.IsNull("user4") ? string.Empty : row.Field <string>("user4"); entity.user5 = row.IsNull("user5") ? string.Empty : row.Field <string>("user5"); entity.user6 = row.Field <decimal?>("user6"); entity.user7 = row.Field <decimal?>("user7"); entity.user8 = row.Field <DateTime?>("user8"); entity.user9 = row.Field <DateTime?>("user9"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }