Example #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        ajusteid = Request.QueryString["AjusteId"];

        // Ene ste punto se debe validar el acceso del usuario al informe
        dsInformesTableAdapters.InformeListaTableAdapter informeAdapter = new dsInformesTableAdapters.InformeListaTableAdapter();

        // Informe basico
        decimal informeId = (decimal)informeAdapter.InformeTipo(decimal.Parse(ajusteid), "B");
        if (informeId != 0) this.lnkInformeBasico.HRef = "javascript:VerInforme(" + ajusteid + "," + informeId.ToString()+");";

        // Informe preliminar
        informeId = (decimal)informeAdapter.InformeTipo(decimal.Parse(ajusteid), "P");
        if (informeId != 0) this.lnkInformePreliminar.HRef = "javascript:VerInforme(" + ajusteid + "," + informeId.ToString() + ");";

        // Informe complementario
        informeId = (decimal)informeAdapter.InformeTipo(decimal.Parse(ajusteid), "C");
        if (informeId != 0) this.lnkinformesComplementarios.HRef = "javascript:VerInforme(" + ajusteid + "," + informeId.ToString() + ");";

        // Informe final
        informeId = (decimal)informeAdapter.InformeTipo(decimal.Parse(ajusteid), "F");
        if (informeId != 0) this.lnkInformeFinal.HRef = "javascript:VerInforme(" + ajusteid + "," + informeId.ToString() + ");";

        //this.news_content.InnerHtml = "scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum";
        cargaDataALosDivs();
        cargaLinks();
    }
Example #2
0
    private void GetFromDB(decimal ajusteId, decimal informeId)
    {
        /*SERVER PATH SOLO CON EL NOMBRE QUE OBTIENE DE LA BASE DE DATOS*/
        dsInformesTableAdapters.InformeListaTableAdapter informeAdapter = new dsInformesTableAdapters.InformeListaTableAdapter();
        dsInformes.InformeListaDataTable informeTable = (dsInformes.InformeListaDataTable)informeAdapter.GetDataInforme(ajusteId, informeId);
        dsInformes.InformeListaRow informeRow = (dsInformes.InformeListaRow)informeTable.Rows[0];

        GetFromFileSystem(informeRow.nombre);
    }
Example #3
0
 private string nombreDelInforme(decimal ajusteId, decimal informeId)
 {
     dsInformesTableAdapters.InformeListaTableAdapter informeAdapter = new dsInformesTableAdapters.InformeListaTableAdapter();
     dsInformes.InformeListaDataTable informeTable = (dsInformes.InformeListaDataTable)informeAdapter.GetDataInforme(ajusteId, informeId);
     dsInformes.InformeListaRow informeRow = (dsInformes.InformeListaRow)informeTable.Rows[0];
     return informeRow.nombre;
 }
Example #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        ajusteid = Request.QueryString["AjusteId"];
        AjusteId = Convert.ToDecimal(ajusteid);

        RGen.Utiles.AtribucionesUsuario au = (RGen.Utiles.AtribucionesUsuario)Session["datosUsuario"];

        CCSOL.Utiles.Utilidades.redirectToUrlWhenIsNull(au, Response, "vLogin.aspx?urlAnterior=" + Request.Url.ToString());

        // Ene ste punto se debe validar el acceso del usuario al informe
        dsInformesTableAdapters.InformeListaTableAdapter informeAdapter = new dsInformesTableAdapters.InformeListaTableAdapter();

        Boolean doEvaluateBroker = false;
        Boolean doEvaluateAseguradora = false;
        if ((au.TipoUsuario == "AdminBroker") || (au.TipoUsuario == "EjecutivoBroker"))
        {
            doEvaluateBroker = true;
        }
        if ((au.TipoUsuario == "AdminCiaSeguros") || (au.TipoUsuario == "EjecutivoCiaSeguros"))
        {
            doEvaluateAseguradora = true;
        }

        Boolean doInformeBasico = true;
        if (doEvaluateBroker)
        {
          doInformeBasico = GestorNotificacion.hasVisibilityPermissionBroker(GestorAjuste.dameAjuste(AjusteId).brokerId, GestorAjuste.dameAjuste(AjusteId).aseguradoraId, "V_INFORMEBASICO");
        }
        if (doEvaluateAseguradora)
        {
          doInformeBasico = GestorNotificacion.hasVisibilityPermissionAseguradora(GestorAjuste.dameAjuste(AjusteId).aseguradoraId, "V_INFORMEBASICO");
        }
        Boolean doInformePreliminar = true;
        if (doEvaluateBroker)
        {
          doInformePreliminar = GestorNotificacion.hasVisibilityPermissionBroker(GestorAjuste.dameAjuste(AjusteId).brokerId, GestorAjuste.dameAjuste(AjusteId).aseguradoraId, "V_INFORMEBASICO");
        }
        if (doEvaluateAseguradora)
        {
          doInformePreliminar = GestorNotificacion.hasVisibilityPermissionAseguradora(GestorAjuste.dameAjuste(AjusteId).aseguradoraId, "V_INFORMEBASICO");
        }
        Boolean doInformeComplementario = true;
        if (doEvaluateBroker)
        {
          doInformeComplementario = GestorNotificacion.hasVisibilityPermissionBroker(GestorAjuste.dameAjuste(AjusteId).brokerId, GestorAjuste.dameAjuste(AjusteId).aseguradoraId, "V_INFORMEBASICO");
        }
        if (doEvaluateAseguradora)
        {
          doInformeComplementario = GestorNotificacion.hasVisibilityPermissionAseguradora(GestorAjuste.dameAjuste(AjusteId).aseguradoraId, "V_INFORMEBASICO");
        }
        Boolean doInformeFinal = true;
        if (doEvaluateBroker)
        {
          doInformeFinal = GestorNotificacion.hasVisibilityPermissionBroker(GestorAjuste.dameAjuste(AjusteId).brokerId, GestorAjuste.dameAjuste(AjusteId).aseguradoraId, "V_INFORMEBASICO");
        }
        if (doEvaluateAseguradora)
        {
          doInformeFinal = GestorNotificacion.hasVisibilityPermissionAseguradora(GestorAjuste.dameAjuste(AjusteId).aseguradoraId, "V_INFORMEBASICO");
        }
        Boolean doConvenio = true;
        if (doEvaluateBroker)
        {
          doConvenio = GestorNotificacion.hasVisibilityPermissionBroker(GestorAjuste.dameAjuste(AjusteId).brokerId, GestorAjuste.dameAjuste(AjusteId).aseguradoraId, "V_CONVENIOAJUSTE");
        }
        if (doEvaluateAseguradora)
        {
          doConvenio = GestorNotificacion.hasVisibilityPermissionAseguradora(GestorAjuste.dameAjuste(AjusteId).aseguradoraId, "V_CONVENIOAJUSTE");
        }

        // Informe basico
        decimal informeId = (decimal)informeAdapter.InformeTipo(decimal.Parse(ajusteid), "B");
        if (informeId != 0 && (doInformeBasico)) this.lnkInformeBasico.HRef = "javascript:VerInforme(" + ajusteid + "," + informeId.ToString() + ");";

        // Informe preliminar
        informeId = (decimal)informeAdapter.InformeTipo(decimal.Parse(ajusteid), "P");
        if (informeId != 0 && (doInformePreliminar)) this.lnkInformePreliminar.HRef = "javascript:VerInforme(" + ajusteid + "," + informeId.ToString() + ");";

        // Informe complementario
        informeId = (decimal)informeAdapter.InformeTipo(decimal.Parse(ajusteid), "C");
        if (informeId != 0 && (doInformeComplementario)) this.lnkinformesComplementarios.HRef = "javascript:VerInforme(" + ajusteid + "," + informeId.ToString() + ");";

        // Informe final
        informeId = (decimal)informeAdapter.InformeTipo(decimal.Parse(ajusteid), "F");
        if (informeId != 0 && (doInformeFinal)) this.lnkInformeFinal.HRef = "javascript:VerInforme(" + ajusteid + "," + informeId.ToString() + ");";

        informeId = (decimal)informeAdapter.InformeTipo(decimal.Parse(ajusteid), "X"); //X means Convenio de Ajuste
        if (informeId != 0 && (doConvenio)) this.lnkConvenio.HRef = "javascript:VerConvenio(" + ajusteid + ");";

        //this.news_content.InnerHtml = "scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum";
        cargaDataALosDivs();
        cargaLinks();
    }
Example #5
0
    public static String getFromDB(decimal ajusteId, string tInforme)
    {
        /*SERVER PATH SOLO CON EL NOMBRE QUE OBTIENE DE LA BASE DE DATOS*/

        dsInformesTableAdapters.InformeListaTableAdapter informeAdapter = new dsInformesTableAdapters.InformeListaTableAdapter();

        //primero ubico q informe es el que estamos buscando
        decimal informeId = (decimal)informeAdapter.InformeTipo(ajusteId, tInforme);

        //obtengo el nombre del informe
        try
        {
          dsInformes.InformeListaDataTable informeTableAux = (dsInformes.InformeListaDataTable)informeAdapter.GetDataInforme(ajusteId, informeId);
          dsInformes.InformeListaRow informeRowAux = (dsInformes.InformeListaRow)informeTableAux.Rows[0];

          return informeRowAux.nombre;
        }
        catch
        {
          return null;
        }
    }