add and Edit screen issue fixed
This commit is contained in:
parent
642711980a
commit
fd27eb50b7
@ -125,25 +125,10 @@ function addNewemployee($Employee)
|
|||||||
return $EmpID;
|
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)
|
function UpdateEmployee($Emp, $EmpID)
|
||||||
{
|
{
|
||||||
echo $EmpID;
|
//echo $EmpID;
|
||||||
$this->db->where('EmpID', $EmpID);
|
$this->db->where('EmpID', $EmpID);
|
||||||
$this->db->update('T_Employee_Details', $Emp);
|
$this->db->update('T_Employee_Details', $Emp);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -169,19 +154,22 @@ function addNewemployee($Employee)
|
|||||||
{
|
{
|
||||||
$this->db->select('DepartmentName');
|
$this->db->select('DepartmentName');
|
||||||
$this->db->from('T_EmployeeDetails');
|
$this->db->from('T_EmployeeDetails');
|
||||||
$this->db->where('EmpID', $EmployeeID);
|
$this->db->where($EmployeeID);
|
||||||
$query = $this->db->get();
|
$query = $this->db->get();
|
||||||
return $query->result_array();
|
return $query->result_array();
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkMailExists($email)
|
function checkMailExists($email='',$Empid='')
|
||||||
{
|
{
|
||||||
$this->db->select('EmailId');
|
$this->db->select('EmailId');
|
||||||
$this->db->from('T_Employee_Details');
|
$this->db->from('T_Employee_Details');
|
||||||
$this->db->where('EmailId',$email);
|
$this->db->where('EmailId',$email);
|
||||||
|
if ($Empid != '')
|
||||||
|
{
|
||||||
|
$this->db->where('EmpID !=',$Empid);
|
||||||
|
}
|
||||||
$query = $this->db->get();
|
$query = $this->db->get();
|
||||||
|
//print_r($this->db->last_query());
|
||||||
if ($query->num_rows > 0) {
|
if ($query->num_rows > 0) {
|
||||||
return $query->result_array();
|
return $query->result_array();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user