示例#1
0
function updateSociety($sessionkey, $appcode, $Societydata)
{
    $main_result = "<VPROFILERESULT>";
    $main_result .= "<AUTHSTATUS>0</AUTHSTATUS>";
    $userId = ValidateSession($sessionkey, $appcode);
    if ($userId > -1) {
        $main_result = "<AUTHSTATUS>1</AUTHSTATUS>";
        $obj_Society = new Society();
        foreach ($Userdata["[UPPERTEMPLATENAME"] as $key => $child) {
            switch ($key) {
                case "SOCIETYID":
                    $obj_Society->SocietyId = $child;
                    break;
                case "NAME":
                    $obj_Society->Name = $child;
                    break;
                case "DESCRIPTION":
                    $obj_Society->Description = $child;
                    break;
                case "MISSION":
                    $obj_Society->Mission = $child;
                    break;
                case "SOCIETYTYPEID":
                    $obj_Society->SocietyTypeId = $child;
                    break;
                case "SOCIETYADDRESS":
                    $obj_Society->SocietyAddress = $child;
                    break;
            }
        }
        $obj_retResult_Society = DAL_manageSociety::updateSociety($obj_Society);
        if ($obj_retResult_Society->type == 1) {
            $main_result .= "<RESULTSTATUS>1</RESULTSTATUS>";
            $main_result .= getSocietyXml($obj_retResult_Society->data);
        } else {
            $main_result .= "<RESULTSTATUS>0</RESULTSTATUS>";
        }
    }
    $main_result .= "</VPROFILERESULT>";
    return $main_result;
}
示例#2
0
 public static function updateSociety2($SocietyId, $Name, $Description, $Mission, $SocietyTypeId, $SocietyAddress)
 {
     $obj_retResult = new returnResult();
     $obj_newSociety = new Society();
     $obj_newSociety->SocietyId = $SocietyId;
     $obj_newSociety->Name = $Name;
     $obj_newSociety->Description = $Description;
     $obj_newSociety->Mission = $Mission;
     $obj_newSociety->SocietyTypeId = $SocietyTypeId;
     $obj_newSociety->SocietyAddress = $SocietyAddress;
     $issuccess = DAL_manageSociety::updateSociety($obj_newSociety);
     if ($issuccess) {
         $obj_retResult->type = 1;
         //	$obj_retResult->data = BL_manageSociety::getSocietyBySocietyId($obj_newSociety->SocietyId);
         $obj_retResult->msg = "Society updation is Success";
     } else {
         $obj_retResult->type = 0;
         $obj_retResult->msg = "Society updation is Failed";
     }
     return $obj_retResult;
 }