Example #1
0
        //public string Nivel { get; set; }

        public Dictionary <string, string> getEsquema()
        {
            Dictionary <string, string> dict = new Dictionary <string, string>();

            //TODO OLD string sql = "SELECT ID_ESQUEMA, ESQUEMADEPAGO FROM ESQUEMASDEPAGO WHERE CVE_SEDE = '" + CampusVPDI + "' ";
            //sql += (Periodo.Equals("")) ? "" : " AND PERIODO = '" + Periodo + "'";
            //sql += (Nivel.Equals("")) ? "" : " AND CVE_NIVEL = '" + Nivel + "'";
            string sql = "SELECT ES.ID_ESQUEMA, ES.ESQUEMADEPAGO FROM ESQUEMASDEPAGO ES INNER JOIN ESQUEMASDEPAGOFECHAS E ON(E.ID_ESQUEMA=ES.ID_ESQUEMA) WHERE CVE_SEDE = '" + CampusVPDI + "' ";

            sql += (Periodo.Equals("")) ? "" : " AND ES.PERIODO = '" + Periodo + "'";
            sql += " GROUP BY ES.ID_ESQUEMA, ES.ESQUEMADEPAGO";

            ResultSet res = db.getTable(sql);

            while (res.Next())
            {
                dict.Add(res.Get("ID_ESQUEMA"), res.Get("ESQUEMADEPAGO"));
            }
            return(dict);
        }
Example #2
0
        /// <summary>
        /// Verifica si un contexto es igual a otro aplicando las reglas de igualdad de estructura
        ///
        /// </summary>
        /// <param name="comparar">Contexto a comprar</param>
        /// <returns></returns>
        public Boolean StructureEquals(Context comparar)
        {
            if (comparar == null)
            {
                return(false);
            }
            if (this == comparar)
            {
                return(true);
            }

            if ((Entidad != null && comparar.Entidad == null) || (Entidad == null && comparar.Entidad != null))
            {
                return(false);
            }

            if ((Escenario != null && comparar.Escenario == null) || (Escenario == null && comparar.Escenario != null))
            {
                return(false);
            }

            //entidad
            if (!Entidad.Equals(comparar.Entidad))
            {
                return(false);
            }
            //Periodo
            if (!Periodo.Equals(comparar.Periodo))
            {
                return(false);
            }
            //Escenario
            if (Escenario != null && Escenario.ElementoOrigen != null && comparar.Escenario.ElementoOrigen != null &&
                !XmlUtil.EsNodoEquivalente(Escenario.ElementoOrigen, comparar.Escenario.ElementoOrigen))
            {
                return(false);
            }
            return(true);
        }