⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 unit6.pas

📁 计算机故障智能诊断系统 用户输入计算机的故障症状 即可由系统得出故障原因和相关的处理方法
💻 PAS
字号:
unit Unit6;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ExtCtrls, DB, ADODB;

type
  TForm6 = class(TForm)
    Panel1: TPanel;
    GroupBox1: TGroupBox;
    RadioButton1: TRadioButton;
    RadioButton2: TRadioButton;
    RadioButton3: TRadioButton;
    Button1: TButton;
    Button2: TButton;
    ruler6Qry: TADOQuery;
    ADOConnection1: TADOConnection;
    procedure Button2Click(Sender: TObject);
    procedure Button1Click(Sender: TObject);
    procedure FormShow(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form6: TForm6;

implementation

uses Unit7;

{$R *.dfm}

procedure TForm6.Button2Click(Sender: TObject);
begin
   with ruler6Qry do
    begin
      close;
      with sql do
        begin
          clear;
          add('delete from fact_table');
        end;
      execsql;

       with sql do
        begin
          clear;
          add('update pre_table set known=0 where known=1');
        end;
      execsql;

       with sql do
        begin
          clear;
          add('update act_table set known=0 where known=1');
        end;
      execsql;
    end;

  Application.Terminate
end;

procedure TForm6.Button1Click(Sender: TObject);
begin
   ruler6Qry.Close;
  //将事实加入事实库fact_table
  if (radioButton1.Checked)  then
    begin
      ruler6Qry.SQL.Clear;
      ruler6Qry.sql.add('insert into fact_table values('+'41'+') ' );
      ruler6Qry.ExecSQL;
    end

    else if (radioButton2.Checked)  then
    begin
      ruler6Qry.SQL.Clear;
      ruler6Qry.sql.add('insert into fact_table values('+'43'+') ' );
      ruler6Qry.ExecSQL;
    end
     else if (radioButton3.Checked)  then
    begin
      ruler6Qry.SQL.Clear;
      ruler6Qry.sql.add('insert into fact_table values('+'45'+') ' );
      ruler6Qry.ExecSQL;
    end;

  Form6.Close;
  Form7.show;
end;

procedure TForm6.FormShow(Sender: TObject);
begin
  RadioButton1.Checked:=false;
  RadioButton2.Checked:=false;
  RadioButton3.Checked:=false;

end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -