course details changes done
This commit is contained in:
parent
2440668e03
commit
2bfc38a5c1
@ -22,12 +22,12 @@ class Status_model extends CI_Model {
|
|||||||
$this->db->where('ListName', $arrayDetails['ListName']);
|
$this->db->where('ListName', $arrayDetails['ListName']);
|
||||||
if($this->db->get(PICK_LIST_DETAILS)->first_row()){
|
if($this->db->get(PICK_LIST_DETAILS)->first_row()){
|
||||||
$result['Status'] = false;
|
$result['Status'] = false;
|
||||||
$result['message'] = "This Status Name is already exist!";
|
$result['message'] = "Status name is already exist!";
|
||||||
} else {
|
} else {
|
||||||
$this->db->insert(PICK_LIST_DETAILS, $arrayDetails);
|
$this->db->insert(PICK_LIST_DETAILS, $arrayDetails);
|
||||||
if($this->db->affected_rows() == '1'){
|
if($this->db->affected_rows() == '1'){
|
||||||
$result['Status'] = true;
|
$result['Status'] = true;
|
||||||
$result['message'] = "Successfully status Name is added";
|
$result['message'] = "Successfully status name is added";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$result['Status'] = false;
|
$result['Status'] = false;
|
||||||
@ -77,25 +77,6 @@ class Status_model extends CI_Model {
|
|||||||
* */
|
* */
|
||||||
|
|
||||||
public function update($arrayDetails=null,$ListCode=null)
|
public function update($arrayDetails=null,$ListCode=null)
|
||||||
// {
|
|
||||||
// $this->db->where('ListCode',$ListCode);
|
|
||||||
// $statusDetails=$this->db->update(PICK_LIST_DETAILS, $arrayDetails);
|
|
||||||
// if($statusDetails){
|
|
||||||
|
|
||||||
// $result['Status'] = true;
|
|
||||||
// $result['message'] = "Successfully status details updated";
|
|
||||||
// }
|
|
||||||
|
|
||||||
// else {
|
|
||||||
// $result['Status'] = false;
|
|
||||||
// $result['message'] = "Something went wrong.please try again";
|
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
// return $result;
|
|
||||||
|
|
||||||
// }
|
|
||||||
{
|
{
|
||||||
$this->db->select('ListName');
|
$this->db->select('ListName');
|
||||||
|
|
||||||
@ -103,13 +84,13 @@ class Status_model extends CI_Model {
|
|||||||
$this->db->where_not_in('ListCode', $ListCode);
|
$this->db->where_not_in('ListCode', $ListCode);
|
||||||
if($this->db->get(PICK_LIST_DETAILS)->first_row()){
|
if($this->db->get(PICK_LIST_DETAILS)->first_row()){
|
||||||
$result['Status'] = false;
|
$result['Status'] = false;
|
||||||
$result['message'] = "This Status Name is already exist!";
|
$result['message'] = "Status name is already exist!";
|
||||||
} else {
|
} else {
|
||||||
$this->db->where('ListCode',$ListCode);
|
$this->db->where('ListCode',$ListCode);
|
||||||
$this->db->update(PICK_LIST_DETAILS, $arrayDetails);
|
$this->db->update(PICK_LIST_DETAILS, $arrayDetails);
|
||||||
if($this->db->affected_rows() == '1'){
|
if($this->db->affected_rows() == '1'){
|
||||||
$result['Status'] = true;
|
$result['Status'] = true;
|
||||||
$result['message'] = "Successfully status Name is updated";
|
$result['message'] = "Successfully status name is updated";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$result['Status'] = false;
|
$result['Status'] = false;
|
||||||
@ -117,8 +98,6 @@ class Status_model extends CI_Model {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
// $checkExistActivity = $this->db->get(PICK_LIST_DETAILS);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -126,9 +105,4 @@ class Status_model extends CI_Model {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user