View source code: 0000.zip_SEE_RK.PAS - VerySource

SEE_RK.PAS

Upload User: xgks2007
Upload Date: 2015-04-22
Package Size: 6496k
Code Size: 3k
Category: MiddleWare
Development Platform: C++ Builder
  1. unit see_rk;
  2. interface
  3. uses
  4.   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  5.   Dialogs, StdCtrls, Mask, DB, DBTables, Buttons, Grids, DBGrids;
  6. type
  7.   TForm18 = class(TForm)
  8.     Label1: TLabel;
  9.     GroupBox1: TGroupBox;
  10.     GroupBox2: TGroupBox;
  11.     Label2: TLabel;
  12.     Label4: TLabel;
  13.     Button1: TButton;
  14.     spmc: TComboBox;
  15.     Button2: TButton;
  16.     GroupBox3: TGroupBox;
  17.     Q_spmc: TQuery;
  18.     Q_splb: TQuery;
  19.     DataSource1: TDataSource;
  20.     DBGrid1: TDBGrid;
  21.     splb: TComboBox;
  22.     Q_lb: TQuery;
  23.     SpeedButton2: TSpeedButton;
  24.     SpeedButton3: TSpeedButton;
  25.     SpeedButton4: TSpeedButton;
  26.     procedure FormCreate(Sender: TObject);
  27.     procedure SpeedButton1Click(Sender: TObject);
  28.     procedure Button2Click(Sender: TObject);
  29.     procedure SpeedButton2Click(Sender: TObject);
  30.     procedure SpeedButton4Click(Sender: TObject);
  31.     procedure Button1Click(Sender: TObject);
  32.     procedure SpeedButton3Click(Sender: TObject);
  33.   private
  34.     { Private declarations }
  35.   public
  36.     { Public declarations }
  37.   end;
  38. var
  39.   Form18: TForm18;
  40. implementation
  41. uses H_inPrint;
  42. {$R *.dfm}
  43. procedure TForm18.FormCreate(Sender: TObject);
  44. begin
  45.   Q_lb.Open;
  46.   Q_lb.Active:=True;
  47.   while not Q_lb.Eof do
  48.         begin
  49.           splb.Items.Add(Q_lb.FieldByName('TypeName').AsString);
  50.           Q_lb.Next;
  51.         end;
  52.   Q_spmc.Active:=False;
  53.   Q_spmc.Close;
  54.   Q_spmc.Open;
  55.   Q_spmc.Active:=True;
  56. while not Q_spmc.Eof do
  57.         begin
  58.           spmc.Items.Add(Q_spmc.FieldByName('MenuName').AsString);
  59.           Q_spmc.Next;
  60.         end;
  61. end;
  62. procedure TForm18.SpeedButton1Click(Sender: TObject);
  63. begin
  64.  close;
  65. end;
  66. procedure TForm18.Button2Click(Sender: TObject);
  67.   var MenuName:string;
  68. begin
  69.   MenuName:=spmc.Text;
  70.   Q_splb.SQL.Clear;
  71.   Q_splb.SQL.Add('select * from H_in where MenuName='''+MenuName+'''');
  72.   Q_splb.SQL.Add('order by MenuName,Intime');
  73.   Q_splb.Open;
  74.   Q_splb.Active:=True;
  75. end;
  76. procedure TForm18.SpeedButton2Click(Sender: TObject);
  77. begin
  78.     Q_splb.SQL.Clear;
  79.   Q_splb.SQL.Add('select * from H_in order by MenuName,Intime');
  80.   Q_splb.Open;
  81. end;
  82. procedure TForm18.SpeedButton4Click(Sender: TObject);
  83. begin
  84.  close;
  85. end;
  86. procedure TForm18.Button1Click(Sender: TObject);
  87.  var splba:string;
  88. begin
  89.   splba:=splb.text;
  90.   Q_splb.SQL.Clear;
  91.   Q_splb.SQL.Add('select * from H_in where TypeName='''+splba+'''');
  92.   Q_splb.SQL.Add('order by MenuName,Intime');
  93.   Q_splb.Open;
  94.   Q_splb.Active:=True;
  95. end;
  96. procedure TForm18.SpeedButton3Click(Sender: TObject);
  97. begin
  98.   Form27.QuickRep1.Preview;
  99. end;
  100. end.