private void ButtonDetail_Click(object sender, RoutedEventArgs e)
        {
            int selectedIndex = dataGridClients.SelectedIndex;

            if (selectedIndex < 0)
            {
                MessageBox.Show("Не выбран клиент");
                return;
            }



            var ap = new DBManager().getClientList();

            Models.ModelClient modelClient = null;
            foreach (var it in ap)
            {
                if (it.ID_Authorization == listClient[selectedIndex].ID_Authorization)
                {
                    modelClient = it;
                    break;
                }
            }

            var ce = new RegistrationWindow(modelClient, true);

            ce.ShowDialog();
        }
Example #2
0
 public void insertClient(Models.ModelClient model)
 {
     execProc("Client_insert", new Dictionary <string, object> {
         { "ID_Authorization", model.ID_Authorization },
         { "Surname ", model.Surname },
         { "Name ", model.Name },
         { "Middle_Name ", model.Middle_Name },
         { "Email_address ", model.Email_address },
         { "ID_status_client", model.ID_status_client },
         { "Passport_number_and_series ", model.Passport_number_and_series },
         { "ID_Category", model.ID_Category }
     });
 }