Пример #1
0
 public ActionResult UpdateSettings(Setting setting)
 {
     using (var db = new edayRoomEntities())
     {
         db.Settings.Attach(setting);
         db.ObjectStateManager.ChangeObjectState(setting, EntityState.Modified);
         db.SaveChanges();
     }
     return RedirectToAction("Index");
 }
Пример #2
0
 /// <summary>
 /// Create a new Setting object.
 /// </summary>
 /// <param name="enableDashboard">Initial value of the enableDashboard property.</param>
 /// <param name="enableParticipacion">Initial value of the enableParticipacion property.</param>
 /// <param name="enableMovilizacion">Initial value of the enableMovilizacion property.</param>
 /// <param name="enableExitPoll">Initial value of the enableExitPoll property.</param>
 /// <param name="enableQuickCount">Initial value of the enableQuickCount property.</param>
 /// <param name="enableTotalizacion">Initial value of the enableTotalizacion property.</param>
 /// <param name="id">Initial value of the id property.</param>
 public static Setting CreateSetting(global::System.Boolean enableDashboard, global::System.Boolean enableParticipacion, global::System.Boolean enableMovilizacion, global::System.Boolean enableExitPoll, global::System.Boolean enableQuickCount, global::System.Boolean enableTotalizacion, global::System.Int32 id)
 {
     Setting setting = new Setting();
     setting.enableDashboard = enableDashboard;
     setting.enableParticipacion = enableParticipacion;
     setting.enableMovilizacion = enableMovilizacion;
     setting.enableExitPoll = enableExitPoll;
     setting.enableQuickCount = enableQuickCount;
     setting.enableTotalizacion = enableTotalizacion;
     setting.id = id;
     return setting;
 }
Пример #3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Settings EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToSettings(Setting setting)
 {
     base.AddObject("Settings", setting);
 }