public BaseController() { UserService = new UserService(db); InboxService = new InboxService(db); ArticleService = new ArticleService(db); UserRoleService = new UserRoleService(db); UploadFileService = new UploadFileService(db); LeaveProcessService = new LeaveProcessService(db); ProjectProcessService = new ProjectProcessService(db); CheckInService = new CheckInService(db); var user = UserService.GetUserByCookie(); ViewBag.IsLogin = user != null; ViewBag.User = user; }