/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromPorrarreptadjretrievehdr(ref DataRow row, Porrarreptadjretrievehdr entity) { row.SetField("addlcarrycost", entity.addlcarrycost); row.SetField("addonamt1", entity.addonamt1); row.SetField("addonamt2", entity.addonamt2); row.SetField("addonamt3", entity.addonamt3); row.SetField("addonamt4", entity.addonamt4); row.SetField("addoncapfl1", entity.addoncapfl1); row.SetField("addoncapfl2", entity.addoncapfl2); row.SetField("addoncapfl3", entity.addoncapfl3); row.SetField("addoncapfl4", entity.addoncapfl4); row.SetField("addondistr", entity.addondistr); row.SetField("addonnet1", entity.addonnet1); row.SetField("addonnet2", entity.addonnet2); row.SetField("addonnet3", entity.addonnet3); row.SetField("addonnet4", entity.addonnet4); row.SetField("addonno1", entity.addonno1); row.SetField("addonno2", entity.addonno2); row.SetField("addonno3", entity.addonno3); row.SetField("addonno4", entity.addonno4); row.SetField("addontype1", entity.addontype1); row.SetField("addontype2", entity.addontype2); row.SetField("addontype3", entity.addontype3); row.SetField("addontype4", entity.addontype4); row.SetField("automrgfl", entity.automrgfl); row.SetField("billtowhse", entity.billtowhse); row.SetField("blno", entity.blno); row.SetField("blsuf", entity.blsuf); row.SetField("bofl", entity.bofl); row.SetField("buyer", entity.buyer); row.SetField("cono", entity.cono); row.SetField("conslinefl", entity.conslinefl); row.SetField("conswhsefl", entity.conswhsefl); row.SetField("contractno", entity.contractno); row.SetField("countrycd", entity.countrycd); row.SetField("createdt", entity.createdt); row.SetField("currencyty", entity.currencyty); row.SetField("duedt", entity.duedt); row.SetField("dueoverfl", entity.dueoverfl); row.SetField("esrqstid", entity.esrqstid); row.SetField("fobfl", entity.fobfl); row.SetField("freightexpectedty", entity.freightexpectedty); row.SetField("frtbillacct", entity.frtbillacct); row.SetField("frtconsldtcd", entity.frtconsldtcd); row.SetField("frttermscd", entity.frttermscd); row.SetField("geocd", entity.geocd); row.SetField("ignoreltfl", entity.ignoreltfl); row.SetField("linerevfl", entity.linerevfl); row.SetField("mergefl", entity.mergefl); row.SetField("nextlineno", entity.nextlineno); row.SetField("notesfl", entity.notesfl); row.SetField("openinit", entity.openinit); row.SetField("oper2", entity.oper2); row.SetField("operinit", entity.operinit); row.SetField("orderdisp", entity.orderdisp); row.SetField("orderptfl", entity.orderptfl); row.SetField("outofcityfl", entity.outofcityfl); row.SetField("pridesc", entity.pridesc); row.SetField("prodline", entity.prodline); row.SetField("refer", entity.refer); row.SetField("reportnm", entity.reportnm); row.SetField("reportno", entity.reportno); row.SetField("reportpri", entity.reportpri); row.SetField("reqoverfl", entity.reqoverfl); row.SetField("reqshipdt", entity.reqshipdt); row.SetField("resalefl", entity.resalefl); row.SetField("resaleno", entity.resaleno); row.SetField("reviewcycle", entity.reviewcycle); row.SetField("rowpointer", entity.rowpointer); row.SetField("rpterr", entity.rpterr); row.SetField("rpterrfl", entity.rpterrfl); row.SetField("rushfl", entity.rushfl); row.SetField("shipfmno", entity.shipfmno); row.SetField("shipinstr", entity.shipinstr); row.SetField("shiptoaddr1", entity.shiptoaddr1); row.SetField("shiptoaddr2", entity.shiptoaddr2); row.SetField("shiptoaddr3", entity.shiptoaddr3); row.SetField("shiptocity", entity.shiptocity); row.SetField("shiptonm", entity.shiptonm); row.SetField("shiptost", entity.shiptost); row.SetField("shiptozip", entity.shiptozip); row.SetField("shipviaty", entity.shipviaty); row.SetField("sourcety", entity.sourcety); row.SetField("subfl", entity.subfl); row.SetField("tarbuyamt", entity.tarbuyamt); row.SetField("tarbuytype", entity.tarbuytype); row.SetField("termstype", entity.termstype); row.SetField("totbelowop", entity.totbelowop); row.SetField("totcritical", entity.totcritical); row.SetField("totcubes", entity.totcubes); row.SetField("totdoc", entity.totdoc); row.SetField("totlineamt", entity.totlineamt); row.SetField("totnpna", entity.totnpna); row.SetField("totqtyord", entity.totqtyord); row.SetField("totrush", entity.totrush); row.SetField("totsuper", entity.totsuper); row.SetField("totweight", entity.totweight); row.SetField("transdt", entity.transdt); row.SetField("transferloc", entity.transferloc); row.SetField("transproc", entity.transproc); row.SetField("transtm", entity.transtm); row.SetField("transtype", entity.transtype); row.SetField("user1", entity.user1); row.SetField("user10", entity.user10); row.SetField("user11", entity.user11); row.SetField("user12", entity.user12); row.SetField("user13", entity.user13); row.SetField("user14", entity.user14); row.SetField("user15", entity.user15); row.SetField("user16", entity.user16); row.SetField("user17", entity.user17); row.SetField("user18", entity.user18); row.SetField("user19", entity.user19); row.SetField("user2", entity.user2); row.SetField("user20", entity.user20); row.SetField("user21", entity.user21); row.SetField("user22", entity.user22); row.SetField("user23", entity.user23); row.SetField("user24", entity.user24); 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("vendno", entity.vendno); row.SetField("whse", entity.whse); row.SetField("wodiscamt", entity.wodiscamt); row.SetField("wodiscoverfl", entity.wodiscoverfl); row.SetField("wodisctype", entity.wodisctype); }
public static Porrarreptadjretrievehdr BuildPorrarreptadjretrievehdrFromRow(DataRow row) { Porrarreptadjretrievehdr entity = new Porrarreptadjretrievehdr(); entity.addlcarrycost = row.IsNull("addlcarrycost") ? decimal.Zero : row.Field <decimal>("addlcarrycost"); entity.addonamt1 = row.IsNull("addonamt1") ? decimal.Zero : row.Field <decimal>("addonamt1"); entity.addonamt2 = row.IsNull("addonamt2") ? decimal.Zero : row.Field <decimal>("addonamt2"); entity.addonamt3 = row.IsNull("addonamt3") ? decimal.Zero : row.Field <decimal>("addonamt3"); entity.addonamt4 = row.IsNull("addonamt4") ? decimal.Zero : row.Field <decimal>("addonamt4"); entity.addoncapfl1 = row.Field <bool>("addoncapfl1"); entity.addoncapfl2 = row.Field <bool>("addoncapfl2"); entity.addoncapfl3 = row.Field <bool>("addoncapfl3"); entity.addoncapfl4 = row.Field <bool>("addoncapfl4"); entity.addondistr = row.IsNull("addondistr") ? string.Empty : row.Field <string>("addondistr"); entity.addonnet1 = row.IsNull("addonnet1") ? decimal.Zero : row.Field <decimal>("addonnet1"); entity.addonnet2 = row.IsNull("addonnet2") ? decimal.Zero : row.Field <decimal>("addonnet2"); entity.addonnet3 = row.IsNull("addonnet3") ? decimal.Zero : row.Field <decimal>("addonnet3"); entity.addonnet4 = row.IsNull("addonnet4") ? decimal.Zero : row.Field <decimal>("addonnet4"); entity.addonno1 = row.IsNull("addonno1") ? 0 : row.Field <int>("addonno1"); entity.addonno2 = row.IsNull("addonno2") ? 0 : row.Field <int>("addonno2"); entity.addonno3 = row.IsNull("addonno3") ? 0 : row.Field <int>("addonno3"); entity.addonno4 = row.IsNull("addonno4") ? 0 : row.Field <int>("addonno4"); entity.addontype1 = row.Field <bool>("addontype1"); entity.addontype2 = row.Field <bool>("addontype2"); entity.addontype3 = row.Field <bool>("addontype3"); entity.addontype4 = row.Field <bool>("addontype4"); entity.automrgfl = row.Field <bool>("automrgfl"); entity.billtowhse = row.IsNull("billtowhse") ? string.Empty : row.Field <string>("billtowhse"); entity.blno = row.IsNull("blno") ? 0 : row.Field <int>("blno"); entity.blsuf = row.IsNull("blsuf") ? 0 : row.Field <int>("blsuf"); entity.bofl = row.Field <bool>("bofl"); entity.buyer = row.IsNull("buyer") ? string.Empty : row.Field <string>("buyer"); entity.cono = row.IsNull("cono") ? 0 : row.Field <int>("cono"); entity.conslinefl = row.Field <bool>("conslinefl"); entity.conswhsefl = row.Field <bool>("conswhsefl"); entity.contractno = row.IsNull("contractno") ? string.Empty : row.Field <string>("contractno"); entity.countrycd = row.IsNull("countrycd") ? string.Empty : row.Field <string>("countrycd"); entity.createdt = row.Field <DateTime?>("createdt"); entity.currencyty = row.IsNull("currencyty") ? string.Empty : row.Field <string>("currencyty"); entity.duedt = row.Field <DateTime?>("duedt"); entity.dueoverfl = row.Field <bool>("dueoverfl"); entity.esrqstid = row.IsNull("esrqstid") ? string.Empty : row.Field <string>("esrqstid"); entity.fobfl = row.Field <bool>("fobfl"); entity.freightexpectedty = row.IsNull("freightexpectedty") ? string.Empty : row.Field <string>("freightexpectedty"); entity.frtbillacct = row.IsNull("frtbillacct") ? string.Empty : row.Field <string>("frtbillacct"); entity.frtconsldtcd = row.IsNull("frtconsldtcd") ? string.Empty : row.Field <string>("frtconsldtcd"); entity.frttermscd = row.IsNull("frttermscd") ? string.Empty : row.Field <string>("frttermscd"); entity.geocd = row.IsNull("geocd") ? 0 : row.Field <int>("geocd"); entity.ignoreltfl = row.Field <bool>("ignoreltfl"); entity.linerevfl = row.Field <bool>("linerevfl"); entity.mergefl = row.Field <bool>("mergefl"); entity.nextlineno = row.IsNull("nextlineno") ? 0 : row.Field <int>("nextlineno"); entity.notesfl = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl"); entity.openinit = row.IsNull("openinit") ? string.Empty : row.Field <string>("openinit"); entity.oper2 = row.IsNull("oper2") ? string.Empty : row.Field <string>("oper2"); entity.operinit = row.IsNull("operinit") ? string.Empty : row.Field <string>("operinit"); entity.orderdisp = row.IsNull("orderdisp") ? string.Empty : row.Field <string>("orderdisp"); entity.orderptfl = row.Field <bool>("orderptfl"); entity.outofcityfl = row.Field <bool>("outofcityfl"); entity.pridesc = row.IsNull("pridesc") ? string.Empty : row.Field <string>("pridesc"); entity.prodline = row.IsNull("prodline") ? string.Empty : row.Field <string>("prodline"); entity.refer = row.IsNull("refer") ? string.Empty : row.Field <string>("refer"); entity.reportnm = row.IsNull("reportnm") ? string.Empty : row.Field <string>("reportnm"); entity.reportno = row.IsNull("reportno") ? 0 : row.Field <int>("reportno"); entity.reportpri = row.IsNull("reportpri") ? 0 : row.Field <int>("reportpri"); entity.reqoverfl = row.Field <bool>("reqoverfl"); entity.reqshipdt = row.Field <DateTime?>("reqshipdt"); entity.resalefl = row.Field <bool>("resalefl"); entity.resaleno = row.IsNull("resaleno") ? string.Empty : row.Field <string>("resaleno"); entity.reviewcycle = row.IsNull("reviewcycle") ? 0 : row.Field <int>("reviewcycle"); entity.rowpointer = row.IsNull("rowpointer") ? string.Empty : row.Field <string>("rowpointer"); entity.rpterr = row.IsNull("rpterr") ? string.Empty : row.Field <string>("rpterr"); entity.rpterrfl = row.Field <bool>("rpterrfl"); entity.rushfl = row.Field <bool>("rushfl"); entity.shipfmno = row.IsNull("shipfmno") ? 0 : row.Field <int>("shipfmno"); entity.shipinstr = row.IsNull("shipinstr") ? string.Empty : row.Field <string>("shipinstr"); entity.shiptoaddr1 = row.IsNull("shiptoaddr1") ? string.Empty : row.Field <string>("shiptoaddr1"); entity.shiptoaddr2 = row.IsNull("shiptoaddr2") ? string.Empty : row.Field <string>("shiptoaddr2"); entity.shiptoaddr3 = row.IsNull("shiptoaddr3") ? string.Empty : row.Field <string>("shiptoaddr3"); entity.shiptocity = row.IsNull("shiptocity") ? string.Empty : row.Field <string>("shiptocity"); entity.shiptonm = row.IsNull("shiptonm") ? string.Empty : row.Field <string>("shiptonm"); entity.shiptost = row.IsNull("shiptost") ? string.Empty : row.Field <string>("shiptost"); entity.shiptozip = row.IsNull("shiptozip") ? string.Empty : row.Field <string>("shiptozip"); entity.shipviaty = row.IsNull("shipviaty") ? string.Empty : row.Field <string>("shipviaty"); entity.sourcety = row.IsNull("sourcety") ? string.Empty : row.Field <string>("sourcety"); entity.subfl = row.Field <bool>("subfl"); entity.tarbuyamt = row.IsNull("tarbuyamt") ? decimal.Zero : row.Field <decimal>("tarbuyamt"); entity.tarbuytype = row.IsNull("tarbuytype") ? string.Empty : row.Field <string>("tarbuytype"); entity.termstype = row.IsNull("termstype") ? string.Empty : row.Field <string>("termstype"); entity.totbelowop = row.IsNull("totbelowop") ? 0 : row.Field <int>("totbelowop"); entity.totcritical = row.IsNull("totcritical") ? 0 : row.Field <int>("totcritical"); entity.totcubes = row.IsNull("totcubes") ? decimal.Zero : row.Field <decimal>("totcubes"); entity.totdoc = row.IsNull("totdoc") ? 0 : row.Field <int>("totdoc"); entity.totlineamt = row.IsNull("totlineamt") ? decimal.Zero : row.Field <decimal>("totlineamt"); entity.totnpna = row.IsNull("totnpna") ? 0 : row.Field <int>("totnpna"); entity.totqtyord = row.IsNull("totqtyord") ? decimal.Zero : row.Field <decimal>("totqtyord"); entity.totrush = row.IsNull("totrush") ? 0 : row.Field <int>("totrush"); entity.totsuper = row.IsNull("totsuper") ? 0 : row.Field <int>("totsuper"); entity.totweight = row.IsNull("totweight") ? decimal.Zero : row.Field <decimal>("totweight"); entity.transdt = row.Field <DateTime?>("transdt"); entity.transferloc = row.IsNull("transferloc") ? string.Empty : row.Field <string>("transferloc"); entity.transproc = row.IsNull("transproc") ? string.Empty : row.Field <string>("transproc"); entity.transtm = row.IsNull("transtm") ? string.Empty : row.Field <string>("transtm"); entity.transtype = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype"); entity.user1 = row.IsNull("user1") ? string.Empty : row.Field <string>("user1"); entity.user10 = row.IsNull("user10") ? string.Empty : row.Field <string>("user10"); entity.user11 = row.IsNull("user11") ? string.Empty : row.Field <string>("user11"); entity.user12 = row.IsNull("user12") ? string.Empty : row.Field <string>("user12"); entity.user13 = row.IsNull("user13") ? string.Empty : row.Field <string>("user13"); entity.user14 = row.IsNull("user14") ? string.Empty : row.Field <string>("user14"); entity.user15 = row.IsNull("user15") ? string.Empty : row.Field <string>("user15"); entity.user16 = row.IsNull("user16") ? string.Empty : row.Field <string>("user16"); entity.user17 = row.IsNull("user17") ? string.Empty : row.Field <string>("user17"); entity.user18 = row.IsNull("user18") ? string.Empty : row.Field <string>("user18"); entity.user19 = row.IsNull("user19") ? string.Empty : row.Field <string>("user19"); entity.user2 = row.IsNull("user2") ? string.Empty : row.Field <string>("user2"); entity.user20 = row.IsNull("user20") ? string.Empty : row.Field <string>("user20"); entity.user21 = row.IsNull("user21") ? string.Empty : row.Field <string>("user21"); entity.user22 = row.IsNull("user22") ? string.Empty : row.Field <string>("user22"); entity.user23 = row.IsNull("user23") ? string.Empty : row.Field <string>("user23"); entity.user24 = row.IsNull("user24") ? string.Empty : row.Field <string>("user24"); 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.vendno = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno"); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.wodiscamt = row.IsNull("wodiscamt") ? decimal.Zero : row.Field <decimal>("wodiscamt"); entity.wodiscoverfl = row.Field <bool>("wodiscoverfl"); entity.wodisctype = row.Field <bool>("wodisctype"); return(entity); }