示例#1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPtxtranslisthdr(ref DataRow row, Ptxtranslisthdr entity)
 {
     row.SetField("whse", entity.whse);
     row.SetField("whsename", entity.whsename);
     row.SetField("docid", entity.docid);
     row.SetField("enterdt", entity.enterdt);
     row.SetField("statustype", entity.statustype);
     row.SetField("exchgtransty", entity.exchgtransty);
     row.SetField("stagecd", entity.stagecd);
     row.SetField("distpartnerid", entity.distpartnerid);
     row.SetField("vendno", entity.vendno);
     row.SetField("vendnotesfl", entity.vendnotesfl);
     row.SetField("shipfmno", entity.shipfmno);
     row.SetField("distinvno", entity.distinvno);
     row.SetField("distinvsuf", entity.distinvsuf);
     row.SetField("distinvseqno", entity.distinvseqno);
     row.SetField("distinvtype", entity.distinvtype);
     row.SetField("distinvdt", entity.distinvdt);
     row.SetField("altpo", entity.altpo);
     row.SetField("rlypono", entity.rlypono);
     row.SetField("rlyposuf", entity.rlyposuf);
     row.SetField("rlyponotesfl", entity.rlyponotesfl);
     row.SetField("recpono", entity.recpono);
     row.SetField("recposuf", entity.recposuf);
     row.SetField("recponotesfl", entity.recponotesfl);
     row.SetField("custpartnerid", entity.custpartnerid);
     row.SetField("custno", entity.custno);
     row.SetField("custnotesfl", entity.custnotesfl);
     row.SetField("shipto", entity.shipto);
     row.SetField("shiptonotesfl", entity.shiptonotesfl);
     row.SetField("custinvno", entity.custinvno);
     row.SetField("custinvsuf", entity.custinvsuf);
     row.SetField("altorder", entity.altorder);
     row.SetField("transtype", entity.transtype);
     row.SetField("rlyorderno", entity.rlyorderno);
     row.SetField("rlyordersuf", entity.rlyordersuf);
     row.SetField("rlyordernotesfl", entity.rlyordernotesfl);
     row.SetField("recorderno", entity.recorderno);
     row.SetField("recordersuf", entity.recordersuf);
     row.SetField("recordernotesfl", entity.recordernotesfl);
     row.SetField("custpo", entity.custpo);
     row.SetField("refer", entity.refer);
     row.SetField("placedby", entity.placedby);
     row.SetField("totinvamt", entity.totinvamt);
     row.SetField("totln", entity.totln);
     row.SetField("totqtyord", entity.totqtyord);
     row.SetField("termscd", entity.termscd);
     row.SetField("termspct", entity.termspct);
     row.SetField("termsdtcd", entity.termsdtcd);
     row.SetField("termsdiscdt", entity.termsdiscdt);
     row.SetField("termsdiscdays", entity.termsdiscdays);
     row.SetField("termsduedt", entity.termsduedt);
     row.SetField("termsduedays", entity.termsduedays);
     row.SetField("termsdescr", entity.termsdescr);
     row.SetField("termsdiscproxday", entity.termsdiscproxday);
     row.SetField("currencyty", entity.currencyty);
     row.SetField("recondt", entity.recondt);
     row.SetField("reportcd", entity.reportcd);
     row.SetField("reporteddt", entity.reporteddt);
     row.SetField("transdttmz", entity.transdttmz);
     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("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("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("rwidptxtranshdr", entity.rwidptxtranshdr.ToByteArray());
 }
示例#2
0
        public static Ptxtranslisthdr BuildPtxtranslisthdrFromRow(DataRow row)
        {
            Ptxtranslisthdr entity = new Ptxtranslisthdr();

            entity.whse             = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.whsename         = row.IsNull("whsename") ? string.Empty : row.Field <string>("whsename");
            entity.docid            = row.IsNull("docid") ? 0 : row.Field <int>("docid");
            entity.enterdt          = row.Field <DateTime?>("enterdt");
            entity.statustype       = row.IsNull("statustype") ? string.Empty : row.Field <string>("statustype");
            entity.exchgtransty     = row.IsNull("exchgtransty") ? string.Empty : row.Field <string>("exchgtransty");
            entity.stagecd          = row.IsNull("stagecd") ? 0 : row.Field <int>("stagecd");
            entity.distpartnerid    = row.IsNull("distpartnerid") ? string.Empty : row.Field <string>("distpartnerid");
            entity.vendno           = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.vendnotesfl      = row.IsNull("vendnotesfl") ? string.Empty : row.Field <string>("vendnotesfl");
            entity.shipfmno         = row.IsNull("shipfmno") ? 0 : row.Field <int>("shipfmno");
            entity.distinvno        = row.IsNull("distinvno") ? 0 : row.Field <int>("distinvno");
            entity.distinvsuf       = row.IsNull("distinvsuf") ? 0 : row.Field <int>("distinvsuf");
            entity.distinvseqno     = row.IsNull("distinvseqno") ? 0 : row.Field <int>("distinvseqno");
            entity.distinvtype      = row.IsNull("distinvtype") ? string.Empty : row.Field <string>("distinvtype");
            entity.distinvdt        = row.Field <DateTime?>("distinvdt");
            entity.altpo            = row.IsNull("altpo") ? string.Empty : row.Field <string>("altpo");
            entity.rlypono          = row.IsNull("rlypono") ? 0 : row.Field <int>("rlypono");
            entity.rlyposuf         = row.IsNull("rlyposuf") ? 0 : row.Field <int>("rlyposuf");
            entity.rlyponotesfl     = row.IsNull("rlyponotesfl") ? string.Empty : row.Field <string>("rlyponotesfl");
            entity.recpono          = row.IsNull("recpono") ? 0 : row.Field <int>("recpono");
            entity.recposuf         = row.IsNull("recposuf") ? 0 : row.Field <int>("recposuf");
            entity.recponotesfl     = row.IsNull("recponotesfl") ? string.Empty : row.Field <string>("recponotesfl");
            entity.custpartnerid    = row.IsNull("custpartnerid") ? string.Empty : row.Field <string>("custpartnerid");
            entity.custno           = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.custnotesfl      = row.IsNull("custnotesfl") ? string.Empty : row.Field <string>("custnotesfl");
            entity.shipto           = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.shiptonotesfl    = row.IsNull("shiptonotesfl") ? string.Empty : row.Field <string>("shiptonotesfl");
            entity.custinvno        = row.IsNull("custinvno") ? string.Empty : row.Field <string>("custinvno");
            entity.custinvsuf       = row.IsNull("custinvsuf") ? string.Empty : row.Field <string>("custinvsuf");
            entity.altorder         = row.IsNull("altorder") ? string.Empty : row.Field <string>("altorder");
            entity.transtype        = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype");
            entity.rlyorderno       = row.IsNull("rlyorderno") ? 0 : row.Field <int>("rlyorderno");
            entity.rlyordersuf      = row.IsNull("rlyordersuf") ? 0 : row.Field <int>("rlyordersuf");
            entity.rlyordernotesfl  = row.IsNull("rlyordernotesfl") ? string.Empty : row.Field <string>("rlyordernotesfl");
            entity.recorderno       = row.IsNull("recorderno") ? 0 : row.Field <int>("recorderno");
            entity.recordersuf      = row.IsNull("recordersuf") ? 0 : row.Field <int>("recordersuf");
            entity.recordernotesfl  = row.IsNull("recordernotesfl") ? string.Empty : row.Field <string>("recordernotesfl");
            entity.custpo           = row.IsNull("custpo") ? string.Empty : row.Field <string>("custpo");
            entity.refer            = row.IsNull("refer") ? string.Empty : row.Field <string>("refer");
            entity.placedby         = row.IsNull("placedby") ? string.Empty : row.Field <string>("placedby");
            entity.totinvamt        = row.IsNull("totinvamt") ? decimal.Zero : row.Field <decimal>("totinvamt");
            entity.totln            = row.IsNull("totln") ? 0 : row.Field <int>("totln");
            entity.totqtyord        = row.IsNull("totqtyord") ? decimal.Zero : row.Field <decimal>("totqtyord");
            entity.termscd          = row.IsNull("termscd") ? string.Empty : row.Field <string>("termscd");
            entity.termspct         = row.IsNull("termspct") ? string.Empty : row.Field <string>("termspct");
            entity.termsdtcd        = row.IsNull("termsdtcd") ? string.Empty : row.Field <string>("termsdtcd");
            entity.termsdiscdt      = row.IsNull("termsdiscdt") ? string.Empty : row.Field <string>("termsdiscdt");
            entity.termsdiscdays    = row.IsNull("termsdiscdays") ? string.Empty : row.Field <string>("termsdiscdays");
            entity.termsduedt       = row.IsNull("termsduedt") ? string.Empty : row.Field <string>("termsduedt");
            entity.termsduedays     = row.IsNull("termsduedays") ? string.Empty : row.Field <string>("termsduedays");
            entity.termsdescr       = row.IsNull("termsdescr") ? string.Empty : row.Field <string>("termsdescr");
            entity.termsdiscproxday = row.IsNull("termsdiscproxday") ? string.Empty : row.Field <string>("termsdiscproxday");
            entity.currencyty       = row.IsNull("currencyty") ? string.Empty : row.Field <string>("currencyty");
            entity.recondt          = row.Field <DateTime?>("recondt");
            entity.reportcd         = row.IsNull("reportcd") ? string.Empty : row.Field <string>("reportcd");
            entity.reporteddt       = row.Field <DateTime?>("reporteddt");
            entity.transdttmz       = row.IsNull("transdttmz") ? string.Empty : row.Field <string>("transdttmz");
            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.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.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.rwidptxtranshdr  = row.Field <byte[]>("rwidptxtranshdr").ToStringEncoded();
            return(entity);
        }