示例#1
0
        private void btnAdd_Click(object sender, RoutedEventArgs e)
        {
            WindowAddUsl window = new WindowAddUsl();
            var          result = window.ShowDialog();

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

            WindowAddUsl window = new WindowAddUsl(SelectedUsl.Id);
            var          result = window.ShowDialog();

            if (result ?? false)
            {
                context.Entry <Услуга>(SelectedUsl).Reload();
                updateListData();
            }
        }