Exemple #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromArettrans(ref DataRow row, Arettrans entity)
 {
     row.SetField("addonamt1", entity.addonamt1);
     row.SetField("addonamt2", entity.addonamt2);
     row.SetField("addonamt3", entity.addonamt3);
     row.SetField("addonamt4", entity.addonamt4);
     row.SetField("amount", entity.amount);
     row.SetField("appinvdt", entity.appinvdt);
     row.SetField("appinvno", entity.appinvno);
     row.SetField("appinvsuf", entity.appinvsuf);
     row.SetField("apptranscd", entity.apptranscd);
     row.SetField("checkno", entity.checkno);
     row.SetField("checknopaid", entity.checknopaid);
     row.SetField("codcollamt", entity.codcollamt);
     row.SetField("cono", entity.cono);
     row.SetField("crjrnlno", entity.crjrnlno);
     row.SetField("crsetno", entity.crsetno);
     row.SetField("cTransType", entity.cTransType);
     row.SetField("custno", entity.custno);
     row.SetField("discamt", entity.discamt);
     row.SetField("discdt", entity.discdt);
     row.SetField("DispSeq", entity.dispSeq);
     row.SetField("disputefl", entity.disputefl);
     row.SetField("divno", entity.divno);
     row.SetField("duedt", entity.duedt);
     row.SetField("exchgrate1", entity.exchgrate1);
     row.SetField("exchgrate2", entity.exchgrate2);
     row.SetField("glacctno", entity.glacctno);
     row.SetField("gldeptno", entity.gldeptno);
     row.SetField("gldivno", entity.gldivno);
     row.SetField("glsubno", entity.glsubno);
     row.SetField("invdt", entity.invdt);
     row.SetField("invno", entity.invno);
     row.SetField("invsuf", entity.invsuf);
     row.SetField("jrnlamt", entity.jrnlamt);
     row.SetField("jrnlno", entity.jrnlno);
     row.SetField("location", entity.location);
     row.SetField("module", entity.module);
     row.SetField("nextseqno", entity.nextseqno);
     row.SetField("notesfl", entity.notesfl);
     row.SetField("operinit", entity.operinit);
     row.SetField("origdisc", entity.origdisc);
     row.SetField("origseqno", entity.origseqno);
     row.SetField("paymtamt", entity.paymtamt);
     row.SetField("paymtcd", entity.paymtcd);
     row.SetField("paymtdt", entity.paymtdt);
     row.SetField("percal", entity.percal);
     row.SetField("perfisc", entity.perfisc);
     row.SetField("period", entity.period);
     row.SetField("pifamt", entity.pifamt);
     row.SetField("postdt", entity.postdt);
     row.SetField("refer", entity.refer);
     row.SetField("seqno", entity.seqno);
     row.SetField("setno", entity.setno);
     row.SetField("shipto", entity.shipto);
     row.SetField("slsytdfl", entity.slsytdfl);
     row.SetField("sourcecd", entity.sourcecd);
     row.SetField("statustype", entity.statustype);
     row.SetField("stmtfl1", entity.stmtfl1);
     row.SetField("stmtfl2", entity.stmtfl2);
     row.SetField("termstype", entity.termstype);
     row.SetField("transcd", entity.transcd);
     row.SetField("transdt", entity.transdt);
     row.SetField("transtm", entity.transtm);
     row.SetField("urecno", entity.urecno);
     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("arscid", entity.arscid.ToByteArray());
     row.SetField("rarscid", entity.rarscid);
     row.SetField("caddondesc1", entity.caddondesc1);
     row.SetField("caddondesc2", entity.caddondesc2);
     row.SetField("currencyty", entity.currencyty);
     row.SetField("dmaxcredit", entity.dmaxcredit);
     row.SetField("fieldfocus", entity.fieldfocus);
     row.SetField("istep", entity.istep);
     row.SetField("lauthpt1", entity.lauthpt1);
     row.SetField("lautofl", entity.lautofl);
     row.SetField("ldivfl", entity.ldivfl);
     row.SetField("forinvno", entity.forinvno);
     row.SetField("forinvsuf", entity.forinvsuf);
     row.SetField("forseqno", entity.forseqno);
     row.SetField("fortranscd", entity.fortranscd);
     row.SetField("s-exchrate", entity.sExchrate);
     row.SetField("secdivno", entity.secdivno);
     row.SetField("termsfl", entity.termsfl);
     row.SetField("updglarty", entity.updglarty);
     row.SetField("carettime", entity.carettime);
     row.SetField("daretdate", entity.daretdate);
     row.SetField("aretid", entity.aretid.ToByteArray());
     row.SetField("raretid", entity.raretid);
     row.SetField("xa-termstype", entity.xaTermstype);
     row.SetField("xt-discdt", entity.xtDiscdt);
     row.SetField("xt-duedt", entity.xtDuedt);
     row.SetField("xt-discdays", entity.xtDiscdays);
     row.SetField("xt-duedays", entity.xtDuedays);
     row.SetField("xt-nopays", entity.xtNopays);
     row.SetField("xt-freqdays", entity.xtFreqdays);
     row.SetField("xt-discamt", entity.xtDiscamt);
     row.SetField("xt-discpct", entity.xtDiscpct);
     row.SetField("xv-termsfl", entity.xvTermsfl);
     row.SetField("xv-manamtfl", entity.xvManamtfl);
     row.SetField("xv-manduefl", entity.xvManduefl);
     row.SetField("xv-mandiscfl", entity.xvMandiscfl);
     row.SetField("xv-addon1", entity.xvAddon1);
     row.SetField("xv-addon2", entity.xvAddon2);
     row.SetField("xv-addon3", entity.xvAddon3);
     row.SetField("xv-addon4", entity.xvAddon4);
     row.SetField("xv-addon5", entity.xvAddon5);
     row.SetField("xv-addon6", entity.xvAddon6);
     row.SetField("xv-addon7", entity.xvAddon7);
     row.SetField("xv-addon8", entity.xvAddon8);
     row.SetField("xt-addon1", entity.xtAddon1);
     row.SetField("xt-addon2", entity.xtAddon2);
     row.SetField("xv-addondist", entity.xvAddondist);
     row.SetField("xv-grossnetfl", entity.xvGrossnetfl);
     row.SetField("xv-immedpyfl", entity.xvImmedpyfl);
     row.SetField("xv-expaddfl", entity.xvExpaddfl);
     row.SetField("xlInclAddonsFl", entity.xlInclAddonsFl);
     row.SetField("origamount", entity.origamount);
     row.SetField("origdivno", entity.origdivno);
     row.SetField("originvno", entity.originvno);
     row.SetField("originvsuf", entity.originvsuf);
     row.SetField("origtermstype", entity.origtermstype);
     row.SetField("amountenabled", entity.amountenabled);
     row.SetField("custnoenabled", entity.custnoenabled);
     row.SetField("disputeflenabled", entity.disputeflenabled);
     row.SetField("divnoenabled", entity.divnoenabled);
     row.SetField("forinvnoenabled", entity.forinvnoenabled);
     row.SetField("forseqnoenabled", entity.forseqnoenabled);
     row.SetField("fortranscdenabled", entity.fortranscdenabled);
     row.SetField("invdtenabled", entity.invdtenabled);
     row.SetField("invnoenabled", entity.invnoenabled);
     row.SetField("invsufenabled", entity.invsufenabled);
     row.SetField("referenabled", entity.referenabled);
     row.SetField("shiptoenabled", entity.shiptoenabled);
     row.SetField("slsytdflenabled", entity.slsytdflenabled);
     row.SetField("termstypeenabled", entity.termstypeenabled);
     row.SetField("transcdenabled", entity.transcdenabled);
     row.SetField("fortranscdhidden", entity.fortranscdhidden);
     row.SetField("forinvnohidden", entity.forinvnohidden);
     row.SetField("forseqnohidden", entity.forseqnohidden);
     row.SetField("custnotesfl", entity.custnotesfl);
     row.SetField("shiptonotesfl", entity.shiptonotesfl);
     row.SetField("forinvnotesfl", entity.forinvnotesfl);
     row.SetField("userfield", entity.userfield);
 }
Exemple #2
0
        public static Arettrans BuildArettransFromRow(DataRow row)
        {
            Arettrans entity = new Arettrans();

            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.amount            = row.IsNull("amount") ? decimal.Zero : row.Field <decimal>("amount");
            entity.appinvdt          = row.Field <DateTime?>("appinvdt");
            entity.appinvno          = row.IsNull("appinvno") ? 0 : row.Field <int>("appinvno");
            entity.appinvsuf         = row.IsNull("appinvsuf") ? 0 : row.Field <int>("appinvsuf");
            entity.apptranscd        = row.IsNull("apptranscd") ? 0 : row.Field <int>("apptranscd");
            entity.checkno           = row.IsNull("checkno") ? decimal.Zero : row.Field <decimal>("checkno");
            entity.checknopaid       = row.IsNull("checknopaid") ? decimal.Zero : row.Field <decimal>("checknopaid");
            entity.codcollamt        = row.IsNull("codcollamt") ? decimal.Zero : row.Field <decimal>("codcollamt");
            entity.cono              = row.IsNull("cono") ? 0 : row.Field <int>("cono");
            entity.crjrnlno          = row.IsNull("crjrnlno") ? 0 : row.Field <int>("crjrnlno");
            entity.crsetno           = row.IsNull("crsetno") ? 0 : row.Field <int>("crsetno");
            entity.cTransType        = row.IsNull("cTransType") ? string.Empty : row.Field <string>("cTransType");
            entity.custno            = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.discamt           = row.IsNull("discamt") ? decimal.Zero : row.Field <decimal>("discamt");
            entity.discdt            = row.Field <DateTime?>("discdt");
            entity.dispSeq           = row.IsNull("DispSeq") ? 0 : row.Field <int>("DispSeq");
            entity.disputefl         = row.Field <bool>("disputefl");
            entity.divno             = row.IsNull("divno") ? 0 : row.Field <int>("divno");
            entity.duedt             = row.Field <DateTime?>("duedt");
            entity.exchgrate1        = row.IsNull("exchgrate1") ? decimal.Zero : row.Field <decimal>("exchgrate1");
            entity.exchgrate2        = row.IsNull("exchgrate2") ? decimal.Zero : row.Field <decimal>("exchgrate2");
            entity.glacctno          = row.IsNull("glacctno") ? 0 : row.Field <int>("glacctno");
            entity.gldeptno          = row.IsNull("gldeptno") ? 0 : row.Field <int>("gldeptno");
            entity.gldivno           = row.IsNull("gldivno") ? 0 : row.Field <int>("gldivno");
            entity.glsubno           = row.IsNull("glsubno") ? 0 : row.Field <int>("glsubno");
            entity.invdt             = row.Field <DateTime?>("invdt");
            entity.invno             = row.IsNull("invno") ? 0 : row.Field <int>("invno");
            entity.invsuf            = row.IsNull("invsuf") ? 0 : row.Field <int>("invsuf");
            entity.jrnlamt           = row.IsNull("jrnlamt") ? decimal.Zero : row.Field <decimal>("jrnlamt");
            entity.jrnlno            = row.IsNull("jrnlno") ? 0 : row.Field <int>("jrnlno");
            entity.location          = row.IsNull("location") ? string.Empty : row.Field <string>("location");
            entity.module            = row.IsNull("module") ? string.Empty : row.Field <string>("module");
            entity.nextseqno         = row.IsNull("nextseqno") ? 0 : row.Field <int>("nextseqno");
            entity.notesfl           = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl");
            entity.operinit          = row.IsNull("operinit") ? string.Empty : row.Field <string>("operinit");
            entity.origdisc          = row.IsNull("origdisc") ? decimal.Zero : row.Field <decimal>("origdisc");
            entity.origseqno         = row.IsNull("origseqno") ? 0 : row.Field <int>("origseqno");
            entity.paymtamt          = row.IsNull("paymtamt") ? decimal.Zero : row.Field <decimal>("paymtamt");
            entity.paymtcd           = row.IsNull("paymtcd") ? 0 : row.Field <int>("paymtcd");
            entity.paymtdt           = row.Field <DateTime?>("paymtdt");
            entity.percal            = row.IsNull("percal") ? 0 : row.Field <int>("percal");
            entity.perfisc           = row.IsNull("perfisc") ? 0 : row.Field <int>("perfisc");
            entity.period            = row.IsNull("period") ? 0 : row.Field <int>("period");
            entity.pifamt            = row.IsNull("pifamt") ? decimal.Zero : row.Field <decimal>("pifamt");
            entity.postdt            = row.Field <DateTime?>("postdt");
            entity.refer             = row.IsNull("refer") ? string.Empty : row.Field <string>("refer");
            entity.seqno             = row.IsNull("seqno") ? 0 : row.Field <int>("seqno");
            entity.setno             = row.IsNull("setno") ? 0 : row.Field <int>("setno");
            entity.shipto            = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.slsytdfl          = row.Field <bool>("slsytdfl");
            entity.sourcecd          = row.IsNull("sourcecd") ? 0 : row.Field <int>("sourcecd");
            entity.statustype        = row.Field <bool>("statustype");
            entity.stmtfl1           = row.Field <bool>("stmtfl1");
            entity.stmtfl2           = row.Field <bool>("stmtfl2");
            entity.termstype         = row.IsNull("termstype") ? string.Empty : row.Field <string>("termstype");
            entity.transcd           = row.IsNull("transcd") ? 0 : row.Field <int>("transcd");
            entity.transdt           = row.Field <DateTime?>("transdt");
            entity.transtm           = row.IsNull("transtm") ? string.Empty : row.Field <string>("transtm");
            entity.urecno            = row.IsNull("urecno") ? decimal.Zero : row.Field <decimal>("urecno");
            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.arscid            = row.Field <byte[]>("arscid").ToStringEncoded();
            entity.rarscid           = row.IsNull("rarscid") ? 0 : row.Field <long>("rarscid");
            entity.caddondesc1       = row.IsNull("caddondesc1") ? string.Empty : row.Field <string>("caddondesc1");
            entity.caddondesc2       = row.IsNull("caddondesc2") ? string.Empty : row.Field <string>("caddondesc2");
            entity.currencyty        = row.IsNull("currencyty") ? string.Empty : row.Field <string>("currencyty");
            entity.dmaxcredit        = row.IsNull("dmaxcredit") ? decimal.Zero : row.Field <decimal>("dmaxcredit");
            entity.fieldfocus        = row.IsNull("fieldfocus") ? string.Empty : row.Field <string>("fieldfocus");
            entity.istep             = row.IsNull("istep") ? 0 : row.Field <int>("istep");
            entity.lauthpt1          = row.Field <bool>("lauthpt1");
            entity.lautofl           = row.Field <bool>("lautofl");
            entity.ldivfl            = row.Field <bool>("ldivfl");
            entity.forinvno          = row.IsNull("forinvno") ? 0 : row.Field <int>("forinvno");
            entity.forinvsuf         = row.IsNull("forinvsuf") ? 0 : row.Field <int>("forinvsuf");
            entity.forseqno          = row.IsNull("forseqno") ? 0 : row.Field <int>("forseqno");
            entity.fortranscd        = row.IsNull("fortranscd") ? 0 : row.Field <int>("fortranscd");
            entity.sExchrate         = row.IsNull("s-exchrate") ? decimal.Zero : row.Field <decimal>("s-exchrate");
            entity.secdivno          = row.IsNull("secdivno") ? 0 : row.Field <int>("secdivno");
            entity.termsfl           = row.Field <bool>("termsfl");
            entity.updglarty         = row.IsNull("updglarty") ? string.Empty : row.Field <string>("updglarty");
            entity.carettime         = row.IsNull("carettime") ? string.Empty : row.Field <string>("carettime");
            entity.daretdate         = row.Field <DateTime?>("daretdate");
            entity.aretid            = row.Field <byte[]>("aretid").ToStringEncoded();
            entity.raretid           = row.IsNull("raretid") ? 0 : row.Field <long>("raretid");
            entity.xaTermstype       = row.IsNull("xa-termstype") ? string.Empty : row.Field <string>("xa-termstype");
            entity.xtDiscdt          = row.Field <DateTime?>("xt-discdt");
            entity.xtDuedt           = row.Field <DateTime?>("xt-duedt");
            entity.xtDiscdays        = row.IsNull("xt-discdays") ? 0 : row.Field <int>("xt-discdays");
            entity.xtDuedays         = row.IsNull("xt-duedays") ? 0 : row.Field <int>("xt-duedays");
            entity.xtNopays          = row.IsNull("xt-nopays") ? 0 : row.Field <int>("xt-nopays");
            entity.xtFreqdays        = row.IsNull("xt-freqdays") ? 0 : row.Field <int>("xt-freqdays");
            entity.xtDiscamt         = row.IsNull("xt-discamt") ? decimal.Zero : row.Field <decimal>("xt-discamt");
            entity.xtDiscpct         = row.IsNull("xt-discpct") ? decimal.Zero : row.Field <decimal>("xt-discpct");
            entity.xvTermsfl         = row.Field <bool>("xv-termsfl");
            entity.xvManamtfl        = row.Field <bool>("xv-manamtfl");
            entity.xvManduefl        = row.Field <bool>("xv-manduefl");
            entity.xvMandiscfl       = row.Field <bool>("xv-mandiscfl");
            entity.xvAddon1          = row.IsNull("xv-addon1") ? 0 : row.Field <int>("xv-addon1");
            entity.xvAddon2          = row.IsNull("xv-addon2") ? 0 : row.Field <int>("xv-addon2");
            entity.xvAddon3          = row.IsNull("xv-addon3") ? 0 : row.Field <int>("xv-addon3");
            entity.xvAddon4          = row.IsNull("xv-addon4") ? 0 : row.Field <int>("xv-addon4");
            entity.xvAddon5          = row.IsNull("xv-addon5") ? 0 : row.Field <int>("xv-addon5");
            entity.xvAddon6          = row.IsNull("xv-addon6") ? 0 : row.Field <int>("xv-addon6");
            entity.xvAddon7          = row.IsNull("xv-addon7") ? 0 : row.Field <int>("xv-addon7");
            entity.xvAddon8          = row.IsNull("xv-addon8") ? 0 : row.Field <int>("xv-addon8");
            entity.xtAddon1          = row.IsNull("xt-addon1") ? decimal.Zero : row.Field <decimal>("xt-addon1");
            entity.xtAddon2          = row.IsNull("xt-addon2") ? decimal.Zero : row.Field <decimal>("xt-addon2");
            entity.xvAddondist       = row.IsNull("xv-addondist") ? decimal.Zero : row.Field <decimal>("xv-addondist");
            entity.xvGrossnetfl      = row.Field <bool>("xv-grossnetfl");
            entity.xvImmedpyfl       = row.Field <bool>("xv-immedpyfl");
            entity.xvExpaddfl        = row.Field <bool>("xv-expaddfl");
            entity.xlInclAddonsFl    = row.Field <bool>("xlInclAddonsFl");
            entity.origamount        = row.IsNull("origamount") ? decimal.Zero : row.Field <decimal>("origamount");
            entity.origdivno         = row.IsNull("origdivno") ? 0 : row.Field <int>("origdivno");
            entity.originvno         = row.IsNull("originvno") ? 0 : row.Field <int>("originvno");
            entity.originvsuf        = row.IsNull("originvsuf") ? 0 : row.Field <int>("originvsuf");
            entity.origtermstype     = row.IsNull("origtermstype") ? string.Empty : row.Field <string>("origtermstype");
            entity.amountenabled     = row.Field <bool>("amountenabled");
            entity.custnoenabled     = row.Field <bool>("custnoenabled");
            entity.disputeflenabled  = row.Field <bool>("disputeflenabled");
            entity.divnoenabled      = row.Field <bool>("divnoenabled");
            entity.forinvnoenabled   = row.Field <bool>("forinvnoenabled");
            entity.forseqnoenabled   = row.Field <bool>("forseqnoenabled");
            entity.fortranscdenabled = row.Field <bool>("fortranscdenabled");
            entity.invdtenabled      = row.Field <bool>("invdtenabled");
            entity.invnoenabled      = row.Field <bool>("invnoenabled");
            entity.invsufenabled     = row.Field <bool>("invsufenabled");
            entity.referenabled      = row.Field <bool>("referenabled");
            entity.shiptoenabled     = row.Field <bool>("shiptoenabled");
            entity.slsytdflenabled   = row.Field <bool>("slsytdflenabled");
            entity.termstypeenabled  = row.Field <bool>("termstypeenabled");
            entity.transcdenabled    = row.Field <bool>("transcdenabled");
            entity.fortranscdhidden  = row.Field <bool>("fortranscdhidden");
            entity.forinvnohidden    = row.Field <bool>("forinvnohidden");
            entity.forseqnohidden    = row.Field <bool>("forseqnohidden");
            entity.custnotesfl       = row.IsNull("custnotesfl") ? string.Empty : row.Field <string>("custnotesfl");
            entity.shiptonotesfl     = row.IsNull("shiptonotesfl") ? string.Empty : row.Field <string>("shiptonotesfl");
            entity.forinvnotesfl     = row.IsNull("forinvnotesfl") ? string.Empty : row.Field <string>("forinvnotesfl");
            entity.userfield         = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }