private void cadProj_Load(object sender, EventArgs e)
        {
            //try
            //{
            DAO.Banco dao = new DAO.Banco();
            dgvProjetos.DataSource = dao.retornarProjeto();
            dgvClientes.DataSource = dao.retornarCliente();
            dgvTipoMov.DataSource  = dao.retornarTipoMovel();
            int cont  = dgvClientes.RowCount - 1;
            int cont1 = dgvTipoMov.RowCount - 1;

            for (int i = 0; i < cont; i++)
            {
                listBox1.Items.Add(dgvClientes.Rows[i].Cells[0].Value.ToString() + " - " + dgvClientes.Rows[i].Cells[1].Value.ToString());
            }
            for (int i = 0; i < cont1; i++)
            {
                listBox2.Items.Add(dgvTipoMov.Rows[i].Cells[0].Value.ToString() + " - " + dgvTipoMov.Rows[i].Cells[1].Value.ToString());
            }
            //}
            //catch (Exception erro)
            //{
            //    MessageBox.Show("Não foi possível conectar com o servidor! Erro: " + erro.Message, "Moveis Planejados");
            //}
        }
        private void btnCadastrar_Click(object sender, EventArgs e)
        {
            if (ValidarCampoString(txtNome.Text, "Nome") == false)
            {
                txtNome.Clear();
                txtNome.Focus();
                return;
            }
            if (ValidarCampoString(txtIdMovel.Text, "ID (Tipo do Móvel)") == false)
            {
                txtIdMovel.Clear();
                txtIdMovel.Focus();
                return;
            }
            if (ValidarCampoNum(txtIdMovel.Text, "ID (Tipo do Móvel)") == false)
            {
                txtIdMovel.Clear();
                txtIdMovel.Focus();
                return;
            }
            if (ValidarCampoString(txtIdCli.Text, "ID (Cliente)") == false)
            {
                txtIdCli.Clear();
                txtIdCli.Focus();
                return;
            }
            if (ValidarCampoNum(txtIdCli.Text, "ID (Cliente)") == false)
            {
                txtIdCli.Clear();
                txtIdCli.Focus();
                return;
            }
            if (ValidarCampoString(txtPreco.Text, "Preço") == false)
            {
                txtPreco.Clear();
                txtPreco.Focus();
                return;
            }
            if (ValidarCampoFloat(txtPreco.Text, "Preço") == false)
            {
                txtPreco.Clear();
                txtPreco.Focus();
                return;
            }
            if (ValidarCampoString(txtDtEntrega.Text, "Data de Entrega") == false)
            {
                txtDtEntrega.Clear();
                txtDtEntrega.Focus();
                return;
            }
            if (ValidarCampoData(txtDtEntrega.Text, "Data de Entrega") == false)
            {
                txtDtEntrega.Clear();
                txtDtEntrega.Focus();
                return;
            }

            try
            {
                DAO.Banco dao = new DAO.Banco();
                dao.cadastrarProjeto(int.Parse(txtIdMovel.Text), int.Parse(txtIdCli.Text), txtNome.Text, txtDesc.Text, float.Parse(txtPreco.Text), DateTime.Now, DateTime.Parse(txtDtEntrega.Text));
                dgvProjetos.DataSource = dao.retornarProjeto();
            }
            catch (Exception erro)
            {
                MessageBox.Show("Não foi possível efetuar o cadastro! Erro: " + erro.Message, "Moveis Planejados");
            }
            txtIdMovel.Clear();
            txtIdCli.Clear();
            txtNome.Clear();
            txtDesc.Clear();
            txtPreco.Clear();
            txtDtEntrega.Clear();
        }