Beispiel #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPdspdelcriteria(ref DataRow row, Pdspdelcriteria entity)
 {
     row.SetField("clevelcd", entity.clevelcd);
     row.SetField("iRecno", entity.iRecno);
     row.SetField("prod", entity.prod);
     row.SetField("vendno", entity.vendno);
     row.SetField("startdt", entity.startdt);
     row.SetField("userfield", entity.userfield);
 }
Beispiel #2
0
        public static Pdspdelcriteria BuildPdspdelcriteriaFromRow(DataRow row)
        {
            Pdspdelcriteria entity = new Pdspdelcriteria();

            entity.clevelcd  = row.IsNull("clevelcd") ? string.Empty : row.Field <string>("clevelcd");
            entity.iRecno    = row.IsNull("iRecno") ? 0 : row.Field <int>("iRecno");
            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.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }