function updatePerson_olresult($sessionkey, $appcode, $Person_olresultdata)
{
    $main_result = "<VPROFILERESULT>";
    $main_result .= "<AUTHSTATUS>0</AUTHSTATUS>";
    $userId = ValidateSession($sessionkey, $appcode);
    if ($userId > -1) {
        $main_result = "<AUTHSTATUS>1</AUTHSTATUS>";
        $obj_Person_olresult = new Person_olresult();
        foreach ($Userdata["[UPPERTEMPLATENAME"] as $key => $child) {
            switch ($key) {
                case "OLRESULTID":
                    $obj_Person_olresult->OLResultId = $child;
                    break;
                case "SUBJECTID":
                    $obj_Person_olresult->SubjectId = $child;
                    break;
                case "SCHOOLID":
                    $obj_Person_olresult->SchoolId = $child;
                    break;
                case "GRADE":
                    $obj_Person_olresult->Grade = $child;
                    break;
                case "LANGUAGE":
                    $obj_Person_olresult->Language = $child;
                    break;
                case "DATETIME":
                    $obj_Person_olresult->DateTime = $child;
                    break;
                case "PERSONID":
                    $obj_Person_olresult->PersonId = $child;
                    break;
            }
        }
        $obj_retResult_Person_olresult = DAL_managePerson_olresult::updatePerson_olresult($obj_Person_olresult);
        if ($obj_retResult_Person_olresult->type == 1) {
            $main_result .= "<RESULTSTATUS>1</RESULTSTATUS>";
            $main_result .= getPerson_olresultXml($obj_retResult_Person_olresult->data);
        } else {
            $main_result .= "<RESULTSTATUS>0</RESULTSTATUS>";
        }
    }
    $main_result .= "</VPROFILERESULT>";
    return $main_result;
}
 public static function updatePerson_olresult2($OLResultId, $SubjectId, $SchoolId, $Grade, $Language, $DateTime, $PersonId)
 {
     $obj_retResult = new returnResult();
     $obj_newPerson_olresult = new Person_olresult();
     $obj_newPerson_olresult->OLResultId = $OLResultId;
     $obj_newPerson_olresult->SubjectId = $SubjectId;
     $obj_newPerson_olresult->SchoolId = $SchoolId;
     $obj_newPerson_olresult->Grade = $Grade;
     $obj_newPerson_olresult->Language = $Language;
     $obj_newPerson_olresult->DateTime = $DateTime;
     $obj_newPerson_olresult->PersonId = $PersonId;
     $issuccess = DAL_managePerson_olresult::updatePerson_olresult($obj_newPerson_olresult);
     if ($issuccess) {
         $obj_retResult->type = 1;
         //	$obj_retResult->data = BL_managePerson_olresult::getPerson_olresultByOLResultId($obj_newPerson_olresult->OLResultId);
         $obj_retResult->msg = "Person_olresult updation is Success";
     } else {
         $obj_retResult->type = 0;
         $obj_retResult->msg = "Person_olresult updation is Failed";
     }
     return $obj_retResult;
 }