public WindowAddCounter(int?counterId = null) { _context = new JKHModelContainer(); if (counterId == null) { _counter = new Счетчик(); _context.СчетчикSet.Add(_counter); } else { _counter = _context.СчетчикSet.Find(counterId); } InitializeComponent(); this.DataContext = this; UslSelection = _context.УслугаSet.Where(usl => usl.ГВС || usl.ХВС).ToList(); }
public cntListItem(bool selected, Счетчик counter) { _selected = selected; _counter = counter; }