コード例 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPdspvendresults(ref DataRow row, Pdspvendresults entity)
 {
     row.SetField("vendno", entity.vendno);
     row.SetField("vendnotesfl", entity.vendnotesfl);
     row.SetField("prod", entity.prod);
     row.SetField("prodnotesfl", entity.prodnotesfl);
     row.SetField("statustype", entity.statustype);
     row.SetField("refer", entity.refer);
     row.SetField("startdt", entity.startdt);
     row.SetField("enddt", entity.enddt);
     row.SetField("pd_rowid", entity.pdRowid.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
コード例 #2
0
        public static Pdspvendresults BuildPdspvendresultsFromRow(DataRow row)
        {
            Pdspvendresults entity = new Pdspvendresults();

            entity.vendno      = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.vendnotesfl = row.IsNull("vendnotesfl") ? string.Empty : row.Field <string>("vendnotesfl");
            entity.prod        = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.prodnotesfl = row.IsNull("prodnotesfl") ? string.Empty : row.Field <string>("prodnotesfl");
            entity.statustype  = row.IsNull("statustype") ? string.Empty : row.Field <string>("statustype");
            entity.refer       = row.IsNull("refer") ? string.Empty : row.Field <string>("refer");
            entity.startdt     = row.Field <DateTime?>("startdt");
            entity.enddt       = row.Field <DateTime?>("enddt");
            entity.pdRowid     = row.Field <byte[]>("pd_rowid").ToStringEncoded();
            entity.userfield   = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }