function updateVillage_plant($sessionkey, $appcode, $Village_plantdata)
{
    $main_result = "<VPROFILERESULT>";
    $main_result .= "<AUTHSTATUS>0</AUTHSTATUS>";
    $userId = ValidateSession($sessionkey, $appcode);
    if ($userId > -1) {
        $main_result = "<AUTHSTATUS>1</AUTHSTATUS>";
        $obj_Village_plant = new Village_plant();
        foreach ($Userdata["[UPPERTEMPLATENAME"] as $key => $child) {
            switch ($key) {
                case "PLANTID":
                    $obj_Village_plant->PlantId = $child;
                    break;
                case "VILLAGEID":
                    $obj_Village_plant->VillageId = $child;
                    break;
            }
        }
        $obj_retResult_Village_plant = DAL_manageVillage_plant::updateVillage_plant($obj_Village_plant);
        if ($obj_retResult_Village_plant->type == 1) {
            $main_result .= "<RESULTSTATUS>1</RESULTSTATUS>";
            $main_result .= getVillage_plantXml($obj_retResult_Village_plant->data);
        } else {
            $main_result .= "<RESULTSTATUS>0</RESULTSTATUS>";
        }
    }
    $main_result .= "</VPROFILERESULT>";
    return $main_result;
}
 public static function updateVillage_plant2($PlantId, $VillageId)
 {
     $obj_retResult = new returnResult();
     $obj_newVillage_plant = new Village_plant();
     $obj_newVillage_plant->PlantId = $PlantId;
     $obj_newVillage_plant->VillageId = $VillageId;
     $issuccess = DAL_manageVillage_plant::updateVillage_plant($obj_newVillage_plant);
     if ($issuccess) {
         $obj_retResult->type = 1;
         //	$obj_retResult->data = BL_manageVillage_plant::getVillage_plantByVillageId($obj_newVillage_plant->VillageId);
         $obj_retResult->msg = "Village_plant updation is Success";
     } else {
         $obj_retResult->type = 0;
         $obj_retResult->msg = "Village_plant updation is Failed";
     }
     return $obj_retResult;
 }