private void CarregarEncarregado(int plantao, int equipe)
        {
            cmbMotorista.Enabled         = true;
            cmbEncarregado.Enabled       = true;
            _boletimOcorrenciaServices   = new BLL.BoletimOcorrenciaServices();
            cmbEncarregado.DataSource    = _boletimOcorrenciaServices.CarregarEncarregado(plantao, equipe);
            cmbEncarregado.DisplayMember = "qra";
            cmbEncarregado.ValueMember   = "id";
            cmbEncarregado.SelectedIndex = -1;

            cmbEncarregadoApoio.DataSource    = _boletimOcorrenciaServices.CarregarEncarregado(plantao, equipe);
            cmbEncarregadoApoio.DisplayMember = "qra";
            cmbEncarregadoApoio.ValueMember   = "id";
            cmbEncarregadoApoio.SelectedIndex = -1;
        }
        private void CarregarComboBox()
        {
            _boletimOcorrenciaServices = new BoletimOcorrenciaServices();
            cmbCategoria.DataSource    = _boletimOcorrenciaServices.CarregarCategoria();
            cmbCategoria.DisplayMember = "categoria";
            cmbCategoria.ValueMember   = "id";
            cmbCategoria.SelectedIndex = -1;

            cmbEstado.DataSource    = _boletimOcorrenciaServices.CarregarEstado();
            cmbEstado.DisplayMember = "sigla";
            cmbEstado.ValueMember   = "id";
            cmbEstado.SelectedIndex = -1;

            cmbOrgaoEmissorUf.DataSource    = _boletimOcorrenciaServices.CarregarEstado();
            cmbOrgaoEmissorUf.DisplayMember = "sigla";
            cmbOrgaoEmissorUf.ValueMember   = "id";
            cmbOrgaoEmissorUf.SelectedIndex = -1;

            cmbOrgaoEmissor.DataSource    = _boletimOcorrenciaServices.CarregarOrgEmissor();
            cmbOrgaoEmissor.DisplayMember = "sigla";
            cmbOrgaoEmissor.ValueMember   = "id";
            cmbOrgaoEmissor.SelectedIndex = -1;

            cmbNatOcorrencia.DataSource    = _boletimOcorrenciaServices.CarregarNatOcorrencia();
            cmbNatOcorrencia.DisplayMember = "nome";
            cmbNatOcorrencia.ValueMember   = "id";
            cmbNatOcorrencia.SelectedIndex = -1;

            cmbViatura.DataSource    = _boletimOcorrenciaServices.CarregarViatura();
            cmbViatura.DisplayMember = "prefixo";
            cmbViatura.ValueMember   = "id_veiculo";
            cmbViatura.SelectedIndex = -1;

            cmbViaturaApoio.DataSource    = _boletimOcorrenciaServices.CarregarViatura();
            cmbViaturaApoio.DisplayMember = "prefixo";
            cmbViaturaApoio.ValueMember   = "id_veiculo";
            cmbViaturaApoio.SelectedIndex = -1;

            cmbEquipe.DataSource    = _boletimOcorrenciaServices.CarregarEquipe();
            cmbEquipe.DisplayMember = "nome_equipe";
            cmbEquipe.ValueMember   = "id";
            cmbEquipe.SelectedIndex = -1;

            cmbPlantao.DataSource    = _boletimOcorrenciaServices.CarregarPlantao();
            cmbPlantao.DisplayMember = "nome_plantao";
            cmbPlantao.ValueMember   = "id";
            cmbPlantao.SelectedIndex = -1;
        }
        private void RetornarParteCpf(string cpf)
        {
            _boletimOcorrenciaServices = new BLL.BoletimOcorrenciaServices();
            dt = new DataTable();
            dt = _boletimOcorrenciaServices.RetornarParteCpf(cpf);

            if (dt.Rows.Count != 0)
            {
                var resposta = MessageBox.Show("CPF já cadastrado! Carregar informações?", "Aviso", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
                if (resposta == DialogResult.Yes)
                {
                    txtNome.Text            = dt.Rows[0]["nome"].ToString();
                    txtNomePai.Text         = dt.Rows[0]["nome_pai"].ToString();
                    txtNomeMae.Text         = dt.Rows[0]["nome_mae"].ToString();
                    txtTelefone.Text        = dt.Rows[0]["telefone"].ToString();
                    txtCelular.Text         = dt.Rows[0]["celular"].ToString();
                    txtEndereco.Text        = dt.Rows[0]["endereco"].ToString();
                    txtCidade.Text          = dt.Rows[0]["cidade"].ToString();
                    txtBairro.Text          = dt.Rows[0]["bairro"].ToString();
                    txtNumero.Text          = dt.Rows[0]["numero"].ToString();
                    cmbEstado.SelectedValue = Convert.ToInt16(dt.Rows[0]["estado"]);
                    txtCep.Text             = dt.Rows[0]["cep"].ToString();
                    txtComplemento.Text     = dt.Rows[0]["complemento"].ToString();
                    txtNaturalidade.Text    = dt.Rows[0]["naturalidade"].ToString();
                    txtNacionalidade.Text   = dt.Rows[0]["nacionalidade"].ToString();
                    txtLocalTrabalho.Text   = dt.Rows[0]["local_trabalho"].ToString();
                    txtNumTrabalho.Text     = dt.Rows[0]["num_trabalho"].ToString();
                    txtBairroTrabalho.Text  = dt.Rows[0]["bairro_trabalho"].ToString();
                    txtCidadeTrabalho.Text  = dt.Rows[0]["cidade_trabalho"].ToString();
                    txtProfissao.Text       = dt.Rows[0]["profissao"].ToString();
                    txtTelComercial.Text    = dt.Rows[0]["tel_comercial"].ToString();
                    dtpDataNascimento.Value = Convert.ToDateTime(dt.Rows[0]["data_nascimento"]);
                    txtCpf.Text             = dt.Rows[0]["cpf"].ToString();
                    txtRg.Text = dt.Rows[0]["rg"].ToString();
                    dtpDataExpedicaoRg.Value        = Convert.ToDateTime(dt.Rows[0]["expedicao_rg"]);
                    cmbOrgaoEmissor.SelectedValue   = Convert.ToInt16(dt.Rows[0]["org_emissor"]);
                    cmbOrgaoEmissorUf.SelectedValue = Convert.ToInt16(dt.Rows[0]["uf"]);
                    cmbCategoria.SelectedValue      = Convert.ToInt16(dt.Rows[0]["categoria"]);
                    txtRegCnh.Text       = dt.Rows[0]["reg_cnh"].ToString();
                    txtCnh.Text          = dt.Rows[0]["num_cnh"].ToString();
                    dtpValidadeCnh.Value = Convert.ToDateTime(dt.Rows[0]["val_cnh"]);
                    txtNaturalidade.Text = dt.Rows[0]["naturalidade"].ToString();
                }
            }
        }