function updateTraditionalknowledgecategory($sessionkey, $appcode, $Traditionalknowledgecategorydata) { $main_result = "<VPROFILERESULT>"; $main_result .= "<AUTHSTATUS>0</AUTHSTATUS>"; $userId = ValidateSession($sessionkey, $appcode); if ($userId > -1) { $main_result = "<AUTHSTATUS>1</AUTHSTATUS>"; $obj_Traditionalknowledgecategory = new Traditionalknowledgecategory(); foreach ($Userdata["[UPPERTEMPLATENAME"] as $key => $child) { switch ($key) { case "CATEGORYID": $obj_Traditionalknowledgecategory->CategoryId = $child; break; case "CATEGORYNAME": $obj_Traditionalknowledgecategory->CategoryName = $child; break; case "DESCRIPTION": $obj_Traditionalknowledgecategory->Description = $child; break; } } $obj_retResult_Traditionalknowledgecategory = DAL_manageTraditionalknowledgecategory::updateTraditionalknowledgecategory($obj_Traditionalknowledgecategory); if ($obj_retResult_Traditionalknowledgecategory->type == 1) { $main_result .= "<RESULTSTATUS>1</RESULTSTATUS>"; $main_result .= getTraditionalknowledgecategoryXml($obj_retResult_Traditionalknowledgecategory->data); } else { $main_result .= "<RESULTSTATUS>0</RESULTSTATUS>"; } } $main_result .= "</VPROFILERESULT>"; return $main_result; }
public static function updateTraditionalknowledgecategory2($CategoryId, $CategoryName, $Description) { $obj_retResult = new returnResult(); $obj_newTraditionalknowledgecategory = new Traditionalknowledgecategory(); $obj_newTraditionalknowledgecategory->CategoryId = $CategoryId; $obj_newTraditionalknowledgecategory->CategoryName = $CategoryName; $obj_newTraditionalknowledgecategory->Description = $Description; $issuccess = DAL_manageTraditionalknowledgecategory::updateTraditionalknowledgecategory($obj_newTraditionalknowledgecategory); if ($issuccess) { $obj_retResult->type = 1; // $obj_retResult->data = BL_manageTraditionalknowledgecategory::getTraditionalknowledgecategoryByCategoryId($obj_newTraditionalknowledgecategory->CategoryId); $obj_retResult->msg = "Traditionalknowledgecategory updation is Success"; } else { $obj_retResult->type = 0; $obj_retResult->msg = "Traditionalknowledgecategory updation is Failed"; } return $obj_retResult; }