public function lstQuantity_Change($strFormId, $strControlId, $strParameter) { $lstQuantity = $this->GetControl($strControlId); $objFormProduct = FormProduct::Load($strParameter); $objSignupProduct = SignupProduct::LoadBySignupEntryIdFormProductId($this->objSignupEntry->Id, $objFormProduct->Id); if (!$objSignupProduct) { if ($lstQuantity->SelectedValue) { $this->objSignupEntry->AddProduct($objFormProduct, $lstQuantity->SelectedValue); } } else { if ($lstQuantity->SelectedValue) { $objSignupProduct->Quantity = $lstQuantity->SelectedValue; $objSignupProduct->Save(); } else { $objSignupProduct->Delete(); } $this->objSignupEntry->RefreshAmounts(); } $this->RefreshForm(); }