Esempio n. 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromSaabnrecords(ref DataRow row, Saabnrecords entity)
 {
     row.SetField("cono", entity.cono);
     row.SetField("noun", entity.noun);
     row.SetField("record-exists", entity.recordExists);
     row.SetField("userfield", entity.userfield);
 }
Esempio n. 2
0
        public static Saabnrecords BuildSaabnrecordsFromRow(DataRow row)
        {
            Saabnrecords entity = new Saabnrecords();

            entity.cono         = row.IsNull("cono") ? 0 : row.Field <int>("cono");
            entity.noun         = row.IsNull("noun") ? string.Empty : row.Field <string>("noun");
            entity.recordExists = row.Field <bool>("record-exists");
            entity.userfield    = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }