Ejemplo n.º 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);
        }
Ejemplo n.º 2
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;
        }
Ejemplo n.º 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);
        }