Пример #1
0
 public function btnSave_Click($strFormId, $strControlId, $strParameter)
 {
     $blnRefreshGroups = !$this->mctGroup->EditMode || $this->mctGroup->Group->ParentGroupId != $this->lstParentGroup->SelectedValue;
     // Delegate "Save" processing to the SmartGroupMetaControl
     $this->mctGroup->SaveGroup();
     // Now we can save the Smart Group
     if (!$this->mctSmartGroup->EditMode) {
         $this->mctSmartGroup->SmartGroup->Group = $this->mctGroup->Group;
     }
     $this->mctSmartGroup->SmartGroup->DateRefreshed = null;
     $this->mctSmartGroup->SaveSmartGroup();
     // Save the Search Query stuff
     if (!$this->mctSmartGroup->EditMode) {
         $this->objSearchQuery->SmartGroup = $this->mctSmartGroup->SmartGroup;
         $this->objSearchQuery->Save();
     }
     $this->pnlSearchQuery->Save();
     $this->objSearchQuery->RefreshDescription();
     // Refresh
     if ($blnRefreshGroups) {
         Group::RefreshHierarchyDataForMinistry($this->mctGroup->Group->MinistryId);
         $this->objForm->pnlGroups_Refresh();
     }
     $this->ReturnTo('#' . $this->mctGroup->Group->Id);
 }
Пример #2
0
 /**
  * Static Helper Method to Create using QueryString arguments
  *
  * @param mixed $objParentObject QForm or QPanel which will be using this SmartGroupMetaControl
  * @param QMetaControlCreateType $intCreateType rules governing SmartGroup object creation - defaults to CreateOrEdit
  * @return SmartGroupMetaControl
  */
 public static function CreateFromQueryString($objParentObject, $intCreateType = QMetaControlCreateType::CreateOrEdit)
 {
     $intGroupId = QApplication::QueryString('intGroupId');
     return SmartGroupMetaControl::Create($objParentObject, $intGroupId, $intCreateType);
 }