function updatePerson_address($sessionkey, $appcode, $Person_addressdata) { $main_result = "<VPROFILERESULT>"; $main_result .= "<AUTHSTATUS>0</AUTHSTATUS>"; $userId = ValidateSession($sessionkey, $appcode); if ($userId > -1) { $main_result = "<AUTHSTATUS>1</AUTHSTATUS>"; $obj_Person_address = new Person_address(); foreach ($Userdata["[UPPERTEMPLATENAME"] as $key => $child) { switch ($key) { case "ADDRESSID": $obj_Person_address->AddressId = $child; break; case "ADDRESS": $obj_Person_address->Address = $child; break; case "ADDRESSTYPE": $obj_Person_address->AddressType = $child; break; case "VILLAGEID": $obj_Person_address->VillageId = $child; break; case "PERSONID": $obj_Person_address->PersonId = $child; break; } } $obj_retResult_Person_address = DAL_managePerson_address::updatePerson_address($obj_Person_address); if ($obj_retResult_Person_address->type == 1) { $main_result .= "<RESULTSTATUS>1</RESULTSTATUS>"; $main_result .= getPerson_addressXml($obj_retResult_Person_address->data); } else { $main_result .= "<RESULTSTATUS>0</RESULTSTATUS>"; } } $main_result .= "</VPROFILERESULT>"; return $main_result; }
public static function updatePerson_address2($AddressId, $Address, $AddressType, $VillageId, $PersonId) { $obj_retResult = new returnResult(); $obj_newPerson_address = new Person_address(); $obj_newPerson_address->AddressId = $AddressId; $obj_newPerson_address->Address = $Address; $obj_newPerson_address->AddressType = $AddressType; $obj_newPerson_address->VillageId = $VillageId; $obj_newPerson_address->PersonId = $PersonId; $issuccess = DAL_managePerson_address::updatePerson_address($obj_newPerson_address); if ($issuccess) { $obj_retResult->type = 1; // $obj_retResult->data = BL_managePerson_address::getPerson_addressByAddressId($obj_newPerson_address->AddressId); $obj_retResult->msg = "Person_address updation is Success"; } else { $obj_retResult->type = 0; $obj_retResult->msg = "Person_address updation is Failed"; } return $obj_retResult; }