public void CarregarTela()
        {
            SGSServico objSGSServico = new SGSServico();
            SGSOrcamento = new Entidades.Orcamento();

            ddlNomePlano.DataSource = objSGSServico.ListarOrcamento();
            ddlNomePlano.DataBind();
            ddlNomePlano.Items.Insert(0, new ListItem("Selecione", "Selecione"));

            if (Request.QueryString["tipo"] == "con")
            {
                ////* View/Orcamento/ManterPlanoOrcamentario.aspx?tipo=alt&cod=1
                lblTitulo.Text = "Consultar Plano Orçamentário";
                lblDescricao.Text = "Descrição: Permite consultar os Planos Orçamentários da Casa Lar.";
                btnLimpar.Visible = true;
                SGSOrcamento.CodigoOrcamento = Convert.ToInt32(Request.QueryString["cod"]);
               

                SGSOrcamento = objSGSServico.ObterOrcamento(SGSOrcamento.CodigoOrcamento.Value);
            }

        }
        /// <summary>
        /// Este método preenche os controles da tela de acordo com a operação que
        /// está sendo executado "cadastro" ou "edição".
        /// </summary>
        public void CarregarTela()
        {
            SGSServico objSGSServico = new SGSServico();
            SGSOrcamento = new OrcamentoDTO();
            SGSOrcamento.Orcamento = new Entidades.Orcamento();

            ddlCasaLar.DataSource = objSGSServico.ListarCasaLarOrcamento();
            ddlCasaLar.DataBind();

            ddlNaturezaDespesa.DataSource = objSGSServico.ListarNaturezaDespesa();
            ddlNaturezaDespesa.DataBind();
            ddlNaturezaDespesa.Items.Insert(0, new ListItem("Selecione", "Selecione"));

            if (Request.QueryString["tipo"] == "alt")
            {
                lblTitulo.Text = "Alterar Plano Orçamentário";
                lblDescricao.Text = "<b>Descrição:</b> Permite alterar o Plano Orçamentário da Casa Lar.";
                btnExcluir.Visible = true;

                SGSOrcamento.Orcamento.CodigoOrcamento = Convert.ToInt32(Request.QueryString["cod"]);

                //preenche a propriedade Plano Orcamentario
                SGSOrcamento.Orcamento = objSGSServico.ObterOrcamento(SGSOrcamento.Orcamento.CodigoOrcamento.Value);


                SGSOrcamento.OrcamentoNaturezaLista = objSGSServico.ListarOrcamentoNatureza(SGSOrcamento.Orcamento.CodigoOrcamento.Value);
                gridOrcamento.Visible = true;
                gridOrcamento.DataSource = SGSOrcamento.OrcamentoNaturezaLista;
                gridOrcamento.DataBind();

                if (SGSOrcamento != null)
                    this.PreencherDadosView();
                else
                    Server.Transfer("bla.aspx"); //transfere usuário para tela plano não encontrado
            }
            else
            {
                lblTitulo.Text = "Cadastrar Plano Orçamentário";
                lblDescricao.Text = "<b>Descrição:</b> Permite cadastrar o Plano Orçamentário da Casa Lar.";
                btnExcluir.Visible = false;

                gridOrcamento.Visible = false;
                btnIncluir.Visible = false;
                btnRemover.Visible = false;
                ddlNaturezaDespesa.Visible = false;
                txtValorDespesa.Visible = false;
                pnlItemOrcamento.Visible = false;
                pnlHR.Visible = false;
                pnlGrid.Visible = false;
                lblItemOrcamento.Visible = false;
                lblNaturezaDespesa.Visible = false;
                lblValorDespesa.Visible = false;
                validatorValorOrcado.Enabled = false;
                validatorValorOrcado.Visible = false;
                lblVisualizarItem.Visible = false;
            }
        }