예제 #1
0
        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();
        }
예제 #2
0
 public cntListItem(bool selected, Счетчик counter)
 {
     _selected = selected;
     _counter  = counter;
 }