function updateVillage_trading($sessionkey, $appcode, $Village_tradingdata)
{
    $main_result = "<VPROFILERESULT>";
    $main_result .= "<AUTHSTATUS>0</AUTHSTATUS>";
    $userId = ValidateSession($sessionkey, $appcode);
    if ($userId > -1) {
        $main_result = "<AUTHSTATUS>1</AUTHSTATUS>";
        $obj_Village_trading = new Village_trading();
        foreach ($Userdata["[UPPERTEMPLATENAME"] as $key => $child) {
            switch ($key) {
                case "TRADINGID":
                    $obj_Village_trading->TradingId = $child;
                    break;
                case "VILLAGEID":
                    $obj_Village_trading->VillageId = $child;
                    break;
                case "BUSINESSID":
                    $obj_Village_trading->BusinessId = $child;
                    break;
                case "DESCRIPTION":
                    $obj_Village_trading->Description = $child;
                    break;
            }
        }
        $obj_retResult_Village_trading = DAL_manageVillage_trading::updateVillage_trading($obj_Village_trading);
        if ($obj_retResult_Village_trading->type == 1) {
            $main_result .= "<RESULTSTATUS>1</RESULTSTATUS>";
            $main_result .= getVillage_tradingXml($obj_retResult_Village_trading->data);
        } else {
            $main_result .= "<RESULTSTATUS>0</RESULTSTATUS>";
        }
    }
    $main_result .= "</VPROFILERESULT>";
    return $main_result;
}
 public static function updateVillage_trading2($TradingId, $VillageId, $BusinessId, $Description)
 {
     $obj_retResult = new returnResult();
     $obj_newVillage_trading = new Village_trading();
     $obj_newVillage_trading->TradingId = $TradingId;
     $obj_newVillage_trading->VillageId = $VillageId;
     $obj_newVillage_trading->BusinessId = $BusinessId;
     $obj_newVillage_trading->Description = $Description;
     $issuccess = DAL_manageVillage_trading::updateVillage_trading($obj_newVillage_trading);
     if ($issuccess) {
         $obj_retResult->type = 1;
         //	$obj_retResult->data = BL_manageVillage_trading::getVillage_tradingByBusinessId($obj_newVillage_trading->BusinessId);
         $obj_retResult->msg = "Village_trading updation is Success";
     } else {
         $obj_retResult->type = 0;
         $obj_retResult->msg = "Village_trading updation is Failed";
     }
     return $obj_retResult;
 }