Esempio n. 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromApeiinvoicedetail(ref DataRow row, Apeiinvoicedetail entity)
 {
     row.SetField("groupnm", entity.groupnm);
     row.SetField("apei-rowid", entity.apeiRowid.ToByteArray());
     row.SetField("vendno", entity.vendno);
     row.SetField("vendnoenabled", entity.vendnoenabled);
     row.SetField("transcd", entity.transcd);
     row.SetField("transcdenabled", entity.transcdenabled);
     row.SetField("transcdhidden", entity.transcdhidden);
     row.SetField("proctype", entity.proctype);
     row.SetField("proctypeitemsval", entity.proctypeitemsval);
     row.SetField("proctypeenabled", entity.proctypeenabled);
     row.SetField("proctypehidden", entity.proctypehidden);
     row.SetField("reversetype", entity.reversetype);
     row.SetField("reversetypeenabled", entity.reversetypeenabled);
     row.SetField("reversetypehidden", entity.reversetypehidden);
     row.SetField("appinvno", entity.appinvno);
     row.SetField("appinvnoenabled", entity.appinvnoenabled);
     row.SetField("appinvnohidden", entity.appinvnohidden);
     row.SetField("appinvdt", entity.appinvdt);
     row.SetField("maxpost", entity.maxpost);
     row.SetField("maxpostenabled", entity.maxpostenabled);
     row.SetField("maxposthidden", entity.maxposthidden);
     row.SetField("nopost", entity.nopost);
     row.SetField("nopostenabled", entity.nopostenabled);
     row.SetField("noposthidden", entity.noposthidden);
     row.SetField("immedpyfl", entity.immedpyfl);
     row.SetField("immedpyflenabled", entity.immedpyflenabled);
     row.SetField("disputefl", entity.disputefl);
     row.SetField("disputeflenabled", entity.disputeflenabled);
     row.SetField("suspfl", entity.suspfl);
     row.SetField("suspflenabled", entity.suspflenabled);
     row.SetField("apinvno", entity.apinvno);
     row.SetField("apinvnoenabled", entity.apinvnoenabled);
     row.SetField("apinvsuffix", entity.apinvsuffix);
     row.SetField("apinvsuffixenabled", entity.apinvsuffixenabled);
     row.SetField("apinvsuffixhidden", entity.apinvsuffixhidden);
     row.SetField("amount", entity.amount);
     row.SetField("amountenabled", entity.amountenabled);
     row.SetField("invdt", entity.invdt);
     row.SetField("invdtenabled", entity.invdtenabled);
     row.SetField("termstype", entity.termstype);
     row.SetField("termstypeenabled", entity.termstypeenabled);
     row.SetField("divno", entity.divno);
     row.SetField("divnoenabled", entity.divnoenabled);
     row.SetField("invtype", entity.invtype);
     row.SetField("invtypeenabled", entity.invtypeenabled);
     row.SetField("refer", entity.refer);
     row.SetField("referenabled", entity.referenabled);
     row.SetField("reconty", entity.reconty);
     row.SetField("recontyenabled", entity.recontyenabled);
     row.SetField("reconoverfl", entity.reconoverfl);
     row.SetField("reconoverflenabled", entity.reconoverflenabled);
     row.SetField("newinvfl", entity.newinvfl);
     row.SetField("bodachfl", entity.bodachfl);
     row.SetField("bodachflenabled", entity.bodachflenabled);
     row.SetField("bodachflhidden", entity.bodachflhidden);
     row.SetField("newinvflenabled", entity.newinvflenabled);
     row.SetField("newinvflhidden", entity.newinvflhidden);
     row.SetField("currencyty", entity.currencyty);
     row.SetField("currencytydesc", entity.currencytydesc);
     row.SetField("currencytyenabled", entity.currencytyenabled);
     row.SetField("currencytyhidden", entity.currencytyhidden);
     row.SetField("dSvFRate", entity.dSvFRate);
     row.SetField("dsvFrateEnabledFl", entity.dsvFrateEnabledFl);
     row.SetField("dsvFrateUpdateFl", entity.dsvFrateUpdateFl);
     row.SetField("iSvAdjGLDivNo", entity.iSvAdjGLDivNo);
     row.SetField("iSvAdjGLDeptNo", entity.iSvAdjGLDeptNo);
     row.SetField("iSvAdjGLAcctNo", entity.iSvAdjGLAcctNo);
     row.SetField("iSvAdjGLSubNo", entity.iSvAdjGLSubNo);
     row.SetField("createddt", entity.createddt);
     row.SetField("invseqno", entity.invseqno);
     row.SetField("createdby", entity.createdby);
     row.SetField("groupseqno", entity.groupseqno);
     row.SetField("grouptype", entity.grouptype);
     row.SetField("transtype", entity.transtype);
     row.SetField("stagecd", entity.stagecd);
     row.SetField("stagecdword", entity.stagecdword);
     row.SetField("manaddrfl", entity.manaddrfl);
     row.SetField("statusmsg", entity.statusmsg);
     row.SetField("edifl", entity.edifl);
     row.SetField("proctypeword", entity.proctypeword);
     row.SetField("recontyword", entity.recontyword);
     row.SetField("gloverfl", entity.gloverfl);
     row.SetField("termsoverfl", entity.termsoverfl);
     row.SetField("entertaxfl", entity.entertaxfl);
     row.SetField("gsttaxamt", entity.gsttaxamt);
     row.SetField("gsttaxrate", entity.gsttaxrate);
     row.SetField("gsttaxlabel", entity.gsttaxlabel);
     row.SetField("gstratelabel", entity.gstratelabel);
     row.SetField("gstenabled", entity.gstenabled);
     row.SetField("gsthidden", entity.gsthidden);
     row.SetField("psttaxamt", entity.psttaxamt);
     row.SetField("psttaxrate", entity.psttaxrate);
     row.SetField("psttaxlabel", entity.psttaxlabel);
     row.SetField("pstratelabel", entity.pstratelabel);
     row.SetField("pstenabled", entity.pstenabled);
     row.SetField("psthidden", entity.psthidden);
     row.SetField("settamt", entity.settamt);
     row.SetField("settamtenabled", entity.settamtenabled);
     row.SetField("settamthidden", entity.settamthidden);
     row.SetField("selfassessfl", entity.selfassessfl);
     row.SetField("selfassessenabled", entity.selfassessenabled);
     row.SetField("selfassesshidden", entity.selfassesshidden);
     row.SetField("taxstate", entity.taxstate);
     row.SetField("taxstateenabled", entity.taxstateenabled);
     row.SetField("taxstatehidden", entity.taxstatehidden);
     row.SetField("taxablefl", entity.taxablefl);
     row.SetField("taxableenabled", entity.taxableenabled);
     row.SetField("taxablehidden", entity.taxablehidden);
     row.SetField("vatproof", entity.vatproof);
     row.SetField("vatproofhidden", entity.vatproofhidden);
     row.SetField("vatprooflabel", entity.vatprooflabel);
     row.SetField("vat1taxamt", entity.vat1taxamt);
     row.SetField("vat1goodsamt", entity.vat1goodsamt);
     row.SetField("vat1taxrate", entity.vat1taxrate);
     row.SetField("vat1taxlabel", entity.vat1taxlabel);
     row.SetField("vat1ratelabel", entity.vat1ratelabel);
     row.SetField("vat1enabled", entity.vat1enabled);
     row.SetField("vat1hidden", entity.vat1hidden);
     row.SetField("vat1groupno", entity.vat1groupno);
     row.SetField("Vat1OverTol", entity.vat1OverTol);
     row.SetField("vat2taxamt", entity.vat2taxamt);
     row.SetField("vat2goodsamt", entity.vat2goodsamt);
     row.SetField("vat2taxrate", entity.vat2taxrate);
     row.SetField("vat2taxlabel", entity.vat2taxlabel);
     row.SetField("vat2ratelabel", entity.vat2ratelabel);
     row.SetField("vat2enabled", entity.vat2enabled);
     row.SetField("vat2hidden", entity.vat2hidden);
     row.SetField("vat2groupno", entity.vat2groupno);
     row.SetField("Vat2OverTol", entity.vat2OverTol);
     row.SetField("vat3taxamt", entity.vat3taxamt);
     row.SetField("vat3goodsamt", entity.vat3goodsamt);
     row.SetField("vat3taxrate", entity.vat3taxrate);
     row.SetField("vat3taxlabel", entity.vat3taxlabel);
     row.SetField("vat3ratelabel", entity.vat3ratelabel);
     row.SetField("vat3enabled", entity.vat3enabled);
     row.SetField("vat3hidden", entity.vat3hidden);
     row.SetField("vat3groupno", entity.vat3groupno);
     row.SetField("Vat3OverTol", entity.vat3OverTol);
     row.SetField("vat4taxamt", entity.vat4taxamt);
     row.SetField("vat4goodsamt", entity.vat4goodsamt);
     row.SetField("vat4taxrate", entity.vat4taxrate);
     row.SetField("vat4taxlabel", entity.vat4taxlabel);
     row.SetField("vat4ratelabel", entity.vat4ratelabel);
     row.SetField("vat4enabled", entity.vat4enabled);
     row.SetField("vat4hidden", entity.vat4hidden);
     row.SetField("vat4groupno", entity.vat4groupno);
     row.SetField("Vat4OverTol", entity.vat4OverTol);
     row.SetField("vat5taxamt", entity.vat5taxamt);
     row.SetField("vat5goodsamt", entity.vat5goodsamt);
     row.SetField("vat5taxrate", entity.vat5taxrate);
     row.SetField("vat5taxlabel", entity.vat5taxlabel);
     row.SetField("vat5ratelabel", entity.vat5ratelabel);
     row.SetField("vat5enabled", entity.vat5enabled);
     row.SetField("vat5hidden", entity.vat5hidden);
     row.SetField("vat5groupno", entity.vat5groupno);
     row.SetField("Vat5OverTol", entity.vat5OverTol);
     row.SetField("npclaimnoenabled", entity.npclaimnoenabled);
     row.SetField("npclaimnovisible", entity.npclaimnovisible);
     row.SetField("nppaidinfullflenabled", entity.nppaidinfullflenabled);
     row.SetField("nppaidinfullflvisible", entity.nppaidinfullflvisible);
     row.SetField("npclaimno", entity.npclaimno);
     row.SetField("nppaidinfullfl", entity.nppaidinfullfl);
     row.SetField("userfield", entity.userfield);
 }
Esempio n. 2
0
        public static Apeiinvoicedetail BuildApeiinvoicedetailFromRow(DataRow row)
        {
            Apeiinvoicedetail entity = new Apeiinvoicedetail();

            entity.groupnm            = row.IsNull("groupnm") ? string.Empty : row.Field <string>("groupnm");
            entity.apeiRowid          = row.Field <byte[]>("apei-rowid").ToStringEncoded();
            entity.vendno             = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.vendnoenabled      = row.Field <bool>("vendnoenabled");
            entity.transcd            = row.IsNull("transcd") ? 0 : row.Field <int>("transcd");
            entity.transcdenabled     = row.Field <bool>("transcdenabled");
            entity.transcdhidden      = row.Field <bool>("transcdhidden");
            entity.proctype           = row.IsNull("proctype") ? string.Empty : row.Field <string>("proctype");
            entity.proctypeitemsval   = row.IsNull("proctypeitemsval") ? string.Empty : row.Field <string>("proctypeitemsval");
            entity.proctypeenabled    = row.Field <bool>("proctypeenabled");
            entity.proctypehidden     = row.Field <bool>("proctypehidden");
            entity.reversetype        = row.IsNull("reversetype") ? string.Empty : row.Field <string>("reversetype");
            entity.reversetypeenabled = row.Field <bool>("reversetypeenabled");
            entity.reversetypehidden  = row.Field <bool>("reversetypehidden");
            entity.appinvno           = row.IsNull("appinvno") ? string.Empty : row.Field <string>("appinvno");
            entity.appinvnoenabled    = row.Field <bool>("appinvnoenabled");
            entity.appinvnohidden     = row.Field <bool>("appinvnohidden");
            entity.appinvdt           = row.Field <DateTime?>("appinvdt");
            entity.maxpost            = row.IsNull("maxpost") ? 0 : row.Field <int>("maxpost");
            entity.maxpostenabled     = row.Field <bool>("maxpostenabled");
            entity.maxposthidden      = row.Field <bool>("maxposthidden");
            entity.nopost             = row.IsNull("nopost") ? 0 : row.Field <int>("nopost");
            entity.nopostenabled      = row.Field <bool>("nopostenabled");
            entity.noposthidden       = row.Field <bool>("noposthidden");
            entity.immedpyfl          = row.Field <bool>("immedpyfl");
            entity.immedpyflenabled   = row.Field <bool>("immedpyflenabled");
            entity.disputefl          = row.Field <bool>("disputefl");
            entity.disputeflenabled   = row.Field <bool>("disputeflenabled");
            entity.suspfl             = row.Field <bool>("suspfl");
            entity.suspflenabled      = row.Field <bool>("suspflenabled");
            entity.apinvno            = row.IsNull("apinvno") ? string.Empty : row.Field <string>("apinvno");
            entity.apinvnoenabled     = row.Field <bool>("apinvnoenabled");
            entity.apinvsuffix        = row.IsNull("apinvsuffix") ? string.Empty : row.Field <string>("apinvsuffix");
            entity.apinvsuffixenabled = row.Field <bool>("apinvsuffixenabled");
            entity.apinvsuffixhidden  = row.Field <bool>("apinvsuffixhidden");
            entity.amount             = row.IsNull("amount") ? decimal.Zero : row.Field <decimal>("amount");
            entity.amountenabled      = row.Field <bool>("amountenabled");
            entity.invdt                 = row.Field <DateTime?>("invdt");
            entity.invdtenabled          = row.Field <bool>("invdtenabled");
            entity.termstype             = row.IsNull("termstype") ? string.Empty : row.Field <string>("termstype");
            entity.termstypeenabled      = row.Field <bool>("termstypeenabled");
            entity.divno                 = row.IsNull("divno") ? 0 : row.Field <int>("divno");
            entity.divnoenabled          = row.Field <bool>("divnoenabled");
            entity.invtype               = row.IsNull("invtype") ? string.Empty : row.Field <string>("invtype");
            entity.invtypeenabled        = row.Field <bool>("invtypeenabled");
            entity.refer                 = row.IsNull("refer") ? string.Empty : row.Field <string>("refer");
            entity.referenabled          = row.Field <bool>("referenabled");
            entity.reconty               = row.IsNull("reconty") ? string.Empty : row.Field <string>("reconty");
            entity.recontyenabled        = row.Field <bool>("recontyenabled");
            entity.reconoverfl           = row.Field <bool>("reconoverfl");
            entity.reconoverflenabled    = row.Field <bool>("reconoverflenabled");
            entity.newinvfl              = row.Field <bool>("newinvfl");
            entity.bodachfl              = row.Field <bool>("bodachfl");
            entity.bodachflenabled       = row.Field <bool>("bodachflenabled");
            entity.bodachflhidden        = row.Field <bool>("bodachflhidden");
            entity.newinvflenabled       = row.Field <bool>("newinvflenabled");
            entity.newinvflhidden        = row.Field <bool>("newinvflhidden");
            entity.currencyty            = row.IsNull("currencyty") ? string.Empty : row.Field <string>("currencyty");
            entity.currencytydesc        = row.IsNull("currencytydesc") ? string.Empty : row.Field <string>("currencytydesc");
            entity.currencytyenabled     = row.Field <bool>("currencytyenabled");
            entity.currencytyhidden      = row.Field <bool>("currencytyhidden");
            entity.dSvFRate              = row.IsNull("dSvFRate") ? decimal.Zero : row.Field <decimal>("dSvFRate");
            entity.dsvFrateEnabledFl     = row.Field <bool>("dsvFrateEnabledFl");
            entity.dsvFrateUpdateFl      = row.Field <bool>("dsvFrateUpdateFl");
            entity.iSvAdjGLDivNo         = row.IsNull("iSvAdjGLDivNo") ? 0 : row.Field <int>("iSvAdjGLDivNo");
            entity.iSvAdjGLDeptNo        = row.IsNull("iSvAdjGLDeptNo") ? 0 : row.Field <int>("iSvAdjGLDeptNo");
            entity.iSvAdjGLAcctNo        = row.IsNull("iSvAdjGLAcctNo") ? 0 : row.Field <int>("iSvAdjGLAcctNo");
            entity.iSvAdjGLSubNo         = row.IsNull("iSvAdjGLSubNo") ? 0 : row.Field <int>("iSvAdjGLSubNo");
            entity.createddt             = row.Field <DateTime?>("createddt");
            entity.invseqno              = row.IsNull("invseqno") ? 0 : row.Field <int>("invseqno");
            entity.createdby             = row.IsNull("createdby") ? string.Empty : row.Field <string>("createdby");
            entity.groupseqno            = row.IsNull("groupseqno") ? 0 : row.Field <int>("groupseqno");
            entity.grouptype             = row.IsNull("grouptype") ? string.Empty : row.Field <string>("grouptype");
            entity.transtype             = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype");
            entity.stagecd               = row.IsNull("stagecd") ? 0 : row.Field <int>("stagecd");
            entity.stagecdword           = row.IsNull("stagecdword") ? string.Empty : row.Field <string>("stagecdword");
            entity.manaddrfl             = row.Field <bool>("manaddrfl");
            entity.statusmsg             = row.IsNull("statusmsg") ? string.Empty : row.Field <string>("statusmsg");
            entity.edifl                 = row.Field <bool>("edifl");
            entity.proctypeword          = row.IsNull("proctypeword") ? string.Empty : row.Field <string>("proctypeword");
            entity.recontyword           = row.IsNull("recontyword") ? string.Empty : row.Field <string>("recontyword");
            entity.gloverfl              = row.Field <bool>("gloverfl");
            entity.termsoverfl           = row.Field <bool>("termsoverfl");
            entity.entertaxfl            = row.Field <bool>("entertaxfl");
            entity.gsttaxamt             = row.IsNull("gsttaxamt") ? decimal.Zero : row.Field <decimal>("gsttaxamt");
            entity.gsttaxrate            = row.IsNull("gsttaxrate") ? decimal.Zero : row.Field <decimal>("gsttaxrate");
            entity.gsttaxlabel           = row.IsNull("gsttaxlabel") ? string.Empty : row.Field <string>("gsttaxlabel");
            entity.gstratelabel          = row.IsNull("gstratelabel") ? string.Empty : row.Field <string>("gstratelabel");
            entity.gstenabled            = row.Field <bool>("gstenabled");
            entity.gsthidden             = row.Field <bool>("gsthidden");
            entity.psttaxamt             = row.IsNull("psttaxamt") ? decimal.Zero : row.Field <decimal>("psttaxamt");
            entity.psttaxrate            = row.IsNull("psttaxrate") ? decimal.Zero : row.Field <decimal>("psttaxrate");
            entity.psttaxlabel           = row.IsNull("psttaxlabel") ? string.Empty : row.Field <string>("psttaxlabel");
            entity.pstratelabel          = row.IsNull("pstratelabel") ? string.Empty : row.Field <string>("pstratelabel");
            entity.pstenabled            = row.Field <bool>("pstenabled");
            entity.psthidden             = row.Field <bool>("psthidden");
            entity.settamt               = row.IsNull("settamt") ? decimal.Zero : row.Field <decimal>("settamt");
            entity.settamtenabled        = row.Field <bool>("settamtenabled");
            entity.settamthidden         = row.Field <bool>("settamthidden");
            entity.selfassessfl          = row.Field <bool>("selfassessfl");
            entity.selfassessenabled     = row.Field <bool>("selfassessenabled");
            entity.selfassesshidden      = row.Field <bool>("selfassesshidden");
            entity.taxstate              = row.IsNull("taxstate") ? string.Empty : row.Field <string>("taxstate");
            entity.taxstateenabled       = row.Field <bool>("taxstateenabled");
            entity.taxstatehidden        = row.Field <bool>("taxstatehidden");
            entity.taxablefl             = row.Field <bool>("taxablefl");
            entity.taxableenabled        = row.Field <bool>("taxableenabled");
            entity.taxablehidden         = row.Field <bool>("taxablehidden");
            entity.vatproof              = row.IsNull("vatproof") ? decimal.Zero : row.Field <decimal>("vatproof");
            entity.vatproofhidden        = row.Field <bool>("vatproofhidden");
            entity.vatprooflabel         = row.IsNull("vatprooflabel") ? string.Empty : row.Field <string>("vatprooflabel");
            entity.vat1taxamt            = row.IsNull("vat1taxamt") ? decimal.Zero : row.Field <decimal>("vat1taxamt");
            entity.vat1goodsamt          = row.IsNull("vat1goodsamt") ? decimal.Zero : row.Field <decimal>("vat1goodsamt");
            entity.vat1taxrate           = row.IsNull("vat1taxrate") ? decimal.Zero : row.Field <decimal>("vat1taxrate");
            entity.vat1taxlabel          = row.IsNull("vat1taxlabel") ? string.Empty : row.Field <string>("vat1taxlabel");
            entity.vat1ratelabel         = row.IsNull("vat1ratelabel") ? string.Empty : row.Field <string>("vat1ratelabel");
            entity.vat1enabled           = row.Field <bool>("vat1enabled");
            entity.vat1hidden            = row.Field <bool>("vat1hidden");
            entity.vat1groupno           = row.IsNull("vat1groupno") ? 0 : row.Field <int>("vat1groupno");
            entity.vat1OverTol           = row.Field <bool>("Vat1OverTol");
            entity.vat2taxamt            = row.IsNull("vat2taxamt") ? decimal.Zero : row.Field <decimal>("vat2taxamt");
            entity.vat2goodsamt          = row.IsNull("vat2goodsamt") ? decimal.Zero : row.Field <decimal>("vat2goodsamt");
            entity.vat2taxrate           = row.IsNull("vat2taxrate") ? decimal.Zero : row.Field <decimal>("vat2taxrate");
            entity.vat2taxlabel          = row.IsNull("vat2taxlabel") ? string.Empty : row.Field <string>("vat2taxlabel");
            entity.vat2ratelabel         = row.IsNull("vat2ratelabel") ? string.Empty : row.Field <string>("vat2ratelabel");
            entity.vat2enabled           = row.Field <bool>("vat2enabled");
            entity.vat2hidden            = row.Field <bool>("vat2hidden");
            entity.vat2groupno           = row.IsNull("vat2groupno") ? 0 : row.Field <int>("vat2groupno");
            entity.vat2OverTol           = row.Field <bool>("Vat2OverTol");
            entity.vat3taxamt            = row.IsNull("vat3taxamt") ? decimal.Zero : row.Field <decimal>("vat3taxamt");
            entity.vat3goodsamt          = row.IsNull("vat3goodsamt") ? decimal.Zero : row.Field <decimal>("vat3goodsamt");
            entity.vat3taxrate           = row.IsNull("vat3taxrate") ? decimal.Zero : row.Field <decimal>("vat3taxrate");
            entity.vat3taxlabel          = row.IsNull("vat3taxlabel") ? string.Empty : row.Field <string>("vat3taxlabel");
            entity.vat3ratelabel         = row.IsNull("vat3ratelabel") ? string.Empty : row.Field <string>("vat3ratelabel");
            entity.vat3enabled           = row.Field <bool>("vat3enabled");
            entity.vat3hidden            = row.Field <bool>("vat3hidden");
            entity.vat3groupno           = row.IsNull("vat3groupno") ? 0 : row.Field <int>("vat3groupno");
            entity.vat3OverTol           = row.Field <bool>("Vat3OverTol");
            entity.vat4taxamt            = row.IsNull("vat4taxamt") ? decimal.Zero : row.Field <decimal>("vat4taxamt");
            entity.vat4goodsamt          = row.IsNull("vat4goodsamt") ? decimal.Zero : row.Field <decimal>("vat4goodsamt");
            entity.vat4taxrate           = row.IsNull("vat4taxrate") ? decimal.Zero : row.Field <decimal>("vat4taxrate");
            entity.vat4taxlabel          = row.IsNull("vat4taxlabel") ? string.Empty : row.Field <string>("vat4taxlabel");
            entity.vat4ratelabel         = row.IsNull("vat4ratelabel") ? string.Empty : row.Field <string>("vat4ratelabel");
            entity.vat4enabled           = row.Field <bool>("vat4enabled");
            entity.vat4hidden            = row.Field <bool>("vat4hidden");
            entity.vat4groupno           = row.IsNull("vat4groupno") ? 0 : row.Field <int>("vat4groupno");
            entity.vat4OverTol           = row.Field <bool>("Vat4OverTol");
            entity.vat5taxamt            = row.IsNull("vat5taxamt") ? decimal.Zero : row.Field <decimal>("vat5taxamt");
            entity.vat5goodsamt          = row.IsNull("vat5goodsamt") ? decimal.Zero : row.Field <decimal>("vat5goodsamt");
            entity.vat5taxrate           = row.IsNull("vat5taxrate") ? decimal.Zero : row.Field <decimal>("vat5taxrate");
            entity.vat5taxlabel          = row.IsNull("vat5taxlabel") ? string.Empty : row.Field <string>("vat5taxlabel");
            entity.vat5ratelabel         = row.IsNull("vat5ratelabel") ? string.Empty : row.Field <string>("vat5ratelabel");
            entity.vat5enabled           = row.Field <bool>("vat5enabled");
            entity.vat5hidden            = row.Field <bool>("vat5hidden");
            entity.vat5groupno           = row.IsNull("vat5groupno") ? 0 : row.Field <int>("vat5groupno");
            entity.vat5OverTol           = row.Field <bool>("Vat5OverTol");
            entity.npclaimnoenabled      = row.Field <bool>("npclaimnoenabled");
            entity.npclaimnovisible      = row.Field <bool>("npclaimnovisible");
            entity.nppaidinfullflenabled = row.Field <bool>("nppaidinfullflenabled");
            entity.nppaidinfullflvisible = row.Field <bool>("nppaidinfullflvisible");
            entity.npclaimno             = row.IsNull("npclaimno") ? string.Empty : row.Field <string>("npclaimno");
            entity.nppaidinfullfl        = row.Field <bool>("nppaidinfullfl");
            entity.userfield             = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }