<?php
require_once('Database.php');
class FormDetails extends Database{
    public $Id;
    public $KeyForm;
    public $Price;

  public function UpdatePrice(){
    $Query = "UPDATE  FormDetails SET Price = $this->Price WHERE Id = $this->Id";
    return $this->ExecuteQuery($Query);
  }

  public function ToggleStatus(){
    $Query = "UPDATE  FormDetails SET Status = !Status WHERE Id = $this->Id";
    return $this->ExecuteQuery($Query);
  }

    public function GetRecords(){
        $Query = "SELECT *  FROM FormDetails";
        return $this->ExecuteReader($Query);
    }

  public function GetRecordByKeyForm(){
    $Query = "SELECT *  FROM FormDetails WHERE KeyForm = '$this->KeyForm'";
    return $this->ExecuteUniqueReader($Query);
  }


}