Exemple #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPdspvendcontcopyresults(ref DataRow row, Pdspvendcontcopyresults entity)
 {
     row.SetField("levelcd", entity.levelcd);
     row.SetField("contractno", entity.contractno);
     row.SetField("prod", entity.prod);
     row.SetField("vendno", entity.vendno);
     row.SetField("unit", entity.unit);
     row.SetField("whse", entity.whse);
     row.SetField("startdt", entity.startdt);
     row.SetField("rowid", entity.rowid.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
Exemple #2
0
        public static Pdspvendcontcopyresults BuildPdspvendcontcopyresultsFromRow(DataRow row)
        {
            Pdspvendcontcopyresults entity = new Pdspvendcontcopyresults();

            entity.levelcd    = row.IsNull("levelcd") ? 0 : row.Field <int>("levelcd");
            entity.contractno = row.IsNull("contractno") ? string.Empty : row.Field <string>("contractno");
            entity.prod       = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.vendno     = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.unit       = row.IsNull("unit") ? string.Empty : row.Field <string>("unit");
            entity.whse       = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            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);
        }