Пример #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPvpdspslookupresults(ref DataRow row, Pvpdspslookupresults entity)
 {
     row.SetField("effectivedt", entity.effectivedt);
     row.SetField("prod", entity.prod);
     row.SetField("pricesheet", entity.pricesheet);
     row.SetField("whse", entity.whse);
     row.SetField("rowid-pvpdsps", entity.rowidPvpdsps.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
Пример #2
0
        public static Pvpdspslookupresults BuildPvpdspslookupresultsFromRow(DataRow row)
        {
            Pvpdspslookupresults entity = new Pvpdspslookupresults();

            entity.effectivedt  = row.Field <DateTime?>("effectivedt");
            entity.prod         = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.pricesheet   = row.IsNull("pricesheet") ? string.Empty : row.Field <string>("pricesheet");
            entity.whse         = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.rowidPvpdsps = row.Field <byte[]>("rowid-pvpdsps").ToStringEncoded();
            entity.userfield    = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }