public void preenche_grid()
        {

            if (tabGerenciamento_entrega.SelectedIndex == 0)
            {
                #region Seleciona_Pedidos_Nao_Finalizados

                        clsPedido teste = new clsPedido();
                        clsGerenciamentoEntregaBLL teste1 = new clsGerenciamentoEntregaBLL();
                        teste.Data = dateDeData.Value.ToString("d");
                        teste.DataFim = dateAteData.Value.ToString("d");

                        if (chcCaminho.Checked)
                            teste.Estado_Caminho = chcCaminho.Text.ToString();
                        if (chcPreparo.Checked)
                            teste.Estado_Preparo = chcPreparo.Text.ToString();
                        if (chcNovos_Pedidos.Checked)
                            teste.Estado_Novo = "Na fila";

                        GridPedidosP.DataSource = teste1.SelectPedido(teste);
                        GridPedidosP.Columns["Cod_Funcionario"].Visible = false;
                        GridPedidosP.Columns["Cod_Cliente"].Visible = false;   
             
                #endregion
            }
            else
            {
                #region Seleciona_Pedidos_Finalizados
                        clsPedido teste = new clsPedido();
                        clsGerenciamentoEntregaBLL teste1 = new clsGerenciamentoEntregaBLL();
                        teste.Data = DateDeData2.Value.ToString("d");
                        teste.DataFim = dateAteData2.Value.ToString("d");

                        if (chcCancelado.Checked)
                            teste.Estado_Cancelado = chcCancelado.Text.ToString();
                        if (chcEntregue.Checked)
                            teste.Estado_Entregue = "Finalizado";

                        GridPedidosF.DataSource = teste1.SelectPedido(teste);
                        GridPedidosF.Columns["Cod_Funcionario"].Visible = false;
                        GridPedidosF.Columns["Cod_Cliente"].Visible = false;
                #endregion
            }
        }