Exemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromZonebinsummary(ref DataRow row, Zonebinsummary entity)
 {
     row.SetField("empty", entity.empty);
     row.SetField("total", entity.total);
     row.SetField("rate", entity.rate);
     row.SetField("userfield", entity.userfield);
 }
Exemplo n.º 2
0
        public static Zonebinsummary BuildZonebinsummaryFromRow(DataRow row)
        {
            Zonebinsummary entity = new Zonebinsummary();

            entity.empty     = row.IsNull("empty") ? 0 : row.Field <int>("empty");
            entity.total     = row.IsNull("total") ? 0 : row.Field <int>("total");
            entity.rate      = row.IsNull("rate") ? string.Empty : row.Field <string>("rate");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }