protected void FunCargarMantenimiento()
        {
            try
            {
                if (Session["CodigoCPCE"] == null)
                {
                    new FuncionesDAO().FunShowJSMessage("No ha realizado ninguna gestión para monitorear sus resultados..!", this);
                    return;
                }

                _dts = new ConsultaDatosDAO().FunConsultaDatos(100, int.Parse(Session["usuCodigo"].ToString()), 0, 0, "",
                                                               ViewState["FechaActual"].ToString(), ViewState["FechaActual"].ToString(), Session["Conectar"].ToString());
                GrdvEfectivas.DataSource = _dts.Tables[0];
                GrdvEfectivas.DataBind();
                GrdvMaxLlamada.DataSource = _dts.Tables[1];
                GrdvMaxLlamada.DataBind();
                _dts = new ConsultaDatosDAO().FunConsultaDatos(102, int.Parse(Session["CodigoCPCE"].ToString()), 0, 0, "",
                                                               ViewState["FechaActual"].ToString(), ViewState["FechaActual"].ToString(), Session["Conectar"].ToString());
                ViewState["Efectivas"]    = _dts.Tables[0].Rows.Count;
                GrdvChallenger.DataSource = _dts.Tables[0];
                GrdvChallenger.DataBind();
            }
            catch (Exception ex)
            {
                Lblerror.Text = ex.ToString();
            }
        }
Exemple #2
0
        private void FunCargarCombos(int opcion)
        {
            switch (opcion)
            {
            case 0:
                DdlCedente.DataSource     = new CedenteDAO().FunGetCedentes();
                DdlCedente.DataTextField  = "Descripcion";
                DdlCedente.DataValueField = "Codigo";
                DdlCedente.DataBind();

                _itemc.Text  = "--Seleccione Catálago/Producto--";
                _itemc.Value = "0";
                DdlCatalogo.Items.Add(_itemc);

                _dts = new ControllerDAO().FunGetConsultasCatalogo(12, "--Seleccione Gestor--", int.Parse(DdlCedente.SelectedValue),
                                                                   0, 0, "", "", "", Session["Conectar"].ToString());
                DdlGestores.DataSource     = _dts;
                DdlGestores.DataTextField  = "Descripcion";
                DdlGestores.DataValueField = "Codigo";
                DdlGestores.DataBind();
                break;

            case 1:
                GrdvEfectivas.DataSource = null;
                GrdvEfectivas.DataBind();
                GrdvMaxLlamada.DataSource = null;
                GrdvMaxLlamada.DataBind();
                GrdvLogueos.DataSource = null;
                GrdvLogueos.DataBind();

                ImgExportar.Visible  = false;
                LblExportar.Visible  = false;
                ImgExportar1.Visible = false;
                LblExportar1.Visible = false;
                ImgExportar2.Visible = false;
                LblExportar2.Visible = false;

                _dts = new ControllerDAO().FunGetConsultasCatalogo(12, "--Seleccione Gestor--", int.Parse(DdlCedente.SelectedValue), 0, 0, "", "", "", Session["Conectar"].ToString());
                DdlGestores.DataSource     = _dts;
                DdlGestores.DataTextField  = "Descripcion";
                DdlGestores.DataValueField = "Codigo";
                DdlGestores.DataBind();
                break;

            case 2:
                GrdvEfectivas.DataSource = null;
                GrdvEfectivas.DataBind();
                GrdvMaxLlamada.DataSource = null;
                GrdvMaxLlamada.DataBind();
                GrdvLogueos.DataSource = null;
                GrdvLogueos.DataBind();

                ImgExportar.Visible  = false;
                LblExportar.Visible  = false;
                ImgExportar1.Visible = false;
                LblExportar1.Visible = false;
                ImgExportar2.Visible = false;
                LblExportar2.Visible = false;
                break;
            }
        }
Exemple #3
0
        protected void BtnProcesar_Click(object sender, EventArgs e)
        {
            try
            {
                if (DdlCedente.SelectedValue == "0")
                {
                    new FuncionesDAO().FunShowJSMessage("Seleccione Cedente..!", this);
                    return;
                }

                if (DdlCatalogo.SelectedValue == "0")
                {
                    new FuncionesDAO().FunShowJSMessage("Seleccione Catálogo..!", this);
                    return;
                }

                if (DdlGestores.SelectedValue == "0")
                {
                    new FuncionesDAO().FunShowJSMessage("Seleccione Gestor..!", this);
                    return;
                }

                if (!new FuncionesDAO().IsDate(TxtFechaInicio.Text))
                {
                    new FuncionesDAO().FunShowJSMessage("No es una fecha válida..!", this);
                    return;
                }

                if (!new FuncionesDAO().IsDate(TxtFechaFin.Text))
                {
                    new FuncionesDAO().FunShowJSMessage("No es una fecha válida..!", this);
                    return;
                }

                if (DateTime.ParseExact(TxtFechaInicio.Text, "MM/dd/yyyy", CultureInfo.InvariantCulture) >
                    DateTime.ParseExact(TxtFechaFin.Text, "MM/dd/yyyy", CultureInfo.InvariantCulture))
                {
                    new FuncionesDAO().FunShowJSMessage("La Fecha de Inicio no puede ser mayor a la Fecha de Fin..!", this);
                    return;
                }

                _dts = new ConsultaDatosDAO().FunConsultaDatos(99, int.Parse(DdlGestores.SelectedValue), 0, 0, "",
                                                               TxtFechaInicio.Text, TxtFechaFin.Text, Session["Conectar"].ToString());

                GrdvLogueos.DataSource = _dts;
                GrdvLogueos.DataBind();
                ViewState["GrdvLogueo"] = _dts.Tables[0];

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

                _dts = new ConsultaDatosDAO().FunConsultaDatos(100, int.Parse(DdlGestores.SelectedValue), 0, 0, "",
                                                               TxtFechaInicio.Text, TxtFechaFin.Text, Session["Conectar"].ToString());

                GrdvEfectivas.DataSource = _dts.Tables[0];
                GrdvEfectivas.DataBind();
                ViewState["GrdvEfectivas"] = _dts.Tables[0];

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

                GrdvMaxLlamada.DataSource = _dts.Tables[1];
                GrdvMaxLlamada.DataBind();

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

                ViewState["GrdvMaximo"] = _dts.Tables[1];
            }
            catch (Exception ex)
            {
                Lblerror.Text = ex.ToString();
            }
        }