function updatePerson_telephone($sessionkey, $appcode, $Person_telephonedata)
{
    $main_result = "<VPROFILERESULT>";
    $main_result .= "<AUTHSTATUS>0</AUTHSTATUS>";
    $userId = ValidateSession($sessionkey, $appcode);
    if ($userId > -1) {
        $main_result = "<AUTHSTATUS>1</AUTHSTATUS>";
        $obj_Person_telephone = new Person_telephone();
        foreach ($Userdata["[UPPERTEMPLATENAME"] as $key => $child) {
            switch ($key) {
                case "PHONEID":
                    $obj_Person_telephone->PhoneId = $child;
                    break;
                case "PHONENUMBER":
                    $obj_Person_telephone->PhoneNumber = $child;
                    break;
                case "TYPE":
                    $obj_Person_telephone->Type = $child;
                    break;
                case "PERSONID":
                    $obj_Person_telephone->PersonId = $child;
                    break;
            }
        }
        $obj_retResult_Person_telephone = DAL_managePerson_telephone::updatePerson_telephone($obj_Person_telephone);
        if ($obj_retResult_Person_telephone->type == 1) {
            $main_result .= "<RESULTSTATUS>1</RESULTSTATUS>";
            $main_result .= getPerson_telephoneXml($obj_retResult_Person_telephone->data);
        } else {
            $main_result .= "<RESULTSTATUS>0</RESULTSTATUS>";
        }
    }
    $main_result .= "</VPROFILERESULT>";
    return $main_result;
}
 public static function updatePerson_telephone2($PhoneId, $PhoneNumber, $Type, $PersonId)
 {
     $obj_retResult = new returnResult();
     $obj_newPerson_telephone = new Person_telephone();
     $obj_newPerson_telephone->PhoneId = $PhoneId;
     $obj_newPerson_telephone->PhoneNumber = $PhoneNumber;
     $obj_newPerson_telephone->Type = $Type;
     $obj_newPerson_telephone->PersonId = $PersonId;
     $issuccess = DAL_managePerson_telephone::updatePerson_telephone($obj_newPerson_telephone);
     if ($issuccess) {
         $obj_retResult->type = 1;
         //	$obj_retResult->data = BL_managePerson_telephone::getPerson_telephoneByPhoneId($obj_newPerson_telephone->PhoneId);
         $obj_retResult->msg = "Person_telephone updation is Success";
     } else {
         $obj_retResult->type = 0;
         $obj_retResult->msg = "Person_telephone updation is Failed";
     }
     return $obj_retResult;
 }