Exemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPohdr(ref DataRow row, Pohdr entity)
 {
     row.SetField("ackdt", entity.ackdt);
     row.SetField("ackoper", entity.ackoper);
     row.SetField("ackrsn", entity.ackrsn);
     row.SetField("acktype", entity.acktype);
     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("addondist1", entity.addondist1);
     row.SetField("addondist2", entity.addondist2);
     row.SetField("addondist3", entity.addondist3);
     row.SetField("addondist4", entity.addondist4);
     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("addr1", entity.addr1);
     row.SetField("addr2", entity.addr2);
     row.SetField("addr3", entity.addr3);
     row.SetField("apholdfl", entity.apholdfl);
     row.SetField("apinvno", entity.apinvno);
     row.SetField("approvty", entity.approvty);
     row.SetField("billtowhse", entity.billtowhse);
     row.SetField("bofl", entity.bofl);
     row.SetField("borelfl", entity.borelfl);
     row.SetField("buyer", entity.buyer);
     row.SetField("city", entity.city);
     row.SetField("confirmfl", entity.confirmfl);
     row.SetField("contactid", entity.contactid);
     row.SetField("contractno", entity.contractno);
     row.SetField("countrycd", entity.countrycd);
     row.SetField("createdby", entity.createdby);
     row.SetField("crreasonty", entity.crreasonty);
     row.SetField("ctarget", entity.ctarget);
     row.SetField("currencydesc", entity.currencydesc);
     row.SetField("currencyty", entity.currencyty);
     row.SetField("divno", entity.divno);
     row.SetField("dtarget", entity.dtarget);
     row.SetField("duedt", entity.duedt);
     row.SetField("errormess", entity.errormess);
     row.SetField("expshipdt", entity.expshipdt);
     row.SetField("filler-1", entity.filler1);
     row.SetField("filler-2", entity.filler2);
     row.SetField("fobfl", entity.fobfl);
     row.SetField("freightexpectedty", entity.freightexpectedty);
     row.SetField("frtbillacct", entity.frtbillacct);
     row.SetField("frttermscd", entity.frttermscd);
     row.SetField("geocd", entity.geocd);
     row.SetField("ignoreltfl", entity.ignoreltfl);
     row.SetField("linefl", entity.linefl);
     row.SetField("manaddr1", entity.manaddr1);
     row.SetField("manaddr2", entity.manaddr2);
     row.SetField("manaddr3", entity.manaddr3);
     row.SetField("mancity", entity.mancity);
     row.SetField("manname", entity.manname);
     row.SetField("manstate", entity.manstate);
     row.SetField("manzipcd", entity.manzipcd);
     row.SetField("name", entity.name);
     row.SetField("orderaltno", entity.orderaltno);
     row.SetField("orderaltsuf", entity.orderaltsuf);
     row.SetField("orderdisp", entity.orderdisp);
     row.SetField("orderdt", entity.orderdt);
     row.SetField("outofcityfl", entity.outofcityfl);
     row.SetField("poehrecid", entity.poehrecid);
     row.SetField("poehrowid", entity.poehrowid);
     row.SetField("pono", entity.pono);
     row.SetField("posuf", entity.posuf);
     row.SetField("potype", entity.potype);
     row.SetField("printprfl", entity.printprfl);
     row.SetField("prodline", entity.prodline);
     row.SetField("qtarget", entity.qtarget);
     row.SetField("refer", entity.refer);
     row.SetField("reqshipdt", entity.reqshipdt);
     row.SetField("resalefl", entity.resalefl);
     row.SetField("resaleno", entity.resaleno);
     row.SetField("rowpointer", entity.rowpointer);
     row.SetField("rushfl", entity.rushfl);
     row.SetField("secure", entity.secure);
     row.SetField("shipfmno", entity.shipfmno);
     row.SetField("shipinstr", entity.shipinstr);
     row.SetField("extshipinstr", entity.extshipinstr);
     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("stagecd", entity.stagecd);
     row.SetField("state", entity.state);
     row.SetField("subfl", entity.subfl);
     row.SetField("tarbuy", entity.tarbuy);
     row.SetField("termstype", entity.termstype);
     row.SetField("totcubes", entity.totcubes);
     row.SetField("totlineamt", entity.totlineamt);
     row.SetField("totqtyord", entity.totqtyord);
     row.SetField("totrcvamt", entity.totrcvamt);
     row.SetField("totweight", entity.totweight);
     row.SetField("transferloc", entity.transferloc);
     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("vendname", entity.vendname);
     row.SetField("vendretauth", entity.vendretauth);
     row.SetField("visiblelist", entity.visiblelist);
     row.SetField("warning", entity.warning);
     row.SetField("whse", entity.whse);
     row.SetField("wlwhsefl", entity.wlwhsefl);
     row.SetField("wodiscamt", entity.wodiscamt);
     row.SetField("wodiscdist", entity.wodiscdist);
     row.SetField("wodiscnet", entity.wodiscnet);
     row.SetField("wodiscres", entity.wodiscres);
     row.SetField("wodisctype", entity.wodisctype);
     row.SetField("wtarget", entity.wtarget);
     row.SetField("zipcd", entity.zipcd);
     row.SetField("ap-amount", entity.apAmount);
     row.SetField("ap-appinvdt", entity.apAppinvdt);
     row.SetField("billtocountry", entity.billtocountry);
     row.SetField("caddondistr1", entity.caddondistr1);
     row.SetField("caddondistr2", entity.caddondistr2);
     row.SetField("caddondistr3", entity.caddondistr3);
     row.SetField("caddondistr4", entity.caddondistr4);
     row.SetField("currsymbol", entity.currsymbol);
     row.SetField("freeformaddr", entity.freeformaddr);
     row.SetField("maintmode", entity.maintmode);
     row.SetField("modvtfl", entity.modvtfl);
     row.SetField("seecostfl", entity.seecostfl);
     row.SetField("stagedesc", entity.stagedesc);
     row.SetField("taxapwithtwe", entity.taxapwithtwe);
     row.SetField("taxinterfacety", entity.taxinterfacety);
     row.SetField("totaddonamt", entity.totaddonamt);
     row.SetField("trackingnos", entity.trackingnos);
     row.SetField("vendcurrsymbol", entity.vendcurrsymbol);
     row.SetField("vendorcreditexists", entity.vendorcreditexists);
     row.SetField("vendordno", entity.vendordno);
     row.SetField("new-frtbillacct", entity.newFrtbillacct);
     row.SetField("notesfl", entity.notesfl);
     row.SetField("totlineamt-hidden", entity.totlineamtHidden);
     row.SetField("totaddonamt-hidden", entity.totaddonamtHidden);
     row.SetField("addoncapfl-sensitive", entity.addoncapflSensitive);
     row.SetField("addontype-sensitive", entity.addontypeSensitive);
     row.SetField("approval-sensitive", entity.approvalSensitive);
     row.SetField("resalefl-sensitive", entity.resaleflSensitive);
     row.SetField("termstype-sensitive", entity.termstypeSensitive);
     row.SetField("shiptoaddr-sensitive", entity.shiptoaddrSensitive);
     row.SetField("wodisc-sensitive", entity.wodiscSensitive);
     row.SetField("fiGeoCode-sensitive", entity.fiGeoCodeSensitive);
     row.SetField("tgOutOfCityFl-sensitive", entity.tgOutOfCityFlSensitive);
     row.SetField("btnLookupGeoCd-sensitive", entity.btnLookupGeoCdSensitive);
     row.SetField("vendordno-sensitive", entity.vendordnoSensitive);
     row.SetField("userfield", entity.userfield);
 }
Exemplo n.º 2
0
        public static Pohdr BuildPohdrFromRow(DataRow row)
        {
            Pohdr entity = new Pohdr();

            entity.ackdt                   = row.Field <DateTime?>("ackdt");
            entity.ackoper                 = row.IsNull("ackoper") ? string.Empty : row.Field <string>("ackoper");
            entity.ackrsn                  = row.IsNull("ackrsn") ? string.Empty : row.Field <string>("ackrsn");
            entity.acktype                 = row.IsNull("acktype") ? string.Empty : row.Field <string>("acktype");
            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.addondist1              = row.IsNull("addondist1") ? decimal.Zero : row.Field <decimal>("addondist1");
            entity.addondist2              = row.IsNull("addondist2") ? decimal.Zero : row.Field <decimal>("addondist2");
            entity.addondist3              = row.IsNull("addondist3") ? decimal.Zero : row.Field <decimal>("addondist3");
            entity.addondist4              = row.IsNull("addondist4") ? decimal.Zero : row.Field <decimal>("addondist4");
            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.addr1                   = row.IsNull("addr1") ? string.Empty : row.Field <string>("addr1");
            entity.addr2                   = row.IsNull("addr2") ? string.Empty : row.Field <string>("addr2");
            entity.addr3                   = row.IsNull("addr3") ? string.Empty : row.Field <string>("addr3");
            entity.apholdfl                = row.Field <bool>("apholdfl");
            entity.apinvno                 = row.IsNull("apinvno") ? string.Empty : row.Field <string>("apinvno");
            entity.approvty                = row.IsNull("approvty") ? string.Empty : row.Field <string>("approvty");
            entity.billtowhse              = row.IsNull("billtowhse") ? string.Empty : row.Field <string>("billtowhse");
            entity.bofl                    = row.Field <bool>("bofl");
            entity.borelfl                 = row.Field <bool>("borelfl");
            entity.buyer                   = row.IsNull("buyer") ? string.Empty : row.Field <string>("buyer");
            entity.city                    = row.IsNull("city") ? string.Empty : row.Field <string>("city");
            entity.confirmfl               = row.Field <bool>("confirmfl");
            entity.contactid               = row.IsNull("contactid") ? decimal.Zero : row.Field <decimal>("contactid");
            entity.contractno              = row.IsNull("contractno") ? string.Empty : row.Field <string>("contractno");
            entity.countrycd               = row.IsNull("countrycd") ? string.Empty : row.Field <string>("countrycd");
            entity.createdby               = row.IsNull("createdby") ? string.Empty : row.Field <string>("createdby");
            entity.crreasonty              = row.IsNull("crreasonty") ? string.Empty : row.Field <string>("crreasonty");
            entity.ctarget                 = row.IsNull("ctarget") ? string.Empty : row.Field <string>("ctarget");
            entity.currencydesc            = row.IsNull("currencydesc") ? string.Empty : row.Field <string>("currencydesc");
            entity.currencyty              = row.IsNull("currencyty") ? string.Empty : row.Field <string>("currencyty");
            entity.divno                   = row.IsNull("divno") ? 0 : row.Field <int>("divno");
            entity.dtarget                 = row.IsNull("dtarget") ? string.Empty : row.Field <string>("dtarget");
            entity.duedt                   = row.Field <DateTime?>("duedt");
            entity.errormess               = row.IsNull("errormess") ? string.Empty : row.Field <string>("errormess");
            entity.expshipdt               = row.Field <DateTime?>("expshipdt");
            entity.filler1                 = row.IsNull("filler-1") ? string.Empty : row.Field <string>("filler-1");
            entity.filler2                 = row.IsNull("filler-2") ? string.Empty : row.Field <string>("filler-2");
            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.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.linefl                  = row.Field <bool>("linefl");
            entity.manaddr1                = row.IsNull("manaddr1") ? string.Empty : row.Field <string>("manaddr1");
            entity.manaddr2                = row.IsNull("manaddr2") ? string.Empty : row.Field <string>("manaddr2");
            entity.manaddr3                = row.IsNull("manaddr3") ? string.Empty : row.Field <string>("manaddr3");
            entity.mancity                 = row.IsNull("mancity") ? string.Empty : row.Field <string>("mancity");
            entity.manname                 = row.IsNull("manname") ? string.Empty : row.Field <string>("manname");
            entity.manstate                = row.IsNull("manstate") ? string.Empty : row.Field <string>("manstate");
            entity.manzipcd                = row.IsNull("manzipcd") ? string.Empty : row.Field <string>("manzipcd");
            entity.name                    = row.IsNull("name") ? string.Empty : row.Field <string>("name");
            entity.orderaltno              = row.IsNull("orderaltno") ? 0 : row.Field <int>("orderaltno");
            entity.orderaltsuf             = row.IsNull("orderaltsuf") ? 0 : row.Field <int>("orderaltsuf");
            entity.orderdisp               = row.IsNull("orderdisp") ? string.Empty : row.Field <string>("orderdisp");
            entity.orderdt                 = row.Field <DateTime?>("orderdt");
            entity.outofcityfl             = row.Field <bool>("outofcityfl");
            entity.poehrecid               = row.IsNull("poehrecid") ? 0 : row.Field <long>("poehrecid");
            entity.poehrowid               = row.IsNull("poehrowid") ? string.Empty : row.Field <string>("poehrowid");
            entity.pono                    = row.IsNull("pono") ? 0 : row.Field <int>("pono");
            entity.posuf                   = row.IsNull("posuf") ? 0 : row.Field <int>("posuf");
            entity.potype                  = row.IsNull("potype") ? string.Empty : row.Field <string>("potype");
            entity.printprfl               = row.Field <bool>("printprfl");
            entity.prodline                = row.IsNull("prodline") ? string.Empty : row.Field <string>("prodline");
            entity.qtarget                 = row.IsNull("qtarget") ? string.Empty : row.Field <string>("qtarget");
            entity.refer                   = row.IsNull("refer") ? string.Empty : row.Field <string>("refer");
            entity.reqshipdt               = row.Field <DateTime?>("reqshipdt");
            entity.resalefl                = row.Field <bool>("resalefl");
            entity.resaleno                = row.IsNull("resaleno") ? string.Empty : row.Field <string>("resaleno");
            entity.rowpointer              = row.IsNull("rowpointer") ? string.Empty : row.Field <string>("rowpointer");
            entity.rushfl                  = row.Field <bool>("rushfl");
            entity.secure                  = row.IsNull("secure") ? 0 : row.Field <int>("secure");
            entity.shipfmno                = row.IsNull("shipfmno") ? 0 : row.Field <int>("shipfmno");
            entity.shipinstr               = row.IsNull("shipinstr") ? string.Empty : row.Field <string>("shipinstr");
            entity.extshipinstr            = row.IsNull("extshipinstr") ? string.Empty : row.Field <string>("extshipinstr");
            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.stagecd                 = row.IsNull("stagecd") ? 0 : row.Field <int>("stagecd");
            entity.state                   = row.IsNull("state") ? string.Empty : row.Field <string>("state");
            entity.subfl                   = row.Field <bool>("subfl");
            entity.tarbuy                  = row.IsNull("tarbuy") ? decimal.Zero : row.Field <decimal>("tarbuy");
            entity.termstype               = row.IsNull("termstype") ? string.Empty : row.Field <string>("termstype");
            entity.totcubes                = row.IsNull("totcubes") ? decimal.Zero : row.Field <decimal>("totcubes");
            entity.totlineamt              = row.IsNull("totlineamt") ? decimal.Zero : row.Field <decimal>("totlineamt");
            entity.totqtyord               = row.IsNull("totqtyord") ? decimal.Zero : row.Field <decimal>("totqtyord");
            entity.totrcvamt               = row.IsNull("totrcvamt") ? decimal.Zero : row.Field <decimal>("totrcvamt");
            entity.totweight               = row.IsNull("totweight") ? decimal.Zero : row.Field <decimal>("totweight");
            entity.transferloc             = row.IsNull("transferloc") ? string.Empty : row.Field <string>("transferloc");
            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.vendname                = row.IsNull("vendname") ? string.Empty : row.Field <string>("vendname");
            entity.vendretauth             = row.IsNull("vendretauth") ? string.Empty : row.Field <string>("vendretauth");
            entity.visiblelist             = row.IsNull("visiblelist") ? string.Empty : row.Field <string>("visiblelist");
            entity.warning                 = row.IsNull("warning") ? string.Empty : row.Field <string>("warning");
            entity.whse                    = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.wlwhsefl                = row.Field <bool>("wlwhsefl");
            entity.wodiscamt               = row.IsNull("wodiscamt") ? decimal.Zero : row.Field <decimal>("wodiscamt");
            entity.wodiscdist              = row.IsNull("wodiscdist") ? decimal.Zero : row.Field <decimal>("wodiscdist");
            entity.wodiscnet               = row.IsNull("wodiscnet") ? decimal.Zero : row.Field <decimal>("wodiscnet");
            entity.wodiscres               = row.IsNull("wodiscres") ? decimal.Zero : row.Field <decimal>("wodiscres");
            entity.wodisctype              = row.Field <bool>("wodisctype");
            entity.wtarget                 = row.IsNull("wtarget") ? string.Empty : row.Field <string>("wtarget");
            entity.zipcd                   = row.IsNull("zipcd") ? string.Empty : row.Field <string>("zipcd");
            entity.apAmount                = row.IsNull("ap-amount") ? decimal.Zero : row.Field <decimal>("ap-amount");
            entity.apAppinvdt              = row.Field <DateTime?>("ap-appinvdt");
            entity.billtocountry           = row.IsNull("billtocountry") ? string.Empty : row.Field <string>("billtocountry");
            entity.caddondistr1            = row.IsNull("caddondistr1") ? string.Empty : row.Field <string>("caddondistr1");
            entity.caddondistr2            = row.IsNull("caddondistr2") ? string.Empty : row.Field <string>("caddondistr2");
            entity.caddondistr3            = row.IsNull("caddondistr3") ? string.Empty : row.Field <string>("caddondistr3");
            entity.caddondistr4            = row.IsNull("caddondistr4") ? string.Empty : row.Field <string>("caddondistr4");
            entity.currsymbol              = row.IsNull("currsymbol") ? string.Empty : row.Field <string>("currsymbol");
            entity.freeformaddr            = row.Field <bool>("freeformaddr");
            entity.maintmode               = row.Field <bool>("maintmode");
            entity.modvtfl                 = row.Field <bool>("modvtfl");
            entity.seecostfl               = row.Field <bool>("seecostfl");
            entity.stagedesc               = row.IsNull("stagedesc") ? string.Empty : row.Field <string>("stagedesc");
            entity.taxapwithtwe            = row.IsNull("taxapwithtwe") ? string.Empty : row.Field <string>("taxapwithtwe");
            entity.taxinterfacety          = row.IsNull("taxinterfacety") ? string.Empty : row.Field <string>("taxinterfacety");
            entity.totaddonamt             = row.IsNull("totaddonamt") ? decimal.Zero : row.Field <decimal>("totaddonamt");
            entity.trackingnos             = row.IsNull("trackingnos") ? string.Empty : row.Field <string>("trackingnos");
            entity.vendcurrsymbol          = row.IsNull("vendcurrsymbol") ? string.Empty : row.Field <string>("vendcurrsymbol");
            entity.vendorcreditexists      = row.Field <bool>("vendorcreditexists");
            entity.vendordno               = row.IsNull("vendordno") ? string.Empty : row.Field <string>("vendordno");
            entity.newFrtbillacct          = row.IsNull("new-frtbillacct") ? string.Empty : row.Field <string>("new-frtbillacct");
            entity.notesfl                 = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl");
            entity.totlineamtHidden        = row.Field <bool>("totlineamt-hidden");
            entity.totaddonamtHidden       = row.Field <bool>("totaddonamt-hidden");
            entity.addoncapflSensitive     = row.Field <bool>("addoncapfl-sensitive");
            entity.addontypeSensitive      = row.Field <bool>("addontype-sensitive");
            entity.approvalSensitive       = row.Field <bool>("approval-sensitive");
            entity.resaleflSensitive       = row.Field <bool>("resalefl-sensitive");
            entity.termstypeSensitive      = row.Field <bool>("termstype-sensitive");
            entity.shiptoaddrSensitive     = row.Field <bool>("shiptoaddr-sensitive");
            entity.wodiscSensitive         = row.Field <bool>("wodisc-sensitive");
            entity.fiGeoCodeSensitive      = row.Field <bool>("fiGeoCode-sensitive");
            entity.tgOutOfCityFlSensitive  = row.Field <bool>("tgOutOfCityFl-sensitive");
            entity.btnLookupGeoCdSensitive = row.Field <bool>("btnLookupGeoCd-sensitive");
            entity.vendordnoSensitive      = row.Field <bool>("vendordno-sensitive");
            entity.userfield               = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }