private void SelectDataGrid()
        {
            if (_currentRowGrid == -1)
            {
                return;
            }

            string cpf = (string)dgvClients.Rows[_currentRowGrid].Cells[1].Value;
            QueryResponse <Client> response = _clientBLL.GetByCpf(cpf);

            if (response.Success)
            {
                txtClientCPF.Text    = response.Data.CPF;
                txtClientEmail.Text  = response.Data.Email;
                txtClientName.Text   = response.Data.Name;
                txtClientPhone1.Text = response.Data.Phone1;
                txtClientPhone2.Text = response.Data.Phone2;
                txtClientRG.Text     = response.Data.RG;
                lblID.Text           = response.Data.ID.ToString();


                UpdateComponentsEdit();
                return;
            }
            MessageBox.Show(response.Message);
        }
Example #2
0
        private void SelectDataGrid()
        {
            if (_currentRowGrid == -1)
            {
                return;
            }

            string cpf = (string)dgvSearch.Rows[_currentRowGrid].Cells[1].Value;
            QueryResponse <Client> response = _clientBLL.GetByCpf(cpf);

            if (!response.Success)
            {
                MessageBox.Show(response.Message);
            }
            client = response.Data;
            this.Close();
        }