Exemple #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            vReport = new ReportDfp();
            vGapi   = new DfpApi();
            //vReport.Report();
            String vCompany = Convert.ToString(Session["companyId"]);

            LitTitle.Text = "Información General de Campañas";
            //TotalOrdenes("59769708");
            if (vCompany != "")
            {
                TotalOrdenes(vCompany, out vOrderId);
            }
            if (!IsPostBack)
            {
                getChartData(vOrderId, "7");
            }

            //ReadXml();

            /*if (vOrderId > 0)
             * {
             *  getChartData(vOrderId);
             * }
             * else
             * {
             *  TopInfo.Visible = false;
             *  GraficoInfo.Visible = false;
             * }*/
        }
Exemple #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            user       = new DfpUser();
            vGapi      = new DfpApi();
            vBaseDatos = new db();
            vReport    = new ReportDfp();
            try
            {
                LbError.Text = "";
                if (!Convert.ToBoolean(Session["autenticado"]))
                {
                    Response.Redirect("Login.aspx");
                }
                divCompanyId.Visible = false;

                String vCompany   = Convert.ToString(Session["companyId"]);
                string vLista     = "";
                string vListUsers = "";
                string vEstado    = "";
                string vListaCamp = "";

                string    vJsonData = vGapi.GetOrder(vCompany);
                DataTable dt        = (DataTable)JsonConvert.DeserializeObject(vJsonData, (typeof(DataTable)));
                if (dt.Rows.Count > 0)
                {
                    vLista     = "<option selected>Seleccione una opción</option>";
                    vListaCamp = "<option selected>Seleccione una opción</option>";
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        vLista += "<option value='" + dt.Rows[i][2].ToString() + "'>" + dt.Rows[i][3].ToString() + "</option>";
                    }
                    LitLineaAnuncios.Text = vLista;


                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        if (i != 0)
                        {
                            if (dt.Rows[i][1].ToString() != dt.Rows[i - 1][1].ToString())
                            {
                                vListaCamp += "<option value='" + dt.Rows[i][0].ToString() + "'>" + dt.Rows[i][1].ToString() + "</option>";
                            }
                        }
                        else
                        {
                            vListaCamp += "<option value='" + dt.Rows[i][0].ToString() + "'>" + dt.Rows[i][1].ToString() + "</option>";
                        }
                    }
                    //LitCamp.Text = vListaCamp;
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
Exemple #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         if (!Convert.ToBoolean(Session["autenticado"]))
         {
             Response.Redirect("Login.aspx");
         }
         vReport = new ReportDfp();
         vGapi   = new DfpApi();
         String vCompany     = Convert.ToString(Session["companyId"]);
         String vCompanyName = Convert.ToString(Session["companyName"]);
         String vIdValue     = Request.QueryString["id"];
         long   vOrderID     = Convert.ToInt64(vIdValue);
         //HideDivCompany.InnerText = vCompany;
         HideDivFiltro.InnerText = vIdValue;
         if (vCompany != "")
         {
             OrdenTotales(vCompany, vOrderID);
         }
         if (vOrderID > 0)
         {
             if (!IsPostBack)
             {
                 getChartData(vOrderID, "7");
             }
         }
         else
         {
             GraficoInfo.Visible      = false;
             TopInfo.Visible          = false;
             OrderDetalleInfo.Visible = false;
             Response.Redirect("Default.aspx");
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemple #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!Convert.ToBoolean(Session["autenticado"]))
                {
                    Response.Redirect("Login.aspx");
                }
                vReport = new ReportDfp();
                vGapi   = new DfpApi();
                String vCompany     = Convert.ToString(Session["companyId"]);
                String vCompanyName = Convert.ToString(Session["companyName"]);
                String vIdValue     = Request.QueryString["id"];
                //HideDivCompany.InnerText = vCompany;
                HideDivFiltro.InnerText = vIdValue;
                switch (vIdValue)
                {
                case "1":
                    LitTitle.Text = "Todas las Campañas " + vCompanyName;
                    OrdenTotales(vCompany, out vOrderId);
                    if (vOrderId > 0)
                    {
                        if (!IsPostBack)
                        {
                            getChartData(vOrderId, "7");
                        }
                    }
                    break;

                case "2":
                    LitTitle.Text = "Campañas Ejecutándose " + vCompanyName;
                    TotalOrdenes(vCompany, vIdValue, out vOrderId);
                    if (vOrderId > 0)
                    {
                        if (!IsPostBack)
                        {
                            getChartData(vOrderId, "7");
                        }
                    }
                    break;

                case "3":
                    LitTitle.Text = "Campañas Completadas " + vCompanyName;
                    TotalOrdenes(vCompany, vIdValue, out vOrderId);
                    if (vOrderId > 0)
                    {
                        if (!IsPostBack)
                        {
                            getChartData(vOrderId, "7");
                        }
                    }
                    break;

                case "4":
                    LitTitle.Text = "Campañas Inactivas " + vCompanyName;
                    TotalOrdenes(vCompany, vIdValue, out vOrderId);
                    if (vOrderId > 0)
                    {
                        if (!IsPostBack)
                        {
                            getChartData(vOrderId, "7");
                        }
                    }
                    break;

                case "5":
                    LitTitle.Text = "Campañas Archivadas " + vCompanyName;
                    TotalOrdenes(vCompany, vIdValue, out vOrderId);
                    if (vOrderId > 0)
                    {
                        if (!IsPostBack)
                        {
                            getChartData(vOrderId, "7");
                        }
                    }
                    break;

                case "6":
                    LitTitle.Text = "Campañas Pausadas " + vCompanyName;
                    TotalOrdenes(vCompany, vIdValue, out vOrderId);
                    if (vOrderId > 0)
                    {
                        if (!IsPostBack)
                        {
                            getChartData(vOrderId, "7");
                        }
                    }
                    break;

                default:
                {
                    Response.Redirect("Default.aspx");
                    break;
                }
                }
            }
            catch (Exception)
            {
                throw;
            }
        }