Beispiel #1
0
 public function show($id)
 {
     $this->breadcrumb->append_crumb('Home', base_url());
     $this->breadcrumb->append_crumb('Staff Detail', base_url() . '');
     $staff = new Staff();
     $data['staff'] = $staff->where('staff_id', $id)->get();
     $family = new Family();
     $data['families'] = $family->where('staff_fam_staff_id', $data['staff']->staff_id)->get();
     $work = new Work();
     $data['works'] = $work->where('staff_id', $data['staff']->staff_id)->get();
     $education = new Education();
     $data['educations'] = $education->where('staff_id', $data['staff']->staff_id)->get();
     $medical = new Medical();
     $data['medicals'] = $medical->where('staff_id', $data['staff']->staff_id)->get();
     $asset_detail = new Asset_Detail();
     $data['asset_details'] = $asset_detail->where('staff_id', $data['staff']->staff_id)->get();
     $data['btn_back'] = anchor('staffs/', 'Back');
     $data['btn_edit'] = anchor('staffs/edit/' . $data['staff']->staff_id, 'Edit');
     $this->load->view('staffs/show', $data);
 }
Beispiel #2
0
 function delete()
 {
     $asset_detail = new Asset_Detail();
     $id = $this->detail_id;
     $asset_detail->_delete($id);
     $this->session->set_flashdata('message', 'Asset detail successfully deleted!');
     redirect('assets/' . $this->asset_id . '/details/index');
 }