public function Index() { if (Session::get("db_username") != null) { $this->ViewBag("Title", "Account"); $agentModel = new AgentModel(); $UserList = $agentModel->GetUsers(); $this->agentViewModel->agentList = $UserList; $this->ViewBag("Controller", "Booking"); $this->ViewBag("Page", "History"); return $this->View($this->agentViewModel, "Account", "Index", "Profile"); } return $this->ReDirectTo("Home", "Index"); }
private function deleteAgent($id) { $agentModel = new AgentModel(); if ($agentModel->IsFound($id, AgentModel::ID)) { $agentModel->DeleteAgent($id); } }