Esempio n. 1
0
        public bool Match(HttpContextBase httpContext, Route route, string parameterName, RouteValueDictionary values, RouteDirection routeDirection)
        {
            BontanaContext db = new BontanaContext();

            if (values[parameterName] != null)
            {
                var tag = values[parameterName].ToString();
                return(db.TblGroupProduct.Any(p => p.Tag == tag));
            }
            return(false);
        }
Esempio n. 2
0
        public static bool  CheckQuyen(int Module, int Role, int IdUser)
        {
            BontanaContext db        = new BontanaContext();
            var            listRight = db.TblRight.Where(p => p.IdUser == IdUser && p.IdModule == Module && p.Role == Role).ToList();

            if (listRight.Count > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }