コード例 #1
0
        public static Oeorderlookupresults BuildOeorderlookupresultsFromRow(DataRow row)
        {
            Oeorderlookupresults entity = new Oeorderlookupresults();

            entity.orderno     = row.IsNull("orderno") ? 0 : row.Field <int>("orderno");
            entity.ordersuf    = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf");
            entity.notesfl     = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl");
            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.custpo      = row.IsNull("custpo") ? string.Empty : row.Field <string>("custpo");
            entity.promisedt   = row.Field <DateTime?>("promisedt");
            entity.transtype   = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype");
            entity.stagecd     = row.IsNull("stagecd") ? 0 : row.Field <int>("stagecd");
            entity.stagecdword = row.IsNull("stagecdword") ? string.Empty : row.Field <string>("stagecdword");
            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.rowidOeeh   = row.Field <byte[]>("rowid-oeeh").ToStringEncoded();
            return(entity);
        }
コード例 #2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOeorderlookupresults(ref DataRow row, Oeorderlookupresults entity)
 {
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("notesfl", entity.notesfl);
     row.SetField("custno", entity.custno);
     row.SetField("custnotesfl", entity.custnotesfl);
     row.SetField("shipto", entity.shipto);
     row.SetField("custpo", entity.custpo);
     row.SetField("promisedt", entity.promisedt);
     row.SetField("transtype", entity.transtype);
     row.SetField("stagecd", entity.stagecd);
     row.SetField("stagecdword", entity.stagecdword);
     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-oeeh", entity.rowidOeeh.ToByteArray());
 }