Esempio n. 1
0
        protected void BtnProcesar_Click(object sender, EventArgs e)
        {
            try
            {
                if (DdlTipoAccion.SelectedValue == "0")
                {
                    new FuncionesDAO().FunShowJSMessage("Seleccione Tipo Acción..!", this);
                    return;
                }

                if (DdlTipoAccion.SelectedValue == "1")
                {
                    ViewState["ReporteTipo"] = "1";
                    _tiporep = 0;
                }

                if (DdlTipoAccion.SelectedValue == "2")
                {
                    ViewState["ReporteTipo"] = "2";
                    _tiporep    = 1;
                    _tipomotivo = 7;
                }

                if (DdlTipoAccion.SelectedValue == "3")
                {
                    ViewState["ReporteTipo"] = "2";
                    _tiporep    = 1;
                    _tipomotivo = 99;
                }

                _dts = new ConsultaDatosDAO().FunReporteAccionTelefono(_tiporep, int.Parse(DdlGestor.SelectedValue),
                                                                       DdlBuscar.SelectedValue, TxtCriterio.Text.Trim(), ChkPorFecha.Checked ? 1 : 0, TxtFechaIni.Text.Trim(),
                                                                       TxtFechaFin.Text.Trim(), _tipomotivo, "", "", "", 0, 0, 0, Session["Conectar"].ToString());

                if (_dts.Tables[0].Rows.Count > 0)
                {
                    ImgExportar.Visible = true;
                }

                if (_tiporep == 0)
                {
                    PnlTelefonoEli.Visible   = true;
                    GrdvTelefonoE.DataSource = _dts;
                    GrdvTelefonoE.DataBind();
                    Session["GrdvDatosE"] = _dts.Tables[0];
                }

                if (_tiporep == 1)
                {
                    PnlTelefonoMod.Visible   = true;
                    GrdvTelefonoM.DataSource = _dts;
                    GrdvTelefonoM.DataBind();
                    Session["GrdvDatosM"] = _dts.Tables[0];
                }
            }
            catch (Exception ex)
            {
                Lblerror.Text = ex.ToString();
            }
        }
Esempio n. 2
0
        private void FunCargarCombos(int opcion)
        {
            switch (opcion)
            {
            case 0:
                DdlGestor.DataSource     = new ConsultaDatosDAO().FunConsultaDatos(136, 0, 0, 0, "", "", "", Session["Conectar"].ToString());
                DdlGestor.DataTextField  = "Descripcion";
                DdlGestor.DataValueField = "Codigo";
                DdlGestor.DataBind();
                break;

            case 1:
                PnlTelefonoEli.Visible   = false;
                PnlTelefonoMod.Visible   = false;
                GrdvTelefonoE.DataSource = null;
                GrdvTelefonoE.DataBind();
                GrdvTelefonoM.DataSource = null;
                GrdvTelefonoM.DataBind();
                ImgExportar.Visible = false;
                break;
            }
        }
Esempio n. 3
0
 protected void GrdvTelefonoE_PageIndexChanging(object sender, GridViewPageEventArgs e)
 {
     GrdvTelefonoE.PageIndex = e.NewPageIndex;
     GrdvTelefonoE.DataBind();
 }