コード例 #1
0
        private void btnAdd_Click(object sender, RoutedEventArgs e)
        {
            WindowAddInhabit window = new WindowAddInhabit();
            var result = window.ShowDialog();

            if (result ?? false)
            {
                updateListData();
            }
        }
コード例 #2
0
        private void btnUpd_Click(object sender, RoutedEventArgs e)
        {
            if (SelectedInhabit == null)
            {
                return;
            }

            WindowAddInhabit window = new WindowAddInhabit(SelectedInhabit.Id);
            var result = window.ShowDialog();

            if (result ?? false)
            {
                context.Entry <Жилец>(SelectedInhabit).Reload();
                updateListData();
            }
        }