예제 #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();
            }
        }