Ejemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromAreceinvoiceslist(ref DataRow row, Areceinvoiceslist entity)
 {
     row.SetField("cono", entity.cono);
     row.SetField("oper", entity.oper);
     row.SetField("allowdiscamt", entity.allowdiscamt);
     row.SetField("amount", entity.amount);
     row.SetField("apinvno", entity.apinvno);
     row.SetField("applyamt", entity.applyamt);
     row.SetField("credcounter", entity.credcounter);
     row.SetField("credorigdiscenabled", entity.credorigdiscenabled);
     row.SetField("credwriteoffenabled", entity.credwriteoffenabled);
     row.SetField("custno", entity.custno);
     row.SetField("custpo", entity.custpo);
     row.SetField("dbtcustnoenabled", entity.dbtcustnoenabled);
     row.SetField("dbtdivnoenabled", entity.dbtdivnoenabled);
     row.SetField("dbttxtmessage", entity.dbttxtmessage);
     row.SetField("delta-applydisc", entity.deltaApplydisc);
     row.SetField("discamt", entity.discamt);
     row.SetField("discdt", entity.discdt);
     row.SetField("dispcd", entity.dispcd);
     row.SetField("disputefl", entity.disputefl);
     row.SetField("divno", entity.divno);
     row.SetField("duedt", entity.duedt);
     row.SetField("filter", entity.filter);
     row.SetField("filtered", entity.filtered);
     row.SetField("groupid", entity.groupid);
     row.SetField("init-applyamt", entity.initApplyamt);
     row.SetField("init-applydisc", entity.initApplydisc);
     row.SetField("init-piffl", entity.initPiffl);
     row.SetField("invaddonsenabled", entity.invaddonsenabled);
     row.SetField("invapplyamtenabled", entity.invapplyamtenabled);
     row.SetField("invdt", entity.invdt);
     row.SetField("invforceleaveofapplyamt", entity.invforceleaveofapplyamt);
     row.SetField("invno", entity.invno);
     row.SetField("invoice", entity.invoice);
     row.SetField("invorigdiscenabled", entity.invorigdiscenabled);
     row.SetField("invreferenabled", entity.invreferenabled);
     row.SetField("invresetenabled", entity.invresetenabled);
     row.SetField("invrowcolor", entity.invrowcolor);
     row.SetField("invsuf", entity.invsuf);
     row.SetField("invtype", entity.invtype);
     row.SetField("invwriteoffenabled", entity.invwriteoffenabled);
     row.SetField("jrnlno", entity.jrnlno);
     row.SetField("notesfl", entity.notesfl);
     row.SetField("odiscamt", entity.odiscamt);
     row.SetField("origamount", entity.origamount);
     row.SetField("origdisc", entity.origdisc);
     row.SetField("paymtno", entity.paymtno);
     row.SetField("period", entity.period);
     row.SetField("piffl", entity.piffl);
     row.SetField("pifflsave", entity.pifflsave);
     row.SetField("prevapplyamt", entity.prevapplyamt);
     row.SetField("prevdiscamt", entity.prevdiscamt);
     row.SetField("prevpiffl", entity.prevpiffl);
     row.SetField("recno", entity.recno);
     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("termstype", entity.termstype);
     row.SetField("totaddon", entity.totaddon);
     row.SetField("tottaxes", entity.tottaxes);
     row.SetField("transcd", entity.transcd);
     row.SetField("transtype", entity.transtype);
     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("webuifilter", entity.webuifilter);
     row.SetField("wocancel", entity.wocancel);
     row.SetField("npclaimno", entity.npclaimno);
     row.SetField("relateddocument", entity.relateddocument);
     row.SetField("userfield", entity.userfield);
 }
Ejemplo n.º 2
0
        public static Areceinvoiceslist BuildAreceinvoiceslistFromRow(DataRow row)
        {
            Areceinvoiceslist entity = new Areceinvoiceslist();

            entity.cono                    = row.IsNull("cono") ? 0 : row.Field <int>("cono");
            entity.oper                    = row.IsNull("oper") ? string.Empty : row.Field <string>("oper");
            entity.allowdiscamt            = row.IsNull("allowdiscamt") ? decimal.Zero : row.Field <decimal>("allowdiscamt");
            entity.amount                  = row.IsNull("amount") ? decimal.Zero : row.Field <decimal>("amount");
            entity.apinvno                 = row.IsNull("apinvno") ? string.Empty : row.Field <string>("apinvno");
            entity.applyamt                = row.IsNull("applyamt") ? decimal.Zero : row.Field <decimal>("applyamt");
            entity.credcounter             = row.IsNull("credcounter") ? 0 : row.Field <int>("credcounter");
            entity.credorigdiscenabled     = row.Field <bool>("credorigdiscenabled");
            entity.credwriteoffenabled     = row.Field <bool>("credwriteoffenabled");
            entity.custno                  = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.custpo                  = row.IsNull("custpo") ? string.Empty : row.Field <string>("custpo");
            entity.dbtcustnoenabled        = row.Field <bool>("dbtcustnoenabled");
            entity.dbtdivnoenabled         = row.Field <bool>("dbtdivnoenabled");
            entity.dbttxtmessage           = row.IsNull("dbttxtmessage") ? string.Empty : row.Field <string>("dbttxtmessage");
            entity.deltaApplydisc          = row.IsNull("delta-applydisc") ? decimal.Zero : row.Field <decimal>("delta-applydisc");
            entity.discamt                 = row.IsNull("discamt") ? decimal.Zero : row.Field <decimal>("discamt");
            entity.discdt                  = row.Field <DateTime?>("discdt");
            entity.dispcd                  = row.IsNull("dispcd") ? string.Empty : row.Field <string>("dispcd");
            entity.disputefl               = row.Field <bool>("disputefl");
            entity.divno                   = row.IsNull("divno") ? 0 : row.Field <int>("divno");
            entity.duedt                   = row.Field <DateTime?>("duedt");
            entity.filter                  = row.IsNull("filter") ? string.Empty : row.Field <string>("filter");
            entity.filtered                = row.Field <bool>("filtered");
            entity.groupid                 = row.IsNull("groupid") ? string.Empty : row.Field <string>("groupid");
            entity.initApplyamt            = row.IsNull("init-applyamt") ? decimal.Zero : row.Field <decimal>("init-applyamt");
            entity.initApplydisc           = row.IsNull("init-applydisc") ? decimal.Zero : row.Field <decimal>("init-applydisc");
            entity.initPiffl               = row.Field <bool>("init-piffl");
            entity.invaddonsenabled        = row.Field <bool>("invaddonsenabled");
            entity.invapplyamtenabled      = row.Field <bool>("invapplyamtenabled");
            entity.invdt                   = row.Field <DateTime?>("invdt");
            entity.invforceleaveofapplyamt = row.Field <bool>("invforceleaveofapplyamt");
            entity.invno                   = row.IsNull("invno") ? 0 : row.Field <int>("invno");
            entity.invoice                 = row.IsNull("invoice") ? string.Empty : row.Field <string>("invoice");
            entity.invorigdiscenabled      = row.Field <bool>("invorigdiscenabled");
            entity.invreferenabled         = row.Field <bool>("invreferenabled");
            entity.invresetenabled         = row.Field <bool>("invresetenabled");
            entity.invrowcolor             = row.IsNull("invrowcolor") ? string.Empty : row.Field <string>("invrowcolor");
            entity.invsuf                  = row.IsNull("invsuf") ? 0 : row.Field <int>("invsuf");
            entity.invtype                 = row.IsNull("invtype") ? string.Empty : row.Field <string>("invtype");
            entity.invwriteoffenabled      = row.Field <bool>("invwriteoffenabled");
            entity.jrnlno                  = row.IsNull("jrnlno") ? 0 : row.Field <int>("jrnlno");
            entity.notesfl                 = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl");
            entity.odiscamt                = row.IsNull("odiscamt") ? decimal.Zero : row.Field <decimal>("odiscamt");
            entity.origamount              = row.IsNull("origamount") ? decimal.Zero : row.Field <decimal>("origamount");
            entity.origdisc                = row.IsNull("origdisc") ? decimal.Zero : row.Field <decimal>("origdisc");
            entity.paymtno                 = row.IsNull("paymtno") ? 0 : row.Field <int>("paymtno");
            entity.period                  = row.IsNull("period") ? 0 : row.Field <int>("period");
            entity.piffl                   = row.Field <bool>("piffl");
            entity.pifflsave               = row.Field <bool>("pifflsave");
            entity.prevapplyamt            = row.IsNull("prevapplyamt") ? decimal.Zero : row.Field <decimal>("prevapplyamt");
            entity.prevdiscamt             = row.IsNull("prevdiscamt") ? decimal.Zero : row.Field <decimal>("prevdiscamt");
            entity.prevpiffl               = row.Field <bool>("prevpiffl");
            entity.recno                   = row.IsNull("recno") ? 0 : row.Field <long>("recno");
            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.termstype               = row.IsNull("termstype") ? string.Empty : row.Field <string>("termstype");
            entity.totaddon                = row.IsNull("totaddon") ? decimal.Zero : row.Field <decimal>("totaddon");
            entity.tottaxes                = row.IsNull("tottaxes") ? decimal.Zero : row.Field <decimal>("tottaxes");
            entity.transcd                 = row.IsNull("transcd") ? 0 : row.Field <int>("transcd");
            entity.transtype               = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype");
            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.webuifilter             = row.IsNull("webuifilter") ? string.Empty : row.Field <string>("webuifilter");
            entity.wocancel                = row.Field <bool>("wocancel");
            entity.npclaimno               = row.IsNull("npclaimno") ? string.Empty : row.Field <string>("npclaimno");
            entity.relateddocument         = row.IsNull("relateddocument") ? string.Empty : row.Field <string>("relateddocument");
            entity.userfield               = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }