Exemplo n.º 1
0
        public ActionResult ViewDB(string DbContext)
        {
            try
            {
                if (!Authen.Certification(Session["UserClass"].ToString(), Authen.UserClass.Admin))
                {
                    return(RedirectToAction("PermitionEr", "Error"));
                }
                HomeworkDBContext       homeworkDB       = new HomeworkDBContext();
                CommentDBContext        commentDB        = new CommentDBContext();
                UserDBContext           userDB           = new UserDBContext();
                CategoryDBContext       categoryDB       = new CategoryDBContext();
                UserCategoriesDBcontext userCategoriesDB = new UserCategoriesDBcontext();
                NoteCatDBContext        noteCatDB        = new NoteCatDBContext();
                ClassNotiDBcontext      classNotiDB      = new ClassNotiDBcontext();



                return(View());
            }
            catch
            {
                return(RedirectToAction("LoginEr", "Error"));
            }
        }
Exemplo n.º 2
0
 public GetHomeworks(HomeworkDBContext homeworkDB, UserDBContext userDB, NoteCatDBContext noteCatDB,
                     SelectedCategoriesDBcontext userCatDB, NoteClassDBContext noteClassDB, string id)
 {
     this.homeworkDB  = homeworkDB;
     this.userDB      = userDB;
     this.userCatDB   = userCatDB;
     this.noteCatDB   = noteCatDB;
     this.noteClassDB = noteClassDB;
     user             = userDB.Users.First(e => e.UserId == id);
 }
Exemplo n.º 3
0
 public HomeworkController(HomeworkDBContext context, UserDBContext userDB, NoteCatDBContext noteCatDB,
                           SelectedCategoriesDBcontext userCatDB, NoteClassDBContext noteClassDB, CommentDBContext commentDB)
 {
     _context         = context;
     this.userDB      = userDB;
     this.userCatDB   = userCatDB;
     this.noteCatDB   = noteCatDB;
     this.noteClassDB = noteClassDB;
     this.commentDB   = commentDB;
 }
Exemplo n.º 4
0
 public MasterDAO(HomeworkDBContext context)
 {
     _context = context;
 }