Пример #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPdspdsppricecriteria(ref DataRow row, Pdspdsppricecriteria entity)
 {
     row.SetField("pdrecno", entity.pdrecno);
     row.SetField("cLevelcd", entity.cLevelcd);
     row.SetField("vendno", entity.vendno);
     row.SetField("prod", entity.prod);
     row.SetField("startdt", entity.startdt);
     row.SetField("userfield", entity.userfield);
 }
Пример #2
0
        public static Pdspdsppricecriteria BuildPdspdsppricecriteriaFromRow(DataRow row)
        {
            Pdspdsppricecriteria entity = new Pdspdsppricecriteria();

            entity.pdrecno   = row.IsNull("pdrecno") ? 0 : row.Field <int>("pdrecno");
            entity.cLevelcd  = row.IsNull("cLevelcd") ? string.Empty : row.Field <string>("cLevelcd");
            entity.vendno    = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.prod      = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.startdt   = row.Field <DateTime?>("startdt");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }