Beispiel #1
0
        protected void ddlTipo04Q_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (ddlTipo04Q.SelectedValue == "lst" || ddlTipo04Q.SelectedValue == "lchk")
            {
                BLCatalogos objCat = new BLCatalogos();

                pnlCat04Q.Visible = true;

                if (ddlTipo04Q.SelectedValue == "lst")
                {
                    objCat.ListaCatalogos(ref ddlCat04Q, ddlCnx.SelectedValue, (int)DatosGenerales.EstiloReportesDinamicos.eDropDownList);
                }
                else
                {
                    objCat.ListaCatalogos(ref ddlCat04Q, ddlCnx.SelectedValue, (int)DatosGenerales.EstiloReportesDinamicos.eCheckBoxList);
                }

                if (ddlCat04Q.Items.Count > 0)
                {
                    ddlCat04Q.SelectedIndex = 0;
                }
            }
            else
            {
                pnlCat04Q.Visible = false;
            }
        }
Beispiel #2
0
        protected void grdParamsQ_RowSelected(object sender, EventArgs e)
        {
            if (grdParamsQ.SelectedIndex != -1)
            {
                Label    lbl  = (Label)grdParamsQ.SelectedRow.FindControl("lblBAprox");
                CheckBox chkO = (CheckBox)grdParamsQ.SelectedRow.FindControl("chkObligatorio");
                Label    lblE = (Label)grdParamsQ.SelectedRow.FindControl("lblEntrada");
                Label    lblN = (Label)grdParamsQ.SelectedRow.FindControl("lblNull");
                Label    lblC = (Label)grdParamsQ.SelectedRow.FindControl("lblCat");
                Label    lblD = (Label)grdParamsQ.SelectedRow.FindControl("lblDesc");

                pnlTipo04Q.Visible = true;
                pnlCat04Q.Visible  = false;

                ddlTipo04Q.SelectedIndex = 0;
                chkAprox04Q.Checked      = false;
                chkNull04Q.Checked       = false;
                txtLongitud04Q.Text      = "";

                if (lblN.Text == "Si" && !chkO.Checked)
                {
                    chkNull04Q.Checked = true;
                }
                else
                {
                    chkNull04Q.Checked = false;
                }

                if (lbl.Text != "N/A")
                {
                    pnlAprox04Q.Visible = true;
                }
                else
                {
                    pnlAprox04Q.Visible = false;
                }

                if (lbl.Text == "Si")
                {
                    chkAprox04Q.Checked = true;
                }
                else
                {
                    chkAprox04Q.Checked = false;
                }

                if (chkO.Checked)
                {
                    pnlNull04Q.Visible = false;
                }
                else
                {
                    pnlNull04Q.Visible = true;
                }

                txtLongitud04Q.Text = grdParamsQ.SelectedRow.Cells[CeldaLongitud].Text;
                txtCampoDescQ.Text  = lblD.Text;

                if (!string.IsNullOrWhiteSpace(lblE.Text))
                {
                    ddlTipo04Q.SelectedValue = lblE.Text;
                }

                if (!string.IsNullOrWhiteSpace(grdParamsQ.SelectedRow.Cells[CeldaTipoDato].Text) && grdParamsQ.SelectedRow.Cells[CeldaTipoDato].Text != " ")
                {
                    ddlTipoDatoQ.SelectedValue = grdParamsQ.SelectedRow.Cells[CeldaTipoDato].Text;
                }
                else
                {
                    ddlTipoDatoQ.SelectedIndex = 0;
                }

                if (ddlTipo04Q.SelectedValue == "lst" || ddlTipo04Q.SelectedValue == "lchk")
                {
                    BLCatalogos objCat = new BLCatalogos();

                    pnlCat04Q.Visible = true;

                    if (ddlTipo04Q.SelectedValue == "lst")
                    {
                        objCat.ListaCatalogos(ref ddlCat04Q, ddlCnx.SelectedValue, (int)DatosGenerales.EstiloReportesDinamicos.eDropDownList);
                    }
                    else
                    {
                        objCat.ListaCatalogos(ref ddlCat04Q, ddlCnx.SelectedValue, (int)DatosGenerales.EstiloReportesDinamicos.eCheckBoxList);
                    }

                    if (ddlCat04Q.Items.Count > 0 && lblC.Text != "0")
                    {
                        ddlCat04Q.SelectedValue = lblC.Text;
                    }
                }
                else
                {
                    pnlCat04Q.Visible = false;
                }

                ValidarTD();
            }
        }