Esempio n. 1
0
 function edit_manufacture()
 {
     $manufacure_model = new Manufacture_model();
     $manufacure_service = new Manufacture_service();
     $manufacure_model->set_id($this->input->post('manufacture_id', TRUE));
     $manufacure_model->set_name($this->input->post('name', TRUE));
     $manufacure_model->set_updated_by($this->session->userdata('USER_ID'));
     $manufacure_model->set_updated_date(date("Y-m-d H:i:s"));
     echo $manufacure_service->update_manufacure($manufacure_model);
 }
Esempio n. 2
0
 function load_edit_vehicle_model_content()
 {
     $vehicle_model_model = new Vehicle_model_model();
     $vehicle_model_service = new Vehicle_model_service();
     $manufacure_model = new Manufacture_model();
     $manufacture_service = new Manufacture_service();
     $vehicle_model_model->set_id(trim($this->input->post('vehicle_model_id', TRUE)));
     $vehicle_model = $vehicle_model_service->get_vehicle_model_by_id($vehicle_model_model);
     $data['vehicle_model'] = $vehicle_model;
     $manufacure_model->set_id($vehicle_model->manufacturer_id);
     $manufacturer = $manufacture_service->get_manufacure_by_id($manufacure_model);
     $data['manufacturer'] = $manufacturer;
     $data['manufacturer_results'] = $manufacture_service->get_all_manufactures();
     echo $this->load->view('vehicle_model/vehicle_model_edit_pop_up', $data, TRUE);
 }