Example #1
0
        protected void UpdatePrintButton()
        {
            string sRedirect = "frmFacturaGanadoPrint.aspx";

            sRedirect += Utils.GetEncriptedQueryString("FacturaID=" + this.txtFolio.Text);
            JSUtils.OpenNewWindowOnClick(ref this.btnPrint, sRedirect, "Liquidacion de ganado", true);
        }
Example #2
0
 protected void gvOrdenesDeCarga_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowType == DataControlRowType.DataRow)
     {
         LinkButton lb = (LinkButton)e.Row.Cells[0].FindControl("LBAbrirOrdenDeCarga");
         if (lb != null)
         {
             String sQuery = "ordenID=" + this.gvOrdenesDeCarga.DataKeys[e.Row.RowIndex]["ordenDeCargaID"].ToString();
             sQuery = Utils.GetEncriptedQueryString(sQuery);
             String strRedirect = "~/frmOrdendeCargaAdd.aspx" + sQuery;
             lb.PostBackUrl = strRedirect;
         }
         lb = (LinkButton)e.Row.Cells[0].FindControl("LBPrintOrdenCarga");
         if (lb != null)
         {
             string sFileName = "ORDENDECARGA.pdf";
             sFileName = sFileName.Replace(" ", "_");
             String sURL = "frmDescargaTmpFile.aspx";
             string datosaencriptar;
             datosaencriptar = "filename=" + sFileName + "&ContentType=application/pdf&";
             datosaencriptar = datosaencriptar + "ordenDeCargaId=" + this.gvOrdenesDeCarga.DataKeys[e.Row.RowIndex]["ordenDeCargaID"].ToString() + "&";
             String URLcomplete = sURL + "?data=";
             URLcomplete += Utils.encriptacadena(datosaencriptar);
             JSUtils.OpenNewWindowOnClick(ref lb, URLcomplete, "Orden de carga ", true);
         }
     }
 }
Example #3
0
        protected void btnGenerar_Click(object sender, EventArgs e)
        {
            try
            {
                string sFileName = "REPORTE DE CREDITOS.xls";
                sFileName = sFileName.Replace(" ", "_");
                String sPath = "";
                this.gridCreditos.DataBind();
                Control ctrl = this.gridCreditos.Parent;
                sPath = ExportToExcel(this.gridCreditos);
                String sURL = "frmDescargaTmpFile.aspx";

                string datosaencriptar;
                datosaencriptar  = "archivo=";
                datosaencriptar += sPath;
                datosaencriptar += "&filename=" + sFileName + "&ContentType=application/ms-excel&";

                String parameter = sURL + "?data=";
                parameter += Utils.encriptacadena(datosaencriptar);

                JSUtils.OpenNewWindowOnClick(ref this.btnExport, parameter, "Reporte de Créditos", true);
                this.btnGenerar.Visible = false;
                this.btnExport.Visible  = true;
                ctrl.Controls.Add(this.gridCreditos);
                this.gridCreditos.DataBind();
                Logger.Instance.LogUserSessionRecord(Logger.typeModulo.CREDITOS, Logger.typeUserActions.SELECT, int.Parse(this.Session["USERID"].ToString()), "SE GENERÓ EL REPORTE DE CRÉDITOS");
            }
            catch (System.Exception ex)
            {
                Logger.Instance.LogException(Logger.typeUserActions.PRINT, "btnGeneraReporte_Click", ref ex);
            }
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.IsPostBack)
     {
         this.LoadFonts();
         JSUtils.OpenNewWindowOnClick(ref this.btnChequesConfig, "frmAjustesCheques.aspx", "Configuracion de Cheques", true);
     }
     this.compruebasecurityLevel();
 }
Example #5
0
        protected void gvDocumentos_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            HyperLink lnk = (HyperLink)e.Row.FindControl("lnkDownload");

            if (lnk != null)
            {
                lnk.NavigateUrl = this.Request.Url.ToString();
                JSUtils.OpenNewWindowOnClick(ref lnk, "frmDescargar.aspx" + Utils.GetEncriptedQueryString("docID=" + this.gvDocumentos.DataKeys[e.Row.RowIndex]["docID"].ToString()), "Descargar", true);
            }
        }
Example #6
0
        private void LoadOrdendeCargaData()
        {
            string        sqlQuery   = "select * from OrdenesDeCarga where ordenDeCargaID = @ordenDeCargaID";
            SqlConnection conGaribay = new SqlConnection(myConfig.ConnectionInfo);
            SqlCommand    cmdGaribay = new SqlCommand(sqlQuery, conGaribay);

            try
            {
                conGaribay.Open();
                cmdGaribay.Parameters.Add("ordenDeCargaID", SqlDbType.Int).Value = int.Parse(this.txtNumOrdenCarga.Text);
                SqlDataReader reader = cmdGaribay.ExecuteReader();
                if (reader.Read())
                {
                    this.txtAño.Text = reader["anio"].ToString();
                    this.drpdlCiclo.SelectedValue = reader["cicloId"].ToString();
                    this.txtBodega.Text           = reader["bodega"].ToString();
                    this.txtCC.Text                 = reader["emailCC"].ToString();
                    this.txtChofer.Text             = reader["chofer"].ToString();
                    this.txtColor.Text              = reader["color"].ToString();
                    this.txtDescripcionEmail.Text   = reader["emaildescription"].ToString();
                    this.txtDestino.Text            = reader["destino"].ToString();
                    this.txtEmail.Text              = reader["emailToSend"].ToString();
                    this.txtFacturara.Text          = reader["facturar_a"].ToString();
                    this.txtFecha.Text              = Utils.converttoshortFormatfromdbFormat(reader["fecha"].ToString());
                    this.txtJaula.Text              = reader["jaula"].ToString();
                    this.txtMarca.Text              = reader["marca"].ToString();
                    this.txtObservaciones.Text      = reader["observaciones"].ToString();
                    this.txtOrigen.Text             = reader["origen"].ToString();
                    this.txtPlacas.Text             = reader["placas"].ToString();
                    this.txtPresentacion.Text       = reader["presentacion"].ToString();
                    this.txtProducto.Text           = reader["producto"].ToString();
                    this.txtUbicacion.Text          = reader["ubicacion"].ToString();
                    this.ddlEmpresa.SelectedValue   = reader["empresaId"].ToString();
                    this.ddlProveedor.SelectedValue = reader["proveedorId"].ToString();

                    string sFileName = "ORDENDECARGA.pdf";
                    sFileName = sFileName.Replace(" ", "_");
                    String sURL = "frmDescargaTmpFile.aspx";
                    string datosaencriptar;
                    datosaencriptar = "filename=" + sFileName + "&ContentType=application/pdf&";
                    datosaencriptar = datosaencriptar + "ordenDeCargaId=" + this.txtNumOrdenCarga.Text.ToString() + "&";
                    String URLcomplete = sURL + "?data=";
                    URLcomplete += Utils.encriptacadena(datosaencriptar);
                    JSUtils.OpenNewWindowOnClick(ref this.btnPrint, URLcomplete, "Orden de carga ", true);
                }
            }
            catch (System.Exception ex)
            {
                Logger.Instance.LogException(Logger.typeUserActions.INSERT, "ERROR AL INSERTAR ORDEN DE CARGA", ref ex);
            }
            finally
            {
                conGaribay.Close();
            }
        }
Example #7
0
        protected void UpdateBtnPrint()
        {
            String sQuery = "printing=1&creditoID=" + this.ddlCredito.SelectedValue;

            sQuery = Utils.GetEncriptedQueryString(sQuery);
            String strRedirect = "frmEstadodeCuentaCredito.aspx";

            strRedirect += sQuery;
//             this.Session["DOWNURL"] = strRedirect;
//             strRedirect = "frmDownLoadPage.aspx" + Utils.GetEncriptedQueryString("printing=1");
            JSUtils.OpenNewWindowOnClick(ref this.btnPrint, strRedirect, "Print Estado de Cuenta", true);
        }
Example #8
0
        protected void CreateURLForPagare(HyperLink lnkImprimePagare, string idCredito, string total, string fecha)
        {
            #region Add link for print pagare
            try
            {
                string sFileName = "PAGARE.pdf";
                sFileName = sFileName.Replace(" ", "_");
                string sURL            = "frmDescargaTmpFile.aspx";
                string datosaencriptar = "filename=" + sFileName + "&ContentType=application/pdf&";
                datosaencriptar  = datosaencriptar + "solID=-1&creditoID=" + idCredito + "&";
                datosaencriptar += "impPagare=1&monto=" + Utils.GetSafeFloat(total).ToString() + "&";
                datosaencriptar += "fecha=" + fecha + "&";
                string URLcomplete = sURL + "?data=";
                URLcomplete += Utils.encriptacadena(datosaencriptar);
                lnkImprimePagare.NavigateUrl = this.Request.Url.ToString();
                JSUtils.OpenNewWindowOnClick(ref lnkImprimePagare, URLcomplete, "Pagare", true);
            }

            catch { }
            #endregion
        }
Example #9
0
        protected void gridSolicitudes_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType != DataControlRowType.DataRow)
            {
                return;
            }
            //HyperLink link = (HyperLink)e.Row.FindControl("HyperLink1");
//             if (link != null)
//             {
//                 link.Text = "Abrir";
//                 String sQuery = "idtomodify=" + this.gridSolicitudes.DataKeys[e.Row.RowIndex]["solicitudID"].ToString();
//                 sQuery = Utils.GetEncriptedQueryString(sQuery);
//                 String strRedirect = "~/frmAddSolicitud.aspx";
//                 strRedirect += sQuery;
//                 link.NavigateUrl = strRedirect;
//             }

            HyperLink link = (HyperLink)e.Row.FindControl("lnkSolicitud2010");

            if (link != null)
            {
                String sQuery = "SolID=" + this.gridSolicitudes.DataKeys[e.Row.RowIndex]["solicitudID"].ToString();
                sQuery = Utils.GetEncriptedQueryString(sQuery);
                String strRedirect = "~/frmAddSolicitud2010.aspx";
                strRedirect     += sQuery;
                link.NavigateUrl = strRedirect;
                link.Text        = "Abrir";
            }

//             LinkButton LB = (LinkButton)e.Row.FindControl("LBPrintSolicitud");
//             if(LB!=null)
//             {
//                 string sFileName = "SOLICITUD.pdf";
//                 sFileName = sFileName.Replace(" ", "_");
//                 String sURL = "frmDescargaTmpFile.aspx";
//                 string datosaencriptar;
//                 datosaencriptar = "filename=" + sFileName + "&ContentType=application/pdf&";
//                 datosaencriptar = datosaencriptar + "solID=" + this.gridSolicitudes.DataKeys[e.Row.RowIndex]["solicitudID"].ToString() + "&";
//                 datosaencriptar += "impsol=1&";
//                 String URLcomplete = sURL + "?data=";
//                 URLcomplete += Utils.encriptacadena(datosaencriptar);
//                 //LinkButton l = new LinkButton();
//                 JSUtils.OpenNewWindowOnClick(ref LB,URLcomplete, "Solicitud ", true);
//                 LB.Text = "SOLICITUD";
//             }
            LinkButton LB = (LinkButton)e.Row.FindControl("LBPrintContrato");

            if (LB != null)
            {
                string sFileName = "CONTRATO.pdf";
                sFileName = sFileName.Replace(" ", "_");
                string sURL            = "frmDescargaTmpFile.aspx";
                string datosaencriptar = "filename=" + sFileName + "&ContentType=application/pdf&";
                datosaencriptar  = datosaencriptar + "solID=" + this.gridSolicitudes.DataKeys[e.Row.RowIndex]["solicitudID"].ToString() + "&";
                datosaencriptar += "impcont=1&";
                string URLcomplete = sURL + "?data=";
                URLcomplete += Utils.encriptacadena(datosaencriptar);
                JSUtils.OpenNewWindowOnClick(ref LB, URLcomplete, "Contrato", true);
                LB.Text = "CONTRATO";
            }
//             LB = (LinkButton)e.Row.FindControl("LBPrintCaratula");
//             if(LB!=null)
//             {
//                 string sFileName = "CARATULA_ANEXA.pdf";
//                 sFileName = sFileName.Replace(" ", "_");
//                 string sURL = "frmDescargaTmpFile.aspx";
//                 string datosaencriptar = "filename=" + sFileName + "&ContentType=application/pdf&";
//                 datosaencriptar = datosaencriptar + "solID=" + this.gridSolicitudes.DataKeys[e.Row.RowIndex]["solicitudID"].ToString() + "&";
//                 datosaencriptar += "impcar=1&";
//                 string URLcomplete = sURL + "?data=";
//                 URLcomplete += Utils.encriptacadena(datosaencriptar);
//                 LB.Text = "CARATULA ANEXA";
//                 JSUtils.OpenNewWindowOnClick(ref LB, URLcomplete, "Caratula_Anexa", true);
//             }

//             LB = (LinkButton)e.Row.FindControl("LBPrintSeguro");
//             if(LB!=null){
//                     string sFileName = "CONTRATO_SEGURO.pdf";
//                     sFileName = sFileName.Replace(" ", "_");
//                     string sURL = "frmDescargaTmpFile.aspx";
//                     string datosaencriptar = "filename=" + sFileName + "&ContentType=application/pdf&";
//                     datosaencriptar = datosaencriptar + "solID=" + this.gridSolicitudes.DataKeys[e.Row.RowIndex]["solicitudID"].ToString() + "&";
//                     datosaencriptar += "impseg=1&";
//                     string URLcomplete = sURL + "?data=";
//                     URLcomplete += Utils.encriptacadena(datosaencriptar);
//                     JSUtils.OpenNewWindowOnClick(ref LB, URLcomplete, "Contrato Seguro", true);
//             }
            HyperLink lnk = (HyperLink)e.Row.FindControl("lnkPagare");

            if (lnk != null)
            {
                Solicitudes sol;
                if (this.IsSistemBanco)
                {
                    sol = SolicitudesSisBancos.Get(int.Parse(this.gridSolicitudes.DataKeys[e.Row.RowIndex]["solicitudID"].ToString()));
                }
                else
                {
                    sol = Solicitudes.Get(int.Parse(this.gridSolicitudes.DataKeys[e.Row.RowIndex]["solicitudID"].ToString()));
                }
                string sFileName = "PAGARE.pdf";
                sFileName = sFileName.Replace(" ", "_");
                string sURL            = "frmDescargaTmpFile.aspx";
                string datosaencriptar = "filename=" + sFileName + "&ContentType=application/pdf&";
                datosaencriptar  = datosaencriptar + "creditoID=" + sol.CreditoID.ToString() + "&";
                datosaencriptar += "solID=" + sol.SolicitudID.ToString() + "&";
                datosaencriptar += "impPagare=1&";
                string URLcomplete = sURL + "?data=";
                URLcomplete    += Utils.encriptacadena(datosaencriptar);
                lnk.NavigateUrl = this.Request.Url.ToString();
                lnk.Text        = "PAGARE";
                JSUtils.OpenNewWindowOnClick(ref lnk, URLcomplete, "Pagare", true);
            }
            LB = (LinkButton)e.Row.FindControl("LBTermsAndCon");
            if (LB != null)
            {
                string sFileName = "TERMINOS Y CONDICIONES.pdf";
                sFileName = sFileName.Replace(" ", "_");
                string sURL            = "frmDescargaTmpFile.aspx";
                string datosaencriptar = "filename=" + sFileName + "&ContentType=application/pdf&";
                datosaencriptar  = datosaencriptar + "solID=" + this.gridSolicitudes.DataKeys[e.Row.RowIndex]["solicitudID"].ToString() + "&";
                datosaencriptar += "imptermsandcond=1&";
                string URLcomplete = sURL + "?data=";
                URLcomplete += Utils.encriptacadena(datosaencriptar);
                LB.Text      = "TERMINOS Y CONDICIONES";
                JSUtils.OpenNewWindowOnClick(ref LB, URLcomplete, "Terminos y condiciones", true);
            }
            LB = (LinkButton)e.Row.FindControl("LBSolicitud2010");
            if (LB != null)
            {
                string sFileName = "SOLICITUD.pdf";
                sFileName = sFileName.Replace(" ", "_");
                string sURL            = "frmDescargaTmpFile.aspx";
                string datosaencriptar = "filename=" + sFileName + "&ContentType=application/pdf&";
                datosaencriptar  = datosaencriptar + "solID=" + this.gridSolicitudes.DataKeys[e.Row.RowIndex]["solicitudID"].ToString() + "&";
                datosaencriptar += "impSol2010=1&";
                string URLcomplete = sURL + "?data=";
                URLcomplete += Utils.encriptacadena(datosaencriptar);
                JSUtils.OpenNewWindowOnClick(ref LB, URLcomplete, "Solicitud", true);
                LB.Text = "SOLICITUD";
            }
            LB = (LinkButton)e.Row.FindControl("LBBuroCredito");
            if (LB != null)
            {
                string sFileName = "BUROCREDITO.pdf";
                sFileName = sFileName.Replace(" ", "_");
                string sURL            = "frmDescargaTmpFile.aspx";
                string datosaencriptar = "filename=" + sFileName + "&ContentType=application/pdf&";
                datosaencriptar  = datosaencriptar + "solID=" + this.gridSolicitudes.DataKeys[e.Row.RowIndex]["solicitudID"].ToString() + "&";
                datosaencriptar += "buroCredito=1&";
                string URLcomplete = sURL + "?data=";
                URLcomplete += Utils.encriptacadena(datosaencriptar);
                JSUtils.OpenNewWindowOnClick(ref LB, URLcomplete, "BuroCredito", true);
                LB.Text = "BURO";
            }
            LB = (LinkButton)e.Row.FindControl("LBCartaCompromiso");
            if (LB != null)
            {
                string sFileName = "CARTACOMPROMISO.pdf";
                sFileName = sFileName.Replace(" ", "_");
                string sURL            = "frmDescargaTmpFile.aspx";
                string datosaencriptar = "filename=" + sFileName + "&ContentType=application/pdf&";
                datosaencriptar  = datosaencriptar + "solID=" + this.gridSolicitudes.DataKeys[e.Row.RowIndex]["solicitudID"].ToString() + "&";
                datosaencriptar += "cartaCompromiso=1&";
                string URLcomplete = sURL + "?data=";
                URLcomplete += Utils.encriptacadena(datosaencriptar);
                JSUtils.OpenNewWindowOnClick(ref LB, URLcomplete, "CartaCompromiso", true);
                LB.Text = "CARTA COMPROMISO";
            }


            LB = (LinkButton)e.Row.FindControl("LBEvaluacion");
            if (LB != null)
            {
                string sFileName = "EVALUACION.pdf";
                sFileName = sFileName.Replace(" ", "_");
                string sURL            = "frmDescargaTmpFile.aspx";
                string datosaencriptar = "filename=" + sFileName + "&ContentType=application/pdf&";
                datosaencriptar  = datosaencriptar + "solID=" + this.gridSolicitudes.DataKeys[e.Row.RowIndex]["solicitudID"].ToString() + "&";
                datosaencriptar += "evaluacion=1&";
                string URLcomplete = sURL + "?data=";
                URLcomplete += Utils.encriptacadena(datosaencriptar);
                JSUtils.OpenNewWindowOnClick(ref LB, URLcomplete, "evaluacion", true);
                LB.Text = "EVALUACION";
            }
        }
 internal void SetPrintString(int notaCompra)
 {
     JSUtils.OpenNewWindowOnClick(ref this.btnPrint, "frmDescargaTmpFile.aspx" + Utils.GetEncriptedQueryString("NotaCompraFormato=" + notaCompra.ToString() + "&filename=ordencompra.pdf"), "Imprimir Formato de Compra", true);
 }