Beispiel #1
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            ClassClient client = new ClassClient();

            client.saveClient(newClient);
            this.Close();
        }
Beispiel #2
0
 public EditClient(string idClient, string name, string surname, string cpf, string email)
 {
     InitializeComponent();
     client          = new Client();
     classClient     = new ClassClient();
     client.idClient = Convert.ToInt32(idClient);
     client.name     = name;
     client.surname  = surname;
     client.cpf      = cpf;
     client.email    = email;
     phones          = classClient.getPhoneClient(client.idClient);
     addresses       = classClient.getAddressClients(client.idClient);
 }
Beispiel #3
0
        private void CreateListClient()
        {
            clients = new ClassClient();
            listClients.Items.Clear();
            listClients.View          = View.Details;
            listClients.GridLines     = true;
            listClients.FullRowSelect = true;
            string[] columns = new string[listClients.Columns.Count];

            List <Client> listClient = clients.getAllClients();

            //Adiciona as informações a listClient
            ListViewItem item;

            listClient.ForEach(header => {
                columns[0] = header.idClient.ToString();
                columns[1] = header.name;
                columns[2] = header.surname;
                columns[3] = header.cpf;
                columns[4] = header.email;
                item       = new ListViewItem(columns);
                listClients.Items.Add(item);
            });
        }