<?php
 require "../commonincludefiles.php";

$designation_name 	= Escape($_REQUEST['designation_name']);
$designation_id	  = Escape($_REQUEST['designation_id']);
 
 if($designation_name !="" ) 
 {
	
	$condition="";
	
	if($designation_name != ""){
		$condition .= " and designation_name='$designation_name'";
	}
	if($designation_id!='0'){
		$condition .="and designation_id!='$designation_id'";
	}

	$objDesignationMgmt = new DesignationMgmt();
	$out = $objDesignationMgmt ->getAllRecords(0,0,$condition,"","");
	$count=dbRows($out);	
	if($count > 0){ echo "{success:'false'}" ; }
    else { echo "{success:'true'}";}
 }
 /*else
 {
     echo "{success:'true'}";
 }*/
?>