Edit employee changes added
This commit is contained in:
parent
e90b68ecef
commit
ef678474a7
@ -135,29 +135,33 @@ function addNewemployee($Employee)
|
|||||||
$this->db->select('EmpID,FirstName,LastName,DateofBirth,ContactNumber,EmailId,DateofJoining,Role,Address1,Address2,
|
$this->db->select('EmpID,FirstName,LastName,DateofBirth,ContactNumber,EmailId,DateofJoining,Role,Address1,Address2,
|
||||||
Place,City,State,Pin,DepartmentName,User_Comments,Created_date');
|
Place,City,State,Pin,DepartmentName,User_Comments,Created_date');
|
||||||
$this->db->from('T_EmpDetails');
|
$this->db->from('T_EmpDetails');
|
||||||
//$this->db->where('isDeleted', 0);
|
|
||||||
//$this->db->where('roleId !=', 1);
|
|
||||||
$this->db->where('EmpID', $EmpID);
|
$this->db->where('EmpID', $EmpID);
|
||||||
$query = $this->db->get();
|
$query = $this->db->get();
|
||||||
|
|
||||||
return $query->result();
|
return $query->result();
|
||||||
}
|
}
|
||||||
function editemployee($Emp, $EmpID)
|
function UpdateEmployee($Emp, $EmpID)
|
||||||
{
|
{
|
||||||
echo $EmpID;
|
echo $EmpID;
|
||||||
$this->db->where('EmpID', $EmpID);
|
$this->db->where('EmpID', $EmpID);
|
||||||
$this->db->update('T_EmpDetails', $Emp);
|
$this->db->update('T_Employee_Details', $Emp);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
function viewemployee($Emp, $EmpID)
|
|
||||||
|
function viewemployee( $EmpID)
|
||||||
{
|
{
|
||||||
echo $EmpID;
|
$this->db->select('Emp.*,Dep.DepartmentName as DepartmentName');
|
||||||
$this->db->where('EmpID', $EmpID);
|
$this->db->from('T_Employee_Details AS Emp');
|
||||||
$this->db->update('T_EmpDetails', $Emp);
|
$this->db->join('T_DepartmentDetails Dep', 'Emp.Departmentcode = Dep.DEPCode','left');
|
||||||
|
$this->db->where('Emp.EmpID', $EmpID);
|
||||||
|
$query = $this->db->get();
|
||||||
|
|
||||||
|
$result = $query->result();
|
||||||
|
|
||||||
return TRUE;
|
// print_r($this->db->last_query());
|
||||||
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This function to get the Employee department on respective Employee */
|
/* This function to get the Employee department on respective Employee */
|
||||||
@ -182,5 +186,18 @@ function addNewemployee($Employee)
|
|||||||
return $query->result_array();
|
return $query->result_array();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function checkPhotoExists($Pic)
|
||||||
|
{
|
||||||
|
$this->db->select('ProfilePic');
|
||||||
|
$this->db->from('T_Employee_Details');
|
||||||
|
$this->db->where($Pic);
|
||||||
|
|
||||||
|
$query = $this->db->get();
|
||||||
|
// print_r($this->db->last_query());
|
||||||
|
if ($query->num_rows > 0) {
|
||||||
|
return $query->result_array();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
Loading…
Reference in New Issue
Block a user