Example #1
0
        private void bntIncluir_Click(object sender, EventArgs e)
        {
            CadastroClientes cadastro = new CadastroClientes();

            cadastro.Show();
            this.Close();
        }
Example #2
0
        private void AlterarClientes()
        {
            if (dgvClientes.RowCount == 0)
            {
                MessageBox.Show("Selecione algum cliente");
                return;
            }

            if (dgvClientes.RowCount > 0)
            {
                try
                {
                    VariaveisStaticas.codigoclienteStatico = dgvClientes.CurrentRow.Cells[0].Value.ToString().Trim();
                    CadastroClientes formalterar = new CadastroClientes();
                    formalterar.GetDadosAlterar();

                    formalterar.ShowDialog();

                    if (VariaveisStaticas.entrouNoClientePelaProspeccao == true)
                    {
                        this.Close();
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show("Aconteceu algum erro \n" + ex.Message, "Erro teste");

                    // throw new Exception (ex.Message);
                }
            }
        }
Example #3
0
        public void clienteCodigoNovo()
        {
            CadastroClientes cadastro = new CadastroClientes();

            txtId.Text = DateTime.Now.ToString("yyyyMMddHHmmssfff");
            txtNome.Focus();
        }
Example #4
0
        private void button1_Click(object sender, EventArgs e)
        {
            CadastroClientes cadastro = new CadastroClientes();

            cadastro.IncluiDados();
            cadastro.ShowDialog();

            if (VariaveisStaticas.entrouNoClientePelaProspeccao == true)
            {
                this.Close();
            }
        }