ExampleForm::btnSave_Click PHP Méthode

btnSave_Click() protected méthode

Handle the action for the Save button being clicked.
protected btnSave_Click ( $strFormId, $strControlId, $strParameter )
    protected function btnSave_Click($strFormId, $strControlId, $strParameter)
    {
        if ($this->intEditPersonId == -1) {
            $objPerson = new Person();
        } else {
            $objPerson = Person::Load($this->intEditPersonId);
        }
        $objPerson->FirstName = trim($this->txtFirstName->Text);
        $objPerson->LastName = trim($this->txtLastName->Text);
        $objPerson->Save();
        $this->intEditPersonId = null;
    }