Exemple #1
0
        /// <summary>Retorna todas as roles da BD</summ<ry>
        public override string[] getAllSectionsRolesFromDB(int section_id)
        {
            //string query = "select roles_roleName from SectionRoles inner join Roles on sectionRoles_role_id = IDRoles where sectionroles_section_id  = " + section_id;

            //DataSet roles = MySqlUtility.getQuery(query);
            DataSet roles = MySqlUtility.getAll("Roles");

            int results = roles.Tables[0].Rows.Count;

            string[] rolesArray = new string[results];

            for (int i = 0; i < results; ++i)
            {
                DataRow row = roles.Tables[0].Rows[i];
                rolesArray[i] = (string)row["roles_roleName"];
            }

            return(rolesArray);
        }
        /// <summary>
        /// carrega todas as excepes ocorridas para um array de excepes
        /// </summary>
        /// <returns></returns>
        public override ExceptionInfo[] load()
        {
            DataSet dataset = MySqlUtility.getAll("Exceptions", "ORDER BY Id DESC LIMIT 0, 30");

            int i = 0, count = dataset.Tables[0].Rows.Count;

            ExceptionInfo[] exceptions = new ExceptionInfo[count];

            foreach (DataRow row in dataset.Tables[0].Rows)
            {
                _exception      = row;
                exceptions[i++] = new ExceptionInfo(
                    (int)getField("id"),
                    (string)getField("Name"),
                    (DateTime)getField("Date"),
                    (string)getField("Message"),
                    (string)getField("StackTrace")
                    );
            }

            return(exceptions);
        }
        public override ArrayList GetAll()
        {
            DataSet alliances = MySqlUtility.getAll("Alliance");

            return(FromDataSet(alliances));
        }
Exemple #4
0
 /// <summary>
 /// Carrega as seces existentes para uma base de dados
 /// </summary>
 /// <returns>um objecto do tipo SectionCollection com todas as collections</returns>
 public override UtilityCollection getAllSectionsFromDB()
 {
     return(storeSections(MySqlUtility.getAll("Sections")));
 }
Exemple #5
0
        /// <summary>
        /// retorna a informao das namedPages da Base de Dados
        /// </summary>
        /// <returns>collection com as namedPages</returns>
        public override UtilityCollection getAllNamedPagesFromDB()
        {
            DataSet result = MySqlUtility.getAll("NamedPage");

            return(storeNamedPages(result));
        }