Пример #1
0
 public void AddClient()
 {
     AddClientForm form = new AddClientForm();
     if (form.ShowDialog() == DialogResult.OK)
     {
         Client clientToAdd = form.clientToAdd;
         DataProvider.DataProvider.AddClient(clientToAdd.Name, clientToAdd.SurName, clientToAdd.SecondName,
           clientToAdd.Phone);
         UpdateClient();
     }
 }
Пример #2
0
        private void btnAddNewClient_Click(object sender, EventArgs e)
        {
            AddClientForm form = new AddClientForm();
            if (form.ShowDialog() == DialogResult.OK)
            {
                Client clientToAdd = form.clientToAdd;

                DataProvider.DataProvider.AddClient(clientToAdd.Name, clientToAdd.SurName, clientToAdd.SecondName,
                    clientToAdd.Street, clientToAdd.Flat, clientToAdd.City, clientToAdd.Post, clientToAdd.Phone);
                clientAddToJournal = clientToAdd;
                UpdateClientInfo();
            }
        }