protected void AddJSToControls()
        {
            JSUtils.AddDisableWhenClick(ref this.btnAddPago, this);

            String sOnchagemov = "checkValueInList(";

            sOnchagemov += "this" + ",'EFECTIVO','";
            sOnchagemov += this.divPagoMovCaja.ClientID + "');";
            this.cmbTipodeMovPago.Attributes.Add("onChange", sOnchagemov);

            sOnchagemov += "checkValueInList(";
            sOnchagemov += "this" + ",'MOVIMIENTO DE BANCO','";
            sOnchagemov += this.divMovBanco.ClientID + "');";
            this.cmbTipodeMovPago.Attributes.Add("onChange", sOnchagemov);

            sOnchagemov  = "checkValueInList(";
            sOnchagemov += "this" + ",'CHEQUE','";
            sOnchagemov += this.divCheque.ClientID + "');";
            this.cmbConceptomovBancoPago.Attributes.Add("onChange", sOnchagemov);
        }
示例#2
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
        }
示例#3
0
 public static void AddMsgToCtrlOnClick(ref System.Web.UI.WebControls.Button ctrl, string msg)
 {
     JSUtils.AddMsgToCtrlOnClick(ref ctrl, msg, true);
 }
示例#4
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";
            }
        }
示例#5
0
 private void AddJSToControls()
 {
     JSUtils.AddDisableWhenClick(ref this.btnAddFacturaAPago, this);
     JSUtils.AddDisableWhenClick(ref this.btnAddPago, this);
     JSUtils.AddDisableWhenClick(ref this.btnRemoveFacturaPago, this);
 }
 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);
 }
示例#7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                this.lblDescripcion.Visible = false;
                String sOnchange;
                this.txtFecha.Text = Utils.Now.ToString("dd/MM/yyyy");
                JSUtils.AddDisableWhenClick(ref this.btnAgregar0, this);
                JSUtils.AddDisableWhenClick(ref this.btnModificar, this);
                sOnchange  = "EnableDisableAbonosCargos('";
                sOnchange += this.ddlConcepto.ClientID + "','";
                sOnchange += this.cmbTipodeMov.ClientID + "');";
                this.ddlConcepto.Attributes.Add("onChange", sOnchange);
                JSUtils.AddMsgToCtrlOnClick(ref this.btnCancelar, "¡¡NO OLVIDE ACTUALIZAR LA LISTA DE MOVIMIENTOS DE BANCO !!", false);
                JSUtils.closeCurrentWindow(ref this.btnCancelar);
                if (Request.QueryString["data"] != null)
                {
                    if (this.loadqueryStrings(Request.QueryString["data"].ToString()))
                    {
                        this.btnAgregar0.Visible  = true;
                        this.btnModificar.Visible = false;
                        if (this.myQueryStrings["movID"] != null && int.TryParse(this.myQueryStrings["movID"].ToString(), out imovID) && imovID > -1) //CHECAMOS SI ES PARA MODIFICAR
                        {
                            this.lblmovID.Text = imovID.ToString();
                            //AQUI VERIFICAMOS SI EL MOVIMIENTO VIENE DE UN CRÉDITO
                            if (this.cargadatostomodify())
                            {
                                Logger.Instance.LogUserSessionRecord(Logger.typeModulo.MOVIMIENTOSDEBANCO, Logger.typeUserActions.SELECT, this.UserID, "ABRIÓ EL MOVIMIENTO DE BANCO NÚMERO." + this.lblmovID.Text);
                                this.btnModificar.Visible = true;
                                this.btnAgregar0.Visible  = false;
                                this.drpdlCuenta.Enabled  = false;
                            }
                            else
                            {
                                Response.Write("<script type=\"text/javascript\">window.close();</script>");
                            }
                        }
//                         else
//                         {
//                            //AQUI PONEMOS EL CODIGO SI RECIBIMOS EL ANTICIPO ID O ALGO
//                             if (this.myQueryStrings["creditoFinID"] != null && int.TryParse(this.myQueryStrings["creditoFinID"].ToString(), out credFinID) && credFinID > -1)
//                             {
//                                 this.lblcredFinID.Text = credFinID.ToString();
//                                 this.lblDescripcion.Text = "ESTE MOVIMIENTO SE AGREGARÁ AL CREDITO FINANCIERO: " + credFinID.ToString();
//                                 this.lblDescripcion.Visible = true;
//                             }
//                         }

                        //here is where if the mov de banco is currently related to anything
                        //load the data for modify it
                        if (this.myQueryStrings["creditoFinID"] != null && int.TryParse(this.myQueryStrings["creditoFinID"].ToString(), out credFinID) && credFinID > -1)
                        {
                            this.lblcredFinID.Text      = credFinID.ToString();
                            this.lblDescripcion.Text    = "ESTE MOVIMIENTO ESTÁ AGREGADO AL CREDITO FINANCIERO: " + credFinID.ToString();
                            this.lblDescripcion.Visible = true;

                            this.chkNotadeCompra.Visible      = false;
                            this.pnlNotaCompra.Visible        = false;
                            this.chkCreditoFinanciero.Enabled = false;
                            this.pnlCreditoFinanciero.Visible = true;
                            this.chkCreditoFinanciero.Checked = true;

                            this.pnlFactura.Visible     = false;
                            this.chkFactura.Visible     = false;
                            this.chkNotadeVenta.Visible = false;
                            this.pnlNotadeVenta.Visible = false;
                            this.LoadCreditoFinancieroData(credFinID);
                        }
                        else
                        if (this.myQueryStrings["FacturaCVID"] != null && int.TryParse(this.myQueryStrings["FacturaCVID"].ToString(), out this.FacturaVentaID) && FacturaVentaID > -1)
                        {
                            this.lblcredFinID.Text            = this.FacturaVentaID.ToString();
                            this.lblDescripcion.Text          = "ESTE MOVIMIENTO ESTÁ LIGADO A LA FACTURA DE VENTA: " + this.FacturaVentaID.ToString();
                            this.lblDescripcion.Visible       = true;
                            this.chkNotadeCompra.Visible      = false;
                            this.pnlNotaCompra.Visible        = false;
                            this.chkCreditoFinanciero.Visible = false;
                            this.pnlCreditoFinanciero.Visible = false;
                            this.chkFactura.Enabled           = false;
                            this.pnlFactura.Visible           = true;
                            this.chkFactura.Checked           = true;
                            this.chkNotadeVenta.Visible       = false;
                            this.pnlNotadeVenta.Visible       = false;

                            this.pnlFactura_CollapsiblePanelExtender.Collapsed = false;
                            SqlConnection connFac = new SqlConnection(myConfig.ConnectionInfo);
                            try
                            {
                                SqlCommand comm = new SqlCommand();
                                connFac.Open();
                                comm.Connection  = connFac;
                                comm.CommandText = "SELECT FacturaCV, cicloID, clienteVentaID FROM FacturasClientesVenta WHERE (FacturaCV = @FacturaCV)";
                                comm.Parameters.Add("@FacturaCV", SqlDbType.Int).Value = FacturaVentaID;
                                SqlDataReader reader = comm.ExecuteReader();
                                reader.Read();
                                this.ddlFacturaCiclo.DataBind();
                                this.ddlFacturaCiclo.SelectedValue = reader["cicloID"].ToString();
                                this.ddlFacturaCiclo.Enabled       = false;
                                this.ddlFacturaClientesVenta.DataBind();
                                this.ddlFacturaClientesVenta.SelectedValue = reader["clienteVentaID"].ToString();
                                this.ddlFacturaClientesVenta.Enabled       = false;
                                this.ddlFacturas.DataBind();
                                this.ddlFacturas.SelectedValue = FacturaVentaID.ToString();
                                this.ddlFacturas.Enabled       = false;
                            }
                            catch (System.Exception ex)
                            {
                                Logger.Instance.LogException(Logger.typeUserActions.SELECT, "getting ciclo y cliente id's", ref ex);
                            }
                            finally
                            {
                                connFac.Close();
                            }
                        }
                        else
                        if (this.myQueryStrings["notaventaID"] != null && int.TryParse(this.myQueryStrings["notaventaID"].ToString(), out notaventaID) && notaventaID > -1)
                        {
                            this.lblNotaVentaID.Text                 = this.notaventaID.ToString();
                            this.lblDescripcion.Text                 = "ESTE MOVIMIENTO ESTÁ LIGADO A LA NOTA DE VENTA: " + this.notaventaID.ToString();
                            this.lblDescripcion.Visible              = true;
                            this.chkNotadeCompra.Visible             = false;
                            this.pnlNotaCompra.Visible               = false;
                            this.chkCreditoFinanciero.Visible        = false;
                            this.pnlCreditoFinanciero.Visible        = false;
                            this.chkFactura.Visible                  = false;
                            this.pnlFactura.Visible                  = false;
                            this.chkNotadeVenta.Enabled              = false;
                            this.pnlNotadeVenta.Visible              = true;
                            this.chkNotadeVenta.Checked              = true;
                            this.CollapsiblePanelExtender3.Collapsed = false;

                            SqlConnection connFac = new SqlConnection(myConfig.ConnectionInfo);
                            try
                            {
                                SqlCommand comm = new SqlCommand();
                                connFac.Open();
                                comm.Connection  = connFac;
                                comm.CommandText = "SELECT  cicloID, productorID,   Folio + ' - ' + CAST(notadeventaID AS VARCHAR(50)) + ' ' + CONVERT(varchar(50), Fecha, 103) AS Nota, notadeventaID FROM Notasdeventa WHERE (notadeventaID = @notadeventaID)";
                                comm.Parameters.Add("@notadeventaID", SqlDbType.Int).Value = notaventaID;
                                SqlDataReader reader = comm.ExecuteReader();
                                reader.Read();
                                this.ddlFacturaCiclo.DataBind();
                                this.drpdlCicloNotaVenta.SelectedValue = reader["cicloID"].ToString();
                                this.drpdlCicloNotaVenta.Enabled       = false;
                                this.drpdlCicloNotaVenta.DataBind();
                                this.drpdlProductoresNotaVenta.SelectedValue = reader["productorID"].ToString();
                                this.drpdlProductoresNotaVenta.Enabled       = false;
                                this.drpdlProductoresNotaVenta.DataBind();
                                this.dprdlNota.SelectedValue = notaventaID.ToString();
                                this.dprdlNota.Enabled       = false;
                            }
                            catch (System.Exception ex)
                            {
                                Logger.Instance.LogException(Logger.typeUserActions.SELECT, "getting ciclo y productor id's", ref ex);
                            }
                            finally
                            {
                                connFac.Close();
                            }
                        }
                        else
                        {
                            if (this.myQueryStrings["notacompraID"] != null && int.TryParse(this.myQueryStrings["notacompraID"].ToString(), out notacompraID) && notacompraID > -1)
                            {
                                this.lblNotaCompraID.Text = this.notacompraID.ToString();
                                this.cargaDatosNCompra();
                            }
                        }
                    }
                    else
                    {
                        Logger.Instance.LogMessage(Logger.typeLogMessage.CRITICAL, Logger.typeUserActions.SELECT, this.UserID, "ERROR AL CARGAR DATOS EN ADDMOVQUICK, LOS PARÄMETROS PASADOS COMO QUERYSTRINGS NO CORRESPONDEN A ALGUN MOVIMIENTO ", this.Request.Url.ToString());
                        Response.Write("<script type=\"text/javascript\">window.close();</script>");
                    }
                }
                else
                {
                    this.txtFecha.Text          = Utils.Now.ToString("dd/MM/yyyy");
                    this.lblDescripcion.Visible = false;
                }
                //this.divConceptosFiscales.Attributes.Add("style", this.chkMostrarFiscales.Checked ? "visibility: visible; display: block" : "visibility: hidden; display: none");
                this.pnlNewMov.Visible = false;
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                this.btnModificar.Visible = false;
                this.btnAgregar0.Visible  = true;
                int certid = -1, credid = -1;
                this.ddlCFSeguro.DataBind();
                this.drpdlCred.DataBind();
                string msgConf;
                this.drpdlBodega.DataBind();
                //    msgConf = "return alert('¡¡NO OLVIDE ACTUALIZAR LA LISTA DE CERTIFICADOS !! '); window.close(); ";
                JSUtils.closeCurrentWindow(ref this.btnCancelar);

                /*         this.btnCancelar.Attributes.Add("onclick", "<script type=\"text/javascript\">window.close();</script>");*/

                string sOnchange;
                sOnchange  = "ShowHideDivOnChkBox('";
                sOnchange += this.chkAsignarClienteVenta.ClientID + "','";
                sOnchange += this.divAsignaraClientedeVenta.ClientID + "')";
                this.chkAsignarClienteVenta.Attributes.Add("onclick", sOnchange);


                sOnchange  = "ShowHideDivOnChkBox('";
                sOnchange += this.chkAsignarCredito.ClientID + "','";
                sOnchange += this.divAsignaraCredito.ClientID + "')";
                this.chkAsignarCredito.Attributes.Add("onclick", sOnchange);

                JSUtils.AddDisableWhenClick(ref this.btnAgregar0, this);
                JSUtils.AddDisableWhenClick(ref this.btnModificar, this);
                // this.gridCreditos.DataBind();
                this.drpdlClienteVenta.DataBind();
                // CHECAMOS SI HAY QUERYS
                if (Request.QueryString["data"] != null && this.loadqueryStrings(Request.QueryString["data"].ToString()))
                {
                    // CHECAMOS SI ES PARA MODIFICAR UN CERT
                    if (this.myQueryStrings["certID"] != null && int.TryParse(this.myQueryStrings["certID"].ToString(), out certid) && certid > -1)
                    {
                        this.lblcertID.Text = certid.ToString();
                        this.cargaCert();
                        this.btnAgregar0.Visible  = false;
                        this.btnModificar.Visible = true;
                        this.lblAction.Text       = "MODIFICAR UN CERTIFICADO";
                    }
                    else
                    {
                        //CHECAMOS SI NOS PASARON UN CREDITOID
                        if (this.myQueryStrings["credID"] != null && int.TryParse(this.myQueryStrings["credID"].ToString(), out credid) && credid > -1)
                        {
                            this.lblcredID.Text                 = credid.ToString();
                            this.chkAsignarCredito.Checked      = true;
                            this.chkAsignarCredito.Enabled      = false;
                            this.drpdlCred.Enabled              = false;
                            this.chkAsignarClienteVenta.Checked = false;
                            this.chkAsignarClienteVenta.Enabled = false;
                            this.drpdlCred.SelectedValue        = this.lblcredID.Text;
                            this.lblAction.Text                 = "EL CERTIFICADO SE AGREGARÁ AL CRÉDITO FINANCIERO CON EL ID: " + credid.ToString();
                        }
                        this.btnModificar.Visible = false;
                        this.btnAgregar0.Visible  = true;
                    }
                }
            }
            this.pnlNewMov.Visible = false;
            this.divAsignaraClientedeVenta.Attributes.Add("style", this.chkAsignarClienteVenta.Checked ? "visibility: visible; display: block" : "visibility: hidden; display: none");
            this.divAsignaraCredito.Attributes.Add("style", this.chkAsignarCredito.Checked ? "visibility: visible; display: block" : "visibility: hidden; display: none");
        }