add and Edit screen issue fixed

This commit is contained in:
gandhimathi Bharathirajan 2017-04-09 16:16:47 +05:30
parent 642711980a
commit fd27eb50b7

View File

@ -125,25 +125,10 @@ function addNewemployee($Employee)
return $EmpID;
}
/**
* This function used to get user information by id
* @param number $userId : This is user id
* @return array $result : This is user information
*/
function getuserInfo($EmpID)
{
$this->db->select('EmpID,FirstName,LastName,DateofBirth,ContactNumber,EmailId,DateofJoining,Role,Address1,Address2,
Place,City,State,Pin,DepartmentName,User_Comments,Created_date');
$this->db->from('T_EmpDetails');
$this->db->where('EmpID', $EmpID);
$query = $this->db->get();
return $query->result();
}
function UpdateEmployee($Emp, $EmpID)
{
echo $EmpID;
//echo $EmpID;
$this->db->where('EmpID', $EmpID);
$this->db->update('T_Employee_Details', $Emp);
return TRUE;
@ -169,19 +154,22 @@ function addNewemployee($Employee)
{
$this->db->select('DepartmentName');
$this->db->from('T_EmployeeDetails');
$this->db->where('EmpID', $EmployeeID);
$this->db->where($EmployeeID);
$query = $this->db->get();
return $query->result_array();
}
function checkMailExists($email)
function checkMailExists($email='',$Empid='')
{
$this->db->select('EmailId');
$this->db->from('T_Employee_Details');
$this->db->where('EmailId',$email);
if ($Empid != '')
{
$this->db->where('EmpID !=',$Empid);
}
$query = $this->db->get();
//print_r($this->db->last_query());
if ($query->num_rows > 0) {
return $query->result_array();
}