Exemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromCustbaldisplayresults(ref DataRow row, Custbaldisplayresults entity)
 {
     row.SetField("info-id", entity.infoId);
     row.SetField("message-type", entity.messageType);
     row.SetField("description", entity.description);
     row.SetField("table-field", entity.tableField);
     row.SetField("misc-flag", entity.miscFlag);
     row.SetField("userfield", entity.userfield);
 }
Exemplo n.º 2
0
        public static Custbaldisplayresults BuildCustbaldisplayresultsFromRow(DataRow row)
        {
            Custbaldisplayresults entity = new Custbaldisplayresults();

            entity.infoId      = row.IsNull("info-id") ? 0 : row.Field <int>("info-id");
            entity.messageType = row.IsNull("message-type") ? string.Empty : row.Field <string>("message-type");
            entity.description = row.IsNull("description") ? string.Empty : row.Field <string>("description");
            entity.tableField  = row.IsNull("table-field") ? string.Empty : row.Field <string>("table-field");
            entity.miscFlag    = row.Field <bool>("misc-flag");
            entity.userfield   = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }