public function indexAction() { $data = Process::find("organisation_id= " . $this->organisation_id); $this->view->setVar("processes", $data); $data = ProcessScheduled::find("organisation_id= " . $this->organisation_id); $this->view->setVar("processes_scheduled", $data); }
public function saveAction($id) { $this->view->Disable(); $process_scheduled = ProcessScheduled::findFirstById($id); $process_scheduled->name = $this->request->getPost("name"); $process_scheduled->parameters = $this->request->getPost("parameters"); $process_scheduled->storage = $this->request->getPost("storage"); if (!$process_scheduled->save()) { foreach ($process_scheduled->getMessages() as $message) { $this->flash->error($message); } } }
public function DeleteProcessScheduledAction($id) { $scheduled_processes = ProcessScheduled::findFirstById($id); $responce = array(); if ($scheduled_processes->delete()) { $responce['title'] = "Success"; $responce['message'] = "The Process Was Succesfully Deleted"; } else { $responce['title'] = "Error"; $responce['message'] = "Oh No, Something Whent Wrong"; } echo json_encode($responce); }