Exemple #1
0
        public static Wtitbuildwtlnhdrresults BuildWtitbuildwtlnhdrresultsFromRow(DataRow row)
        {
            Wtitbuildwtlnhdrresults entity = new Wtitbuildwtlnhdrresults();

            entity.wtno           = row.IsNull("wtno") ? 0 : row.Field <int>("wtno");
            entity.wtsuf          = row.IsNull("wtsuf") ? 0 : row.Field <int>("wtsuf");
            entity.notesfl        = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl");
            entity.transtype      = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype");
            entity.stagename      = row.IsNull("stagename") ? string.Empty : row.Field <string>("stagename");
            entity.trackerno      = row.IsNull("trackerno") ? string.Empty : row.Field <string>("trackerno");
            entity.pkgno          = row.IsNull("pkgno") ? 0 : row.Field <int>("pkgno");
            entity.stagecd        = row.IsNull("stagecd") ? 0 : row.Field <int>("stagecd");
            entity.shipfmwhse     = row.IsNull("shipfmwhse") ? string.Empty : row.Field <string>("shipfmwhse");
            entity.shipfmwhsename = row.IsNull("shipfmwhsename") ? string.Empty : row.Field <string>("shipfmwhsename");
            entity.shiptowhse     = row.IsNull("shiptowhse") ? string.Empty : row.Field <string>("shiptowhse");
            entity.shiptowhsename = row.IsNull("shiptowhsename") ? string.Empty : row.Field <string>("shiptowhsename");
            entity.shiptonm       = row.IsNull("shiptonm") ? string.Empty : row.Field <string>("shiptonm");
            entity.enterdt        = row.Field <DateTime?>("enterdt");
            entity.orderdt        = row.Field <DateTime?>("orderdt");
            entity.duedt          = row.Field <DateTime?>("duedt");
            entity.reqshipdt      = row.Field <DateTime?>("reqshipdt");
            entity.shipdt         = row.Field <DateTime?>("shipdt");
            entity.receiptdt      = row.Field <DateTime?>("receiptdt");
            entity.totlineamt     = row.IsNull("totlineamt") ? decimal.Zero : row.Field <decimal>("totlineamt");
            entity.cono           = row.IsNull("cono") ? 0 : row.Field <int>("cono");
            entity.cono2          = row.IsNull("cono2") ? 0 : row.Field <int>("cono2");
            entity.rowidWteh      = row.Field <byte[]>("rowid-wteh").ToStringEncoded();
            foreach (var dRow in row.GetChildRows("C_Lines"))
            {
                Wtitbuildwtlnlistresults wtitbuildwtlnlistresults = new Wtitbuildwtlnlistresults();
                wtitbuildwtlnlistresults = (Wtitbuildwtlnlistresults)SetKeyFields(entity, Wtitbuildwtlnlistresults.BuildWtitbuildwtlnlistresultsFromRow(dRow), "wtno,wtsuf", "wtno,wtsuf");
                entity.wtitbuildwtlnlistresults.Add(wtitbuildwtlnlistresults);
            }
            return(entity);
        }
Exemple #2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromWtitbuildwtlnlistresults(ref DataRow row, Wtitbuildwtlnlistresults entity)
 {
     row.SetField("wtno", entity.wtno);
     row.SetField("wtsuf", entity.wtsuf);
     row.SetField("lineno", entity.lineno);
     row.SetField("commentfl", entity.commentfl);
     row.SetField("shipprod", entity.shipprod);
     row.SetField("prodnotesfl", entity.prodnotesfl);
     row.SetField("qtyord", entity.qtyord);
     row.SetField("netord", entity.netord);
     row.SetField("qtyship", entity.qtyship);
     row.SetField("netamt", entity.netamt);
     row.SetField("qtyrcv", entity.qtyrcv);
     row.SetField("netrcv", entity.netrcv);
     row.SetField("cono", entity.cono);
     row.SetField("cono2", entity.cono2);
     row.SetField("rowid-wtel", entity.rowidWtel.ToByteArray());
 }
Exemple #3
0
        public static Wtitbuildwtlnlistresults BuildWtitbuildwtlnlistresultsFromRow(DataRow row)
        {
            Wtitbuildwtlnlistresults entity = new Wtitbuildwtlnlistresults();

            entity.wtno        = row.IsNull("wtno") ? 0 : row.Field <int>("wtno");
            entity.wtsuf       = row.IsNull("wtsuf") ? 0 : row.Field <int>("wtsuf");
            entity.lineno      = row.IsNull("lineno") ? 0 : row.Field <int>("lineno");
            entity.commentfl   = row.Field <bool>("commentfl");
            entity.shipprod    = row.IsNull("shipprod") ? string.Empty : row.Field <string>("shipprod");
            entity.prodnotesfl = row.IsNull("prodnotesfl") ? string.Empty : row.Field <string>("prodnotesfl");
            entity.qtyord      = row.IsNull("qtyord") ? decimal.Zero : row.Field <decimal>("qtyord");
            entity.netord      = row.IsNull("netord") ? decimal.Zero : row.Field <decimal>("netord");
            entity.qtyship     = row.IsNull("qtyship") ? decimal.Zero : row.Field <decimal>("qtyship");
            entity.netamt      = row.IsNull("netamt") ? decimal.Zero : row.Field <decimal>("netamt");
            entity.qtyrcv      = row.IsNull("qtyrcv") ? decimal.Zero : row.Field <decimal>("qtyrcv");
            entity.netrcv      = row.IsNull("netrcv") ? decimal.Zero : row.Field <decimal>("netrcv");
            entity.cono        = row.IsNull("cono") ? 0 : row.Field <int>("cono");
            entity.cono2       = row.IsNull("cono2") ? 0 : row.Field <int>("cono2");
            entity.rowidWtel   = row.Field <byte[]>("rowid-wtel").ToStringEncoded();
            return(entity);
        }