public ActionResult TabPanel(string staffId, string hallNo, string counterId) { var staff = StaffDao.GetEntity("STAFF_ID", staffId); var counter = CounterStateDao.GetEntity("HALL_NO", hallNo, "COUNTER_ID", counterId); ViewBag.CounterState = counter; var listCamera = hallCameraDefDao.FindList("SEQ", "HALL_NO", hallNo); var camera = listCamera.FirstOrDefault(m => m.MON_COUNTER != null && m.MON_COUNTER.Split('|').Contains(counterId)); if (camera != null) { ViewBag.CameraId = camera.SEQ; ViewBag.CameraType = camera.CAMERA_TYP; } else { ViewBag.CameraId = 0; ViewBag.CameraType = 0; } var counterStateService = new CLI_COUNTERSTATE_DAL(); ViewBag.Number = counterStateService.GetTabNumber(hallNo, counterId); return(View(staff)); }