Ejemplo n.º 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);
        }
Ejemplo n.º 2
0
 private bool FilterCooler(Cooler entity)
 {
     return (entity.Id == this.CoolerId);
 }
Ejemplo n.º 3
0
 private bool FilterCoolers(Cooler entity)
 {
     return (entity.DeviceTypeId == this.Id);
 }
Ejemplo n.º 4
0
 private void DetachCoolers(Cooler entity)
 {
     entity.DeviceType = null;
 }
Ejemplo n.º 5
0
 private void AttachCoolers(Cooler entity)
 {
     entity.DeviceType = this;
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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;
 }