コード例 #1
0
ファイル: Clients.xaml.cs プロジェクト: Ec1ipsa/spitris
 /* добавление клиента */
 private void AddClientBtn_Click(object sender, RoutedEventArgs e)
 {
     var editClientForm = new editClient(null, clientsWindow);
     editClientForm.Owner = this;
     editClientForm.WindowStartupLocation = WindowStartupLocation.CenterOwner;
     editClientForm.ShowDialog();
 }
コード例 #2
0
ファイル: Clients.xaml.cs プロジェクト: Ec1ipsa/spitris
        /* редактирование клиента */
        private void EditClientBtn_Click(object sender, RoutedEventArgs e)
        {
            if (clientsList.SelectedItem != null)
            {
                var id = (clientsList.SelectedItem as Client).Id;

                var editClientForm = new editClient(id, clientsWindow);
                editClientForm.Owner = this;
                editClientForm.WindowStartupLocation = WindowStartupLocation.CenterOwner;
                editClientForm.ShowDialog();
            }
            else
            {
                MessageBox.Show("Клиент не выбран!", "Предупреждение", MessageBoxButton.OK);
            }
        }