function updateVillage_group($sessionkey, $appcode, $Village_groupdata) { $main_result = "<VPROFILERESULT>"; $main_result .= "<AUTHSTATUS>0</AUTHSTATUS>"; $userId = ValidateSession($sessionkey, $appcode); if ($userId > -1) { $main_result = "<AUTHSTATUS>1</AUTHSTATUS>"; $obj_Village_group = new Village_group(); foreach ($Userdata["[UPPERTEMPLATENAME"] as $key => $child) { switch ($key) { case "GROUPID": $obj_Village_group->GroupId = $child; break; case "VILLAGEID": $obj_Village_group->VillageId = $child; break; } } $obj_retResult_Village_group = DAL_manageVillage_group::updateVillage_group($obj_Village_group); if ($obj_retResult_Village_group->type == 1) { $main_result .= "<RESULTSTATUS>1</RESULTSTATUS>"; $main_result .= getVillage_groupXml($obj_retResult_Village_group->data); } else { $main_result .= "<RESULTSTATUS>0</RESULTSTATUS>"; } } $main_result .= "</VPROFILERESULT>"; return $main_result; }
public static function updateVillage_group2($GroupId, $VillageId) { $obj_retResult = new returnResult(); $obj_newVillage_group = new Village_group(); $obj_newVillage_group->GroupId = $GroupId; $obj_newVillage_group->VillageId = $VillageId; $issuccess = DAL_manageVillage_group::updateVillage_group($obj_newVillage_group); if ($issuccess) { $obj_retResult->type = 1; // $obj_retResult->data = BL_manageVillage_group::getVillage_groupByVillageId($obj_newVillage_group->VillageId); $obj_retResult->msg = "Village_group updation is Success"; } else { $obj_retResult->type = 0; $obj_retResult->msg = "Village_group updation is Failed"; } return $obj_retResult; }