public static bool EventMatcher(Event e, String type, String userclass)
        {
            AccountGroupParserController agp = new AccountGroupParserController();

            agp.accountGroup = e.Account_Group;
            agp.init();
            return(agp.exists(type, userclass));
        }
        // GET: ParticalEvents
        public ActionResult Index()
        {
            Pupil pupile = PersonAccount.GetPupilFromAccountId();

            Thread.CurrentThread.CurrentCulture = new CultureInfo("pl-PL");
            String type = PersonAccount.getInstance().AuthenticationType;

            return(PartialView(db.Event.ToList().Where(a => AccountGroupParserController.EventMatcher(a, type, pupile.Class_Number)).ToList()));
        }
        public ActionResult Events()
        {
            String type = PersonAccount.getInstance().AuthenticationType;

            return(View(db.Event.ToList().Where(a => AccountGroupParserController.EventMatcher(a, type, pupile.Class_Number)).ToList()));
        }