protected void getMenu(System.Web.UI.HtmlControls.HtmlGenericControl oHtmControl, string pCodUser, string oOrdConsulta, bool iReport, bool wIcons)
        {
            DBConn oConn = new DBConn();

            if (oConn.Open())
            {
                cReportes oReportes = new cReportes(ref oConn);
                oReportes.CodUser     = pCodUser;
                oReportes.OrdConsulta = oOrdConsulta;
                DataTable dtQuery = oReportes.GetMenu();
                if (dtQuery != null)
                {
                    if (dtQuery.Rows.Count > 0)
                    {
                        foreach (DataRow oRow in dtQuery.Rows)
                        {
                            string sControls = "<a href=\"" + ((iReport) ? "../reporting/" : string.Empty) + oRow["url_consulta_new"].ToString() + "\">";
                            if (wIcons)
                            {
                                sControls = sControls + "<i class='fas fa-th-list'></i> ";
                            }
                            sControls = sControls + oRow["nom_consulta"].ToString() + "</a>";

                            oHtmControl.Controls.Add(new LiteralControl(sControls));
                        }
                    }
                }
                dtQuery = null;
            }
            oConn.Close();
        }
示例#2
0
        protected void getAnalizandoClientesDiaADia()
        {
            string sUrl = string.Empty;

            DBConn oConn = new DBConn();

            if (oConn.Open())
            {
                cReportes oReportes = new cReportes(ref oConn);
                oReportes.CodUser     = oIsUsuario.CodUsuario;
                oReportes.CodConsulta = "10, 2, 4";
                DataTable dtQuery = oReportes.GetMenu();
                if (dtQuery != null)
                {
                    if (dtQuery.Rows.Count > 0)
                    {
                        foreach (DataRow oRow in dtQuery.Rows)
                        {
                            StringBuilder sHtml = new StringBuilder();
                            sUrl = "../reporting/" + oRow["url_consulta_new"].ToString();

                            sHtml.Append("<div class='mostrequest blq-teal-accent-2'>");

                            sHtml.Append("<a href='");
                            sHtml.Append(sUrl);
                            sHtml.Append("'>");

                            sHtml.Append("<div class='tt-blq-fx'>");
                            sHtml.Append(oRow["nom_consulta"].ToString().ToUpper());
                            sHtml.Append("</div>");

                            sHtml.Append("<div class='btm-blq-getin'>");
                            sHtml.Append("<i class='fas fa-sign-in-alt'></i>");
                            sHtml.Append("</div>");

                            sHtml.Append("</a>");

                            sHtml.Append("</div>");

                            AnalizandoClientesDiaADia.Controls.Add(new LiteralControl(sHtml.ToString()));
                        }
                    }
                }
                dtQuery = null;
            }
            oConn.Close();
        }
        protected void getMenu(System.Web.UI.HtmlControls.HtmlGenericControl oHtmControl, string pCodUser, string oOrdConsulta)
        {
            DBConn oConn = new DBConn();

            if (oConn.Open())
            {
                cReportes oReportes = new cReportes(ref oConn);
                oReportes.CodUser     = pCodUser;
                oReportes.OrdConsulta = oOrdConsulta;
                DataTable dtQuery = oReportes.GetMenu();
                if (dtQuery != null)
                {
                    if (dtQuery.Rows.Count > 0)
                    {
                        foreach (DataRow oRow in dtQuery.Rows)
                        {
                            oHtmControl.Controls.Add(new LiteralControl("<li><a href=\"../reporting/" + oRow["url_consulta_new"].ToString() + "\">" + oRow["nom_consulta"].ToString() + "</a></li>"));
                        }
                    }
                }
                dtQuery = null;
            }
            oConn.Close();
        }
示例#4
0
        protected void getVisionDeCompania()
        {
            string sUrl = string.Empty;

            string[] sCss = { "blq-orange", "blq-teal-accent-2" };
            int      index;

            DBConn oConn = new DBConn();

            if (oConn.Open())
            {
                cReportes oReportes = new cReportes(ref oConn);
                oReportes.CodUser     = oIsUsuario.CodUsuario;
                oReportes.CodConsulta = "13, 10, 1";
                DataTable dtQuery = oReportes.GetMenu();
                if (dtQuery != null)
                {
                    if (dtQuery.Rows.Count > 0)
                    {
                        int iCant = 1;
                        foreach (DataRow oRow in dtQuery.Rows)
                        {
                            StringBuilder sHtml = new StringBuilder();
                            sUrl = "../reporting/" + oRow["url_consulta_new"].ToString();

                            //sHtml.Append("<div class='mostrequest blq-orange'>");
                            if (iCant < 11)
                            {
                                index = 0;
                            }
                            else
                            {
                                index = 1;
                            }

                            sHtml.Append("<div class='mostrequest ");
                            sHtml.Append(sCss[index].ToString());
                            sHtml.Append("'>");

                            sHtml.Append("<a href='");
                            sHtml.Append(sUrl);
                            sHtml.Append("'>");

                            sHtml.Append("<div class='tt-blq-fx'>");
                            sHtml.Append(oRow["nom_consulta"].ToString().ToUpper());
                            sHtml.Append("</div>");

                            sHtml.Append("<div class='btm-blq-getin'>");
                            sHtml.Append("<i class='fas fa-sign-in-alt'></i>");
                            sHtml.Append("</div>");

                            sHtml.Append("</a>");

                            sHtml.Append("</div>");

                            VisionDeCompañía.Controls.Add(new LiteralControl(sHtml.ToString()));
                            iCant++;
                        }
                    }
                }
                dtQuery = null;
            }
            oConn.Close();
        }