예제 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPdspvendaddresults(ref DataRow row, Pdspvendaddresults entity)
 {
     row.SetField("prod", entity.prod);
     row.SetField("vendno", entity.vendno);
     row.SetField("startdt", entity.startdt);
     row.SetField("pd_rowid", entity.pdRowid.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
예제 #2
0
        public static Pdspvendaddresults BuildPdspvendaddresultsFromRow(DataRow row)
        {
            Pdspvendaddresults entity = new Pdspvendaddresults();

            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.pdRowid   = row.Field <byte[]>("pd_rowid").ToStringEncoded();
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }