private void btnSalvar_Click(object sender, EventArgs e) { string rpta = ""; string obs = ""; try { if (string.IsNullOrEmpty(txtNome.Text) || string.IsNullOrEmpty(txtCPF.Text) || string.IsNullOrEmpty(txtCEP.Text)) { MessageBox.Show("Campo obrigatório não preenchido"); } else { if (MessageBox.Show("Canfirmar Cadastro", "Confirmar", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { rpta = BusinesCliente.CadastroNovoContaFiado ( txtNome.Text.Trim().ToUpper(), txtSobreNome.Text.Trim().ToUpper(), txtCPF.Text.Trim().ToUpper(), txtTelefone.Text.Trim().ToUpper(), txtEmail.Text.Trim().ToUpper(), txtCEP.Text.Trim().ToUpper(), txtEndereco.Text.Trim().ToUpper(), txtBairro.Text.Trim().ToUpper(), txtCidade.Text.Trim().ToUpper(), txtUF.Text.Trim().ToUpper(), obs, int.Parse(this._idPedido), decimal.Parse(this._saldoDevedor) ); } if (rpta.Equals("OK")) { this._resposta = rpta; this.Close(); } } } catch (Exception ex) { rpta = ex.Message; } }
//carregar dados dos clientes public void ListarClientes() { this._dtClientes = BusinesCliente.ListarClientes(); }