function addPerson_highereducation($sessionkey, $appcode, $Person_highereducationdata)
{
    $main_result = "<VPROFILERESULT>";
    $main_result .= "<AUTHSTATUS>0</AUTHSTATUS>";
    $userId = ValidateSession($sessionkey, $appcode);
    if ($userId > -1) {
        $main_result = "<AUTHSTATUS>1</AUTHSTATUS>";
        $obj_Person_highereducation = new Person_highereducation();
        foreach ($Userdata["[UPPERTEMPLATENAME"] as $key => $child) {
            switch ($key) {
                case "RESULTID":
                    $obj_Person_highereducation->ResultId = $child;
                    break;
                case "SUBJECTID":
                    $obj_Person_highereducation->SubjectId = $child;
                    break;
                case "INSTITUTEID":
                    $obj_Person_highereducation->InstituteId = $child;
                    break;
                case "GRADE":
                    $obj_Person_highereducation->Grade = $child;
                    break;
                case "LANGUAGE":
                    $obj_Person_highereducation->Language = $child;
                    break;
                case "DATETIME":
                    $obj_Person_highereducation->DateTime = $child;
                    break;
                case "PERSONID":
                    $obj_Person_highereducation->PersonId = $child;
                    break;
                case "LEVEL":
                    $obj_Person_highereducation->Level = $child;
                    break;
            }
        }
        $obj_retResult_Person_highereducation = DAL_managePerson_highereducation::addPerson_highereducation($obj_Person_highereducation);
        if ($obj_retResult_Person_highereducation->type == 1) {
            $main_result .= "<RESULTSTATUS>1</RESULTSTATUS>";
            $main_result .= getPerson_highereducationXml($obj_retResult_Person_highereducation->data);
        } else {
            $main_result .= "<RESULTSTATUS>0</RESULTSTATUS>";
        }
    }
    $main_result .= "</VPROFILERESULT>";
    return $main_result;
}
 public static function addPerson_highereducation2($ResultId, $SubjectId, $InstituteId, $Grade, $Language, $DateTime, $PersonId, $Level)
 {
     $obj_retResult = new returnResult();
     $obj_newPerson_highereducation = new Person_highereducation();
     $obj_newuser->setPerson_highereducation($ResultId, $SubjectId, $InstituteId, $Grade, $Language, $DateTime, $PersonId, $Level);
     // $isExist = BL_managePerson_highereducation::isExist($obj_newPerson_highereducation->id);
     if (!$isExist) {
         $obj_retResult_Person_highereducation = DAL_managePerson_highereducation::addPerson_highereducation($obj_newPerson_highereducation);
         if ($obj_retResult_Person_highereducation->type == 1) {
             $obj_retResult->type = 1;
             $obj_retResult->msg = "Success";
             $obj_retResult->data = $obj_retResult_Person_highereducation->data;
         } else {
             $obj_retResult->type = 0;
             $obj_retResult->msg = "Failed";
         }
     } else {
         $obj_retResult->type = 0;
         $obj_retResult->msg = "Sorry! Person_highereducation already exist";
     }
     return $obj_retResult;
 }