Example #1
0
        protected string getOpcoes(Int32 _IdDocumento)
        {
            try
            {
                String strOpcoes = "";

                DocumentoDAL dDAL = new DocumentoDAL();

                ArquivamentoInternoDAL aiDAL = new ArquivamentoInternoDAL();
                ArquivamentoInterno    ai    = aiDAL.CarregarDadosPorIdDocumento(_IdDocumento);

                if (ai.ArquivoDocumento == "-")
                {
                    strOpcoes = strOpcoes + "<a href=\\\"JavaScript:alert('Documento sem arquivo cadastrado');\\\" data-toggle=\\\"tooltip\\\" data-placement=\\\"top\\\" title=\\\"Visualizar Documento\\\"><i class=\\\"fa fa-search\\\" style=\\\"margin-right:10px\\\"></i></a>";
                }
                else
                {
                    strOpcoes = strOpcoes + "<a href=\\\"http://www.lfcnet.org.br/gesdoc/arquivos/ArquivamentosInternos/" + ai.ArquivoDocumento + "\\\" data-toggle=\\\"tooltip\\\" data-placement=\\\"top\\\" title=\\\"Visualizar Documento\\\" target=\\\"_blank\\\"><i class=\\\"fa fa-search\\\" style=\\\"margin-right:10px\\\"></i></a>";
                }

                strOpcoes = strOpcoes + "<a href=\\\"HistoricoDocumento.aspx?idDoc=" + _IdDocumento + "\\\" data-toggle=\\\"tooltip\\\" data-placement=\\\"top\\\" title=\\\"Histórico do Documento\\\" class=\\\"historicoDocumento\\\"><i class=\\\"fa fa-calendar\\\" style=\\\"margin-right:10px\\\"></i></a>";
                strOpcoes = strOpcoes + "<a href=\\\"ArquivarExterno.aspx?idDoc=" + _IdDocumento + "\\\" data-toggle=\\\"tooltip\\\" data-placement=\\\"top\\\" title=\\\"Arquivar Externamente o Documento\\\"><i class=\\\"fa fa-globe\\\" style=\\\"margin-right:10px\\\"></i></a>";
                strOpcoes = strOpcoes + "<a href=\\\"#\\\" onclick=\\\"return confirmaDesarquivamento(this, " + _IdDocumento + ");\\\" data-toggle=\\\"tooltip\\\" data-placement=\\\"top\\\" title=\\\"Desarquivar Documento\\\"><i class=\\\"fa fa-folder-open\\\"></i>";

                return(strOpcoes);
            }
            catch (Exception)
            { throw; }
        }
Example #2
0
        protected string getTipoDocumentoLocalizacao(Int32 _IdDocumento, Int32 _IdTipoDocumento)
        {
            try
            {
                ArquivamentoInternoDAL aiDAL = new ArquivamentoInternoDAL();
                ArquivamentoInterno    ai    = aiDAL.CarregarDadosPorIdDocumento(_IdDocumento);

                TipoDocumentoDAL tdDAL = new TipoDocumentoDAL();

                String strTipoDocumentoLocalizacao;

                strTipoDocumentoLocalizacao  = tdDAL.CarregarDadosPorIdTipoDocumento(_IdTipoDocumento).Nome + "<br />";
                strTipoDocumentoLocalizacao += "(Arquivo: <span class=\\\"text-red\\\"><b>" + ai.Arquivo + "</b></span> | Gaveta: <span class=\\\"text-red\\\"><b>" + ai.Gaveta + "</b></span> | Pasta: <span class=\\\"text-red\\\"><b>" + ai.Pasta + "</b></span>)";

                return(strTipoDocumentoLocalizacao);
            }
            catch (Exception)
            { throw; }
        }
Example #3
0
        protected string getOpcoes(Int32 _IdDocumento)
        {
            try
            {
                String strOpcoes = "";

                DocumentoDAL dDAL = new DocumentoDAL();


                //if (dDAL.NaoRecebido(_IdDocumento, Convert.ToInt32(Session["sesIdProcesso"])))
                //{ strOpcoes = strOpcoes + "<button class=\\\"btn btn-danger btn-xs\\\" onclick=\\\"return confirmaRecebimento(this, " + _IdDocumento + ");\\\"><i class=\\\"fa fa-mail-reply\\\"></i></button>"; }
                //else
                //{ strOpcoes = strOpcoes + "<a href=\\\"MovimentarDocumento.aspx?idDoc=" + _IdDocumento + "\\\" class=\\\"movimentarDocumento\\\"><button class=\\\"btn btn-success btn-xs\\\"><i class=\\\"fa fa-mail-forward\\\"></i></button></a>"; }

                //strOpcoes = strOpcoes + "&nbsp;<a href=\\\"HistoricoDocumento.aspx?idDoc=" + _IdDocumento + "\\\" class=\\\"historicoDocumento\\\"><button class=\\\"btn btn-primary btn-xs\\\"><i class=\\\"fa fa-calendar\\\"></i></button></a>&nbsp;<a href=\\\"AlterarDocumento.aspx?idDoc=" + _IdDocumento + "\\\"><button class=\\\"btn btn-primary btn-xs\\\"><i class=\\\"fa fa-edit\\\"></i></button></a>";

                ArquivamentoInternoDAL aiDAL = new ArquivamentoInternoDAL();
                ArquivamentoInterno    ai    = aiDAL.CarregarDadosPorIdDocumento(_IdDocumento);

                if (ai.ArquivoDocumento == "-")
                {
                    strOpcoes = strOpcoes + "<a href=\\\"JavaScript:alert('Documento sem arquivo cadastrado');\\\"><button class=\\\"btn btn-primary btn-xs\\\"><i class=\\\"fa fa-search\\\"></i></button></a>";
                }
                else
                {
                    strOpcoes = strOpcoes + "<a href=\\\"http://www.lfcnet.org.br/gesdoc/sgd/img/arquivamentosInternos/" + ai.ArquivoDocumento + "\\\" target=\\\"_blank\\\"><button class=\\\"btn btn-primary btn-xs\\\"><i class=\\\"fa fa-search\\\"></i></button></a>";
                }

                strOpcoes = strOpcoes + "&nbsp;<a href=\\\"HistoricoDocumento.aspx?idDoc=" + _IdDocumento + "\\\" class=\\\"historicoDocumento\\\"><button class=\\\"btn btn-primary btn-xs\\\"><i class=\\\"fa fa-calendar\\\"></i></button></a>";
                strOpcoes = strOpcoes + "&nbsp;<a href=\\\"ArquivarExterno.aspx?idDoc=" + _IdDocumento + "\\\" class=\\\"arquivarExterno\\\"><button class=\\\"btn btn-primary btn-xs\\\"><i class=\\\"fa fa-globe\\\"></i></button></a>";
                strOpcoes = strOpcoes + "&nbsp;<button class=\\\"btn btn-primary btn-xs\\\" onclick=\\\"return confirmaDesarquivamento(this, " + _IdDocumento + ");\\\"><i class=\\\"fa fa-folder-open\\\"></i></button>";

                return(strOpcoes);
            }
            catch (Exception)
            { throw; }
        }
Example #4
0
        protected void Arquivar(object sender, EventArgs e)
        {
            try
            {
                DocumentoDAL dDAL = new DocumentoDAL();

                ArquivamentoInterno ai = new ArquivamentoInterno();

                // CADASTRA O ARQUIVAMENTO INTERNO //
                bool boolArquivoInvalido = false;

                if (txtArquivoDocumento.HasFile)
                {
                    switch (txtArquivoDocumento.FileName.Substring(txtArquivoDocumento.FileName.Length - 4))
                    {
                    case ".pdf":
                        ai.Documento        = dDAL.CarregarDadosPorIdDocumento(Convert.ToInt32(Request.QueryString["idDoc"]));
                        ai.Arquivo          = Convert.ToInt32(txtArquivo.Text);
                        ai.Gaveta           = Convert.ToInt32(txtGaveta.Text);
                        ai.Pasta            = Convert.ToInt32(txtPasta.Text);
                        ai.ArquivoDocumento = "-";

                        ArquivamentoInternoDAL aiDAL = new ArquivamentoInternoDAL();
                        aiDAL.Cadastrar(ai);

                        ArquivamentoInterno aiUltimo = new ArquivamentoInterno();
                        aiUltimo = aiDAL.CarregarDadosUltimoCadastrado();

                        String strNome;

                        strNome = aiUltimo.IdArquivamentoInterno + txtArquivoDocumento.FileName.Substring(txtArquivoDocumento.FileName.Length - 4);
                        aiUltimo.ArquivoDocumento = strNome;

                        txtArquivoDocumento.SaveAs(Server.MapPath(@"../../../sgd/img/arquivamentosInternos/") + strNome);

                        aiDAL.Alterar(aiUltimo);

                        break;

                    default:
                        boolArquivoInvalido = true;

                        break;
                    }
                }
                else
                {
                    ai.Documento        = dDAL.CarregarDadosPorIdDocumento(Convert.ToInt32(Request.QueryString["idDoc"]));
                    ai.Arquivo          = Convert.ToInt32(txtArquivo.Text);
                    ai.Gaveta           = Convert.ToInt32(txtGaveta.Text);
                    ai.Pasta            = Convert.ToInt32(txtPasta.Text);
                    ai.ArquivoDocumento = "-";

                    ArquivamentoInternoDAL aiDAL = new ArquivamentoInternoDAL();
                    aiDAL.Cadastrar(ai);
                }
                // FIM //

                // ALTERA O STATUS DO DOCUMENTO //
                Documento d = dDAL.CarregarDadosPorIdDocumento(Convert.ToInt32(Request.QueryString["idDoc"]));
                d.Arquivado = "1";

                //Response.Write(d.VencimentoVigencia == new DateTime(0001, 1, 1));
                //Response.End();

                dDAL.Alterar(d);
                // FIM //

                // EXCLUI TODOS OS ARQUIVAMENTOS EXTERNOS DO DOCUMENTO //
                ArquivamentoExternoDAL aeDAL = new ArquivamentoExternoDAL();
                aeDAL.ExcluirPorIdDocumento(d.IdDocumento);
                // FIM //

                Response.Write("<script language='JavaScript'>alert('Arquivamento Interno do Documento realizado com sucesso');window.parent.location='ListarDocumentos.aspx';</script>");
            }
            catch (Exception)
            { throw; }
        }
Example #5
0
        protected void Arquivar(object sender, EventArgs e)
        {
            try
            {
                DocumentoDAL dDAL = new DocumentoDAL();

                // CADASTRA O ARQUIVAMENTO EXTERNO //
                bool boolArquivoInvalido = false;

                if (txtArquivoDocumento.HasFile)
                {
                    switch (txtArquivoDocumento.FileName.Substring(txtArquivoDocumento.FileName.Length - 4))
                    {
                    case ".pdf":
                        ArquivamentoExterno ae = new ArquivamentoExterno();

                        ae.Documento        = dDAL.CarregarDadosPorIdDocumento(Convert.ToInt32(Request.QueryString["idDoc"]));
                        ae.Estante          = Convert.ToInt32(txtEstante.Text);
                        ae.Prateleira       = Convert.ToInt32(txtPrateleira.Text);
                        ae.Caixa            = Convert.ToInt32(txtCaixa.Text);
                        ae.ArquivoDocumento = "-";

                        ArquivamentoExternoDAL aeDAL = new ArquivamentoExternoDAL();
                        aeDAL.Cadastrar(ae);

                        ArquivamentoExterno aeUltimo = new ArquivamentoExterno();
                        aeUltimo = aeDAL.CarregarDadosUltimoCadastrado();

                        String strNome;

                        strNome = aeUltimo.IdArquivamentoExterno + txtArquivoDocumento.FileName.Substring(txtArquivoDocumento.FileName.Length - 4);
                        aeUltimo.ArquivoDocumento = strNome;

                        txtArquivoDocumento.SaveAs(Server.MapPath(@"../../../sgd/img/arquivamentosExternos/") + strNome);

                        aeDAL.Alterar(aeUltimo);

                        break;

                    default:
                        boolArquivoInvalido = true;

                        break;
                    }
                }
                // FIM //

                // ALTERA O STATUS DO DOCUMENTO //
                Documento d = dDAL.CarregarDadosPorIdDocumento(Convert.ToInt32(Request.QueryString["idDoc"]));
                d.Arquivado = "2";
                dDAL.Alterar(d);
                // FIM //

                // EXCLUI TODOS OS ARQUIVAMENTOS INTERNOS DO DOCUMENTO //
                ArquivamentoInternoDAL aiDAL = new ArquivamentoInternoDAL();
                aiDAL.ExcluirPorIdDocumento(d.IdDocumento);
                // FIM //
            }
            catch (Exception)
            { throw; }
        }