Esempio n. 1
0
 public function lstRequiredWithChoice_Change()
 {
     // Erase any old entries
     foreach ($this->objSignupEntry->GetSignupProductArray() as $objSignupProduct) {
         if ($objSignupProduct->FormProduct->FormProductTypeId == FormProductType::RequiredWithChoice && $objSignupProduct->FormProductId != $this->lstRequiredWithChoice->SelectedValue) {
             $objSignupProduct->Delete();
         }
     }
     // Create the new entry
     $objFormProduct = FormProduct::Load($this->lstRequiredWithChoice->SelectedValue);
     if ($objFormProduct) {
         $this->objSignupEntry->AddProduct($objFormProduct);
     }
     $this->RefreshForm();
 }