public static function getPrimaryValue($table, $primary_coloumns, $primaryId, $select_valuecoloumn)
 {
     $db = config::dbconfig();
     $filed = "";
     $sql = "SELECT * FROM " . $table . " where " . $primary_coloumns . "=" . $primaryId;
     $rs = mysql_query($sql) or die(mysql_error());
     while ($row = mysql_fetch_array($rs)) {
         $filed = $row[$select_valuecoloumn];
     }
     if ($filed != "") {
         $obj_retresult->type = 1;
         $obj_retresult->data = $filed;
     } else {
         $obj_retresult->type = 0;
     }
     return $obj_retresult;
 }
 public static function disablePerson_languageskill($LangSkillId)
 {
     $db = config::dbconfig();
     $obj_retresult = new returnResult();
     $sql = "UPDATE tbl_person_languageskill SET Status=0 WHERE  LangSkillId=" . $LangSkillId;
     $rs = mysql_query($sql);
     if (mysql_affected_rows() > 0) {
         $obj_retresult->type = 1;
         $obj_retresult->data = $obj_Person_languageskill;
         $obj_retresult->msg = "success";
     } else {
         $obj_retresult->type = 0;
         $obj_retresult->msg = "failed";
     }
     return $obj_retresult;
 }
 public static function disableAgriculture($AgricultureId)
 {
     $db = config::dbconfig();
     $obj_retresult = new returnResult();
     $sql = "UPDATE tbl_Agriculture SET Status=0 WHERE  AgricultureId=" . $AgricultureId;
     $rs = mysql_query($sql);
     if (mysql_affected_rows() > 0) {
         $obj_retresult->type = 1;
         $obj_retresult->data = $obj_Agriculture;
         $obj_retresult->msg = "success";
     } else {
         $obj_retresult->type = 0;
         $obj_retresult->msg = "failed";
     }
     return $obj_retresult;
 }
 public static function disableGroupmissiontype($GroupMissionTypeId)
 {
     $db = config::dbconfig();
     $obj_retresult = new returnResult();
     $sql = "UPDATE tbl_groupmissiontype SET Status=0 WHERE  GroupMissionTypeId=" . $GroupMissionTypeId;
     $rs = mysql_query($sql);
     if (mysql_affected_rows() > 0) {
         $obj_retresult->type = 1;
         $obj_retresult->data = $obj_Groupmissiontype;
         $obj_retresult->msg = "success";
     } else {
         $obj_retresult->type = 0;
         $obj_retresult->msg = "failed";
     }
     return $obj_retresult;
 }
 public static function disableVillage_trading($BusinessId)
 {
     $db = config::dbconfig();
     $obj_retresult = new returnResult();
     $sql = "UPDATE tbl_village_trading SET Status=0 WHERE  BusinessId=" . $BusinessId;
     $rs = mysql_query($sql);
     if (mysql_affected_rows() > 0) {
         $obj_retresult->type = 1;
         $obj_retresult->data = $obj_Village_trading;
         $obj_retresult->msg = "success";
     } else {
         $obj_retresult->type = 0;
         $obj_retresult->msg = "failed";
     }
     return $obj_retresult;
 }
 public static function disablePerson_vocationaltraining($VocationalTrainId)
 {
     $db = config::dbconfig();
     $obj_retresult = new returnResult();
     $sql = "UPDATE tbl_person_vocationaltraining SET Status=0 WHERE  VocationalTrainId=" . $VocationalTrainId;
     $rs = mysql_query($sql);
     if (mysql_affected_rows() > 0) {
         $obj_retresult->type = 1;
         $obj_retresult->data = $obj_Person_vocationaltraining;
         $obj_retresult->msg = "success";
     } else {
         $obj_retresult->type = 0;
         $obj_retresult->msg = "failed";
     }
     return $obj_retresult;
 }
 public static function disableFile_repository($_id)
 {
     $db = config::dbconfig();
     $obj_retresult = new returnResult();
     $sql = "UPDATE tbl_File_repository SET Status=0 WHERE  _id=" . $_id;
     $rs = mysql_query($sql);
     if (mysql_affected_rows() > 0) {
         $obj_retresult->type = 1;
         $obj_retresult->data = $obj_File_repository;
         $obj_retresult->msg = "success";
     } else {
         $obj_retresult->type = 0;
         $obj_retresult->msg = "failed";
     }
     return $obj_retresult;
 }
 public static function disableOrganization_subtype($OrganizationSubTypeId)
 {
     $db = config::dbconfig();
     $obj_retresult = new returnResult();
     $sql = "UPDATE tbl_Organization_subtype SET Status=0 WHERE  OrganizationSubTypeId=" . $OrganizationSubTypeId;
     $rs = mysql_query($sql);
     if (mysql_affected_rows() > 0) {
         $obj_retresult->type = 1;
         $obj_retresult->data = $obj_Organization_subtype;
         $obj_retresult->msg = "success";
     } else {
         $obj_retresult->type = 0;
         $obj_retresult->msg = "failed";
     }
     return $obj_retresult;
 }
 public static function getLastSessionId()
 {
     $lastID = 0;
     $db = config::dbconfig();
     $sql = "SELECT MAX(id) FROM tbl_webservicecall";
     $rs = mysql_query($sql);
     if ($row = mysql_fetch_row($rs)) {
         $lastID = is_null($row[0]) ? 0 : $row[0];
     }
     return $lastID;
 }
 public static function disableHigherstudysubjects($SubjectId)
 {
     $db = config::dbconfig();
     $obj_retresult = new returnResult();
     $sql = "UPDATE tbl_Higherstudysubjects SET Status=0 WHERE  SubjectId=" . $SubjectId;
     $rs = mysql_query($sql);
     if (mysql_affected_rows() > 0) {
         $obj_retresult->type = 1;
         $obj_retresult->data = $obj_Higherstudysubjects;
         $obj_retresult->msg = "success";
     } else {
         $obj_retresult->type = 0;
         $obj_retresult->msg = "failed";
     }
     return $obj_retresult;
 }
 public static function disableVillage_geologicalvariation($TblId)
 {
     $db = config::dbconfig();
     $obj_retresult = new returnResult();
     $sql = "UPDATE tbl_village_geologicalvariation SET Status=0 WHERE  TblId=" . $TblId;
     $rs = mysql_query($sql);
     if (mysql_affected_rows() > 0) {
         $obj_retresult->type = 1;
         $obj_retresult->data = $obj_Village_geologicalvariation;
         $obj_retresult->msg = "success";
     } else {
         $obj_retresult->type = 0;
         $obj_retresult->msg = "failed";
     }
     return $obj_retresult;
 }
 public static function disableTraditionalknowledgecategory($CategoryId)
 {
     $db = config::dbconfig();
     $obj_retresult = new returnResult();
     $sql = "UPDATE tbl_Traditionalknowledgecategory SET Status=0 WHERE  CategoryId=" . $CategoryId;
     $rs = mysql_query($sql);
     if (mysql_affected_rows() > 0) {
         $obj_retresult->type = 1;
         $obj_retresult->data = $obj_Traditionalknowledgecategory;
         $obj_retresult->msg = "success";
     } else {
         $obj_retresult->type = 0;
         $obj_retresult->msg = "failed";
     }
     return $obj_retresult;
 }
 public static function disableBusiness_product($ProductId)
 {
     $db = config::dbconfig();
     $obj_retresult = new returnResult();
     $sql = "UPDATE tbl_business_product SET Status=0 WHERE  ProductId=" . $ProductId;
     $rs = mysql_query($sql);
     if (mysql_affected_rows() > 0) {
         $obj_retresult->type = 1;
         $obj_retresult->data = $obj_Business_product;
         $obj_retresult->msg = "success";
     } else {
         $obj_retresult->type = 0;
         $obj_retresult->msg = "failed";
     }
     return $obj_retresult;
 }
 public static function disableSociety_member($MemberId)
 {
     $db = config::dbconfig();
     $obj_retresult = new returnResult();
     $sql = "UPDATE tbl_Society_member SET Status=0 WHERE  MemberId=" . $MemberId;
     $rs = mysql_query($sql);
     if (mysql_affected_rows() > 0) {
         $obj_retresult->type = 1;
         $obj_retresult->data = $obj_Society_member;
         $obj_retresult->msg = "success";
     } else {
         $obj_retresult->type = 0;
         $obj_retresult->msg = "failed";
     }
     return $obj_retresult;
 }
 public static function disablePrimarygeolayertype($PrimaryGeoLayerTypeId)
 {
     $db = config::dbconfig();
     $obj_retresult = new returnResult();
     $sql = "UPDATE tbl_Primarygeolayertype SET Status=0 WHERE  PrimaryGeoLayerTypeId=" . $PrimaryGeoLayerTypeId;
     $rs = mysql_query($sql);
     if (mysql_affected_rows() > 0) {
         $obj_retresult->type = 1;
         $obj_retresult->data = $obj_Primarygeolayertype;
         $obj_retresult->msg = "success";
     } else {
         $obj_retresult->type = 0;
         $obj_retresult->msg = "failed";
     }
     return $obj_retresult;
 }
 public static function disablePerson_workingexperiance($WorkExpId)
 {
     $db = config::dbconfig();
     $obj_retresult = new returnResult();
     $sql = "UPDATE tbl_person_workingexperiance SET Status=0 WHERE  WorkExpId=" . $WorkExpId;
     $rs = mysql_query($sql);
     if (mysql_affected_rows() > 0) {
         $obj_retresult->type = 1;
         $obj_retresult->data = $obj_Person_workingexperiance;
         $obj_retresult->msg = "success";
     } else {
         $obj_retresult->type = 0;
         $obj_retresult->msg = "failed";
     }
     return $obj_retresult;
 }