Example #1
0
        protected override void OnAddCommand()
        {
            var newCooler = new Cooler();
            var newDevice = new Device();
            newCooler.Device = newDevice;

            this.Context.Coolers.Add(newCooler);
            this.CoolersView.MoveCurrentTo(newCooler);
        }
Example #2
0
 private bool FilterCooler(Cooler entity)
 {
     return (entity.Id == this.CoolerId);
 }
Example #3
0
 private bool FilterCoolers(Cooler entity)
 {
     return (entity.DeviceTypeId == this.Id);
 }
Example #4
0
 private void DetachCoolers(Cooler entity)
 {
     entity.DeviceType = null;
 }
Example #5
0
 private void AttachCoolers(Cooler entity)
 {
     entity.DeviceType = this;
 }
Example #6
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Coolers EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToCoolers(Cooler cooler)
 {
     base.AddObject("Coolers", cooler);
 }
Example #7
0
 /// <summary>
 /// Create a new Cooler object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="rotation">Initial value of the Rotation property.</param>
 /// <param name="size">Initial value of the Size property.</param>
 /// <param name="deviceTypeId">Initial value of the DeviceTypeId property.</param>
 /// <param name="deviceId">Initial value of the DeviceId property.</param>
 public static Cooler CreateCooler(global::System.Int32 id, global::System.Int16 rotation, global::System.Int16 size, global::System.Int32 deviceTypeId, global::System.Int32 deviceId)
 {
     Cooler cooler = new Cooler();
     cooler.Id = id;
     cooler.Rotation = rotation;
     cooler.Size = size;
     cooler.DeviceTypeId = deviceTypeId;
     cooler.DeviceId = deviceId;
     return cooler;
 }