add Employee Added
This commit is contained in:
parent
6bd8ae21b3
commit
d5e106996d
@ -80,7 +80,7 @@ class Employeedetails extends BaseController
|
|||||||
$LastName = $this->input->post('LastName');
|
$LastName = $this->input->post('LastName');
|
||||||
$FatherName = $this->input->post('FatherName');
|
$FatherName = $this->input->post('FatherName');
|
||||||
$DateofBirth = $this->input->post('DateofBirth');
|
$DateofBirth = $this->input->post('DateofBirth');
|
||||||
$ContactNumber = $this->input->post('contactnumber');
|
$ContactNumber = $this->input->post('ContactNumber');
|
||||||
$EmailId = $this->input->post('emailid');
|
$EmailId = $this->input->post('emailid');
|
||||||
$Gender = $this->input->post('gender');
|
$Gender = $this->input->post('gender');
|
||||||
$MartialStatus = $this->input->post('MartialStatus');
|
$MartialStatus = $this->input->post('MartialStatus');
|
||||||
@ -109,7 +109,13 @@ class Employeedetails extends BaseController
|
|||||||
$IsActive = '1';
|
$IsActive = '1';
|
||||||
$createdby = $this->session->userdata ( 'userId' );
|
$createdby = $this->session->userdata ( 'userId' );
|
||||||
|
|
||||||
$Employee = array('FirstName'=>$FirstName, 'LastName'=>$LastName,'FatherName'=>$FatherName,'Gender'=>$Gender,'DateofBirth'=>$DateofBirth,'ContactNumber'=>$ContactNumber,'EmailId'=>$EmailId,'BloodGroup'=>$BloodGroup,'MartialStatus'=>$MartialStatus,'DateofJoining'=>$dateofjoining,'PreviousYearsOfExp'=>$Previousexperience,'Designation'=>$desigination,'Departmentcode'=>$departmentCode,'PresentAddress'=>$CurrentAddress,'PermanentAddress'=>$permanentaddress,'EmergencyContactName'=>$emergencycontactname,'EmergencyContactNumber'=>$emergencycontactnumber,'Edu_Qualification'=>$eduqualifaction,'Additional_Qualification'=>$addqualification,'AadharNo'=>$aadharno,'PANNo'=>$panno,'BankAccountNo'=>$accountno,'IFSCCode'=>$ifsccode,'BankBranchName'=>$bankbranchname,'BankAddress'=>$bankaddress,'PassportNo'=>$passportno,'Passport_Valid_till'=>$ValidTill,'IsActive'=>$IsActive,'ProfilePic'=>$Picture,'Reference_Name'=>$referredby,'Reference_ContactNumber'=>$referrercontno,'Remarks'=>$addinfo,'CreatedBy'=>$createdby);
|
|
||||||
|
$DOB = $this->getDateformat($DateofBirth);
|
||||||
|
$DOJ = $this->getDateformat($dateofjoining);
|
||||||
|
$Valid = $this->getDateformat($ValidTill);
|
||||||
|
|
||||||
|
//echo $DOB;
|
||||||
|
$Employee = array('FirstName'=>$FirstName, 'LastName'=>$LastName,'FatherName'=>$FatherName,'Gender'=>$Gender,'DateofBirth'=>$DOB,'ContactNumber'=>$ContactNumber,'EmailId'=>$EmailId,'BloodGroup'=>$BloodGroup,'MartialStatus'=>$MartialStatus,'DateofJoining'=>$DOJ,'PreviousYearsOfExp'=>$Previousexperience,'Designation'=>$desigination,'Departmentcode'=>$departmentCode,'PresentAddress'=>$CurrentAddress,'PermanentAddress'=>$permanentaddress,'EmergencyContactName'=>$emergencycontactname,'EmergencyContactNumber'=>$emergencycontactnumber,'Edu_Qualification'=>$eduqualifaction,'Additional_Qualification'=>$addqualification,'AadharNo'=>$aadharno,'PANNo'=>$panno,'BankAccountNo'=>$accountno,'IFSCCode'=>$ifsccode,'BankBranchName'=>$bankbranchname,'BankAddress'=>$bankaddress,'PassportNo'=>$passportno,'Passport_Valid_till'=>$Valid,'IsActive'=>$IsActive,'ProfilePic'=>$Picture,'Reference_Name'=>$referredby,'Reference_ContactNumber'=>$referrercontno,'Remarks'=>$addinfo,'CreatedBy'=>$createdby);
|
||||||
|
|
||||||
$this->load->model('Employeedetails_model');
|
$this->load->model('Employeedetails_model');
|
||||||
$result = $this->Employeedetails_model->addNewemployee($Employee);
|
$result = $this->Employeedetails_model->addNewemployee($Employee);
|
||||||
@ -128,6 +134,12 @@ class Employeedetails extends BaseController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getDateformat($Val)
|
||||||
|
{
|
||||||
|
$date = new DateTime($Val);
|
||||||
|
$retDate = $date->format('Y-m-d H:i:s');
|
||||||
|
return $retDate;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function is used to load the add new Employee form with dropdown values */
|
* This function is used to load the add new Employee form with dropdown values */
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user