Beispiel #1
0
        public NonSensitiveDepartment GetAuthorisedDepartment()
        {
            department dept = _db.departments.SingleOrDefault(d => d.code == HttpContext.Current.User.Identity.Name);

            NonSensitiveDepartment nsDept = new NonSensitiveDepartment(dept.code, dept.name);

            return(nsDept);
        }
        public NonSensitiveDepartment GetAuthorisedDepartment()
        {
            department dept = _db.departments.SingleOrDefault(d => d.code == HttpContext.Current.User.Identity.Name);

            NonSensitiveDepartment nsDept = new NonSensitiveDepartment(dept.code, dept.name);

            return nsDept;
        }
Beispiel #3
0
        public IEnumerable <module> GetDepartmentModules()
        {
            NonSensitiveDepartment nsDept = GetAuthorisedDepartment();

            var moduleList =
                from mods in _db.modules
                where mods.deptCode == nsDept.code
                select mods;


            return(moduleList);
        }