protected override void OnAddCommand() { var newCPU = new CPU(); var newDevice = new Device(); newCPU.Device = newDevice; this.Context.CPUs.Add(newCPU); this.CPUsView.MoveCurrentTo(newCPU); }
protected override void OnAddCommand() { var newMemory = new Memory(); var newDevice = new Device(); newMemory.Device = newDevice; this.Context.Memories.Add(newMemory); this.MemoriesView.MoveCurrentTo(newMemory); }
protected override void OnAddCommand() { var newCooler = new Cooler(); var newDevice = new Device(); newCooler.Device = newDevice; this.Context.Coolers.Add(newCooler); this.CoolersView.MoveCurrentTo(newCooler); }
private bool FilterDevice(Device entity) { return (entity.Id == this.DeviceId); }
private bool FilterDevices(Device entity) { return (entity.ManufacturerId == this.Id); }
private void DetachDevices(Device entity) { entity.Manufacturer = null; }
private void AttachDevices(Device entity) { entity.Manufacturer = this; }
protected override void OnAddCommand() { var newMotherboard = new Motherboard(); var newDevice = new Device(); newMotherboard.Device = newDevice; this.Context.Motherboards.Add(newMotherboard); this.MotherboardsView.MoveCurrentTo(newMotherboard); }
/// <summary> /// Deprecated Method for adding a new object to the Devices EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToDevices(Device device) { base.AddObject("Devices", device); }
/// <summary> /// Create a new Device object. /// </summary> /// <param name="model">Initial value of the Model property.</param> /// <param name="price">Initial value of the Price property.</param> /// <param name="id">Initial value of the Id property.</param> /// <param name="manufacturerId">Initial value of the ManufacturerId property.</param> public static Device CreateDevice(global::System.String model, global::System.Double price, global::System.Int32 id, global::System.Int32 manufacturerId) { Device device = new Device(); device.Model = model; device.Price = price; device.Id = id; device.ManufacturerId = manufacturerId; return device; }