Пример #1
0
        private List <Roles> GetRoles(SqlInstance instance)
        {
            List <Roles> result = new List <Roles>();
            string       query  = @"SELECT * FROM [KB].[dbo].[Roles]";
            DataTable    dt     = SqlInstance.GetSqlDataTable(query, this.Sql);

            try {
                result = dt.ToList <Roles>();
            }
            catch (Exception e) {
                Console.WriteLine(e);
                throw;
            }
            return(result);
        }
Пример #2
0
        private List <KBMenu> GetMenus(SqlInstance instance)
        {
            List <KBMenu> result = new List <KBMenu>();
            string        query  = @"SELECT * FROM [KB].[dbo].[Menu] where IdMenuType = 4";
            DataTable     dt     = SqlInstance.GetSqlDataTable(query, this.Sql);

            try {
                result = dt.ToList <KBMenu>();
            }
            catch (Exception e) {
                Console.WriteLine(e);
                throw;
            }

            return(result);
        }