コード例 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPoorderlookupresults(ref DataRow row, Poorderlookupresults entity)
 {
     row.SetField("pono", entity.pono);
     row.SetField("posuf", entity.posuf);
     row.SetField("notesfl", entity.notesfl);
     row.SetField("vendno", entity.vendno);
     row.SetField("vendnotesfl", entity.vendnotesfl);
     row.SetField("refer", entity.refer);
     row.SetField("stagecd", entity.stagecd);
     row.SetField("stagecdword", entity.stagecdword);
     row.SetField("transtype", entity.transtype);
     row.SetField("orderdt", entity.orderdt);
     row.SetField("receiptdt", entity.receiptdt);
     row.SetField("receiverno", entity.receiverno);
     row.SetField("approvty", entity.approvty);
     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-poeh", entity.rowidPoeh.ToByteArray());
 }
コード例 #2
0
        public static Poorderlookupresults BuildPoorderlookupresultsFromRow(DataRow row)
        {
            Poorderlookupresults entity = new Poorderlookupresults();

            entity.pono        = row.IsNull("pono") ? 0 : row.Field <int>("pono");
            entity.posuf       = row.IsNull("posuf") ? 0 : row.Field <int>("posuf");
            entity.notesfl     = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl");
            entity.vendno      = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.vendnotesfl = row.IsNull("vendnotesfl") ? string.Empty : row.Field <string>("vendnotesfl");
            entity.refer       = row.IsNull("refer") ? string.Empty : row.Field <string>("refer");
            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.orderdt     = row.Field <DateTime?>("orderdt");
            entity.receiptdt   = row.Field <DateTime?>("receiptdt");
            entity.receiverno  = row.IsNull("receiverno") ? string.Empty : row.Field <string>("receiverno");
            entity.approvty    = row.IsNull("approvty") ? string.Empty : row.Field <string>("approvty");
            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.rowidPoeh   = row.Field <byte[]>("rowid-poeh").ToStringEncoded();
            return(entity);
        }