Ejemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPdspvendcopyresults(ref DataRow row, Pdspvendcopyresults entity)
 {
     row.SetField("prod", entity.prod);
     row.SetField("vendno", entity.vendno);
     row.SetField("startdt", entity.startdt);
     row.SetField("rowid", entity.rowid.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
Ejemplo n.º 2
0
        public static Pdspvendcopyresults BuildPdspvendcopyresultsFromRow(DataRow row)
        {
            Pdspvendcopyresults entity = new Pdspvendcopyresults();

            entity.prod      = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.vendno    = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.startdt   = row.Field <DateTime?>("startdt");
            entity.rowid     = row.Field <byte[]>("rowid").ToStringEncoded();
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }