Example #1
0
        public IUCliente(int id, ListaClientes lista)
        {
            InitializeComponent();
            oDAO       = new ClienteDAO();
            obj        = new Clientes();
            this.lista = lista;

            cboUF.SelectedIndex   = 0;
            cboTipo.SelectedIndex = 0;

            if (id != 0)
            {
                obj = oDAO.GetById(id);

                txtIdCliente.Text = obj.Idcliente.ToString();
                txtNome.Text      = obj.Nome;
                txtDoc_fed.Text   = obj.Doc_fed;
                txtDoc_est.Text   = obj.Doc_est;
                txtRua.Text       = obj.Rua;
                txtNumero.Text    = obj.Numero;
                txtBairro.Text    = obj.Bairro;
                txtCidade.Text    = obj.Cidade;
                txtCep.Text       = obj.Cep;
                txtTelefones.Text = obj.Telefones;
                txtEmail.Text     = obj.Email;

                dtpNasci.Checked = (obj.Dt_nasc.Equals("")) ? false : true;

                if (dtpNasci.Checked)
                {
                    dtpNasci.Value = Convert.ToDateTime(obj.Dt_nasc);
                }

                cboUF.SelectedIndex = cboUF.Items.IndexOf(obj.Estado);

                if (obj.Tipo_pessoa == 'F')
                {
                    cboTipo.SelectedIndex = 0;
                }
                else
                {
                    cboTipo.SelectedIndex = 1;
                }
                btnLimpar.Enabled  = false;
                gbVeiculos.Enabled = true;
                CarregaVeiculos();
            }
        }
Example #2
0
        private void clientesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ListaClientes tela = new ListaClientes();

            tela.Show();
        }
Example #3
0
        private void btnClientes_Click(object sender, EventArgs e)
        {
            ListaClientes tela = new ListaClientes();

            tela.Show();
        }