public static function addPerson_property2($PropertyId, $PropertyName, $PropertyType, $AssessValue, $Description) { $obj_retResult = new returnResult(); $obj_newPerson_property = new Person_property(); $obj_newuser->setPerson_property($PropertyId, $PropertyName, $PropertyType, $AssessValue, $Description); // $isExist = BL_managePerson_property::isExist($obj_newPerson_property->id); if (!$isExist) { $obj_retResult_Person_property = DAL_managePerson_property::addPerson_property($obj_newPerson_property); if ($obj_retResult_Person_property->type == 1) { $obj_retResult->type = 1; $obj_retResult->msg = "Success"; $obj_retResult->data = $obj_retResult_Person_property->data; } else { $obj_retResult->type = 0; $obj_retResult->msg = "Failed"; } } else { $obj_retResult->type = 0; $obj_retResult->msg = "Sorry! Person_property already exist"; } return $obj_retResult; }
function addPerson_property($sessionkey, $appcode, $Person_propertydata) { $main_result = "<VPROFILERESULT>"; $main_result .= "<AUTHSTATUS>0</AUTHSTATUS>"; $userId = ValidateSession($sessionkey, $appcode); if ($userId > -1) { $main_result = "<AUTHSTATUS>1</AUTHSTATUS>"; $obj_Person_property = new Person_property(); foreach ($Userdata["[UPPERTEMPLATENAME"] as $key => $child) { switch ($key) { case "PROPERTYID": $obj_Person_property->PropertyId = $child; break; case "PROPERTYNAME": $obj_Person_property->PropertyName = $child; break; case "PROPERTYTYPE": $obj_Person_property->PropertyType = $child; break; case "ASSESSVALUE": $obj_Person_property->AssessValue = $child; break; case "DESCRIPTION": $obj_Person_property->Description = $child; break; } } $obj_retResult_Person_property = DAL_managePerson_property::addPerson_property($obj_Person_property); if ($obj_retResult_Person_property->type == 1) { $main_result .= "<RESULTSTATUS>1</RESULTSTATUS>"; $main_result .= getPerson_propertyXml($obj_retResult_Person_property->data); } else { $main_result .= "<RESULTSTATUS>0</RESULTSTATUS>"; } } $main_result .= "</VPROFILERESULT>"; return $main_result; }