Ejemplo n.º 1
0
        //allow inheriting class to get current school when dbcontext is class passed
        public virtual Tuple<int,int> getUserCurrentSchool(OsisContext db)
        {
            string username = getCurrentUserName();
            //Get logged in users school and academic year preference
            var userprefer = db.UserPreferences.AsNoTracking().Where(a => a.UserName == username).Select(x => new { x.SchoolRefID ,x.AcademicYearRefID}).FirstOrDefault();

            Tuple<int, int> loggedinuserpreference = new Tuple<int, int>(userprefer.SchoolRefID, userprefer.AcademicYearRefID);

            return loggedinuserpreference;
        }
Ejemplo n.º 2
0
 //get current school and current academic year from common service base class
 //this method is used get current school and academic year from controller
 public override Tuple<int,int> getUserCurrentSchool(OsisContext db)
 {
     return base.getUserCurrentSchool(db);
 }
Ejemplo n.º 3
0
 //get current school and current academic year from common service base class
 //this method is used get current school and academic year from controller
 public override Tuple<int, int> getUserCurrentSchool(OsisContext db,string user=null)
 {
     return base.getUserCurrentSchool(db,user);
 }