Exemple #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromWtorderlookupresults(ref DataRow row, Wtorderlookupresults entity)
 {
     row.SetField("wtno", entity.wtno);
     row.SetField("wtsuf", entity.wtsuf);
     row.SetField("notesfl", entity.notesfl);
     row.SetField("shipfmwhse", entity.shipfmwhse);
     row.SetField("cono", entity.cono);
     row.SetField("shiptowhse", entity.shiptowhse);
     row.SetField("cono2", entity.cono2);
     row.SetField("stagecd", entity.stagecd);
     row.SetField("stagecdword", entity.stagecdword);
     row.SetField("transtype", entity.transtype);
     row.SetField("refer", entity.refer);
     row.SetField("receiptdt", entity.receiptdt);
     row.SetField("reqshipdt", entity.reqshipdt);
     row.SetField("shipdt", entity.shipdt);
     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("rowid-wteh", entity.rowidWteh.ToByteArray());
 }
Exemple #2
0
        public static Wtorderlookupresults BuildWtorderlookupresultsFromRow(DataRow row)
        {
            Wtorderlookupresults entity = new Wtorderlookupresults();

            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.shipfmwhse  = row.IsNull("shipfmwhse") ? string.Empty : row.Field <string>("shipfmwhse");
            entity.cono        = row.IsNull("cono") ? 0 : row.Field <int>("cono");
            entity.shiptowhse  = row.IsNull("shiptowhse") ? string.Empty : row.Field <string>("shiptowhse");
            entity.cono2       = row.IsNull("cono2") ? 0 : row.Field <int>("cono2");
            entity.stagecd     = row.IsNull("stagecd") ? 0 : row.Field <int>("stagecd");
            entity.stagecdword = row.IsNull("stagecdword") ? string.Empty : row.Field <string>("stagecdword");
            entity.transtype   = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype");
            entity.refer       = row.IsNull("refer") ? string.Empty : row.Field <string>("refer");
            entity.receiptdt   = row.Field <DateTime?>("receiptdt");
            entity.reqshipdt   = row.Field <DateTime?>("reqshipdt");
            entity.shipdt      = row.Field <DateTime?>("shipdt");
            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.rowidWteh   = row.Field <byte[]>("rowid-wteh").ToStringEncoded();
            return(entity);
        }