📄 lproductinfo.pas
字号:
unit lproductinfo;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, DB, ADODB, Grids, DBGrids, ExtCtrls, Buttons, Menus, StdCtrls;
type
TDataVar=array of string;
type
Tlproductinfof = class(TForm)
DS_productinfo: TDataSource;
Q_productinfo: TADOQuery;
MainMenu1: TMainMenu;
reduce: TMenuItem;
N2: TMenuItem;
uplow: TMenuItem;
N5: TMenuItem;
N6: TMenuItem;
yc: TMenuItem;
insert: TMenuItem;
N9: TMenuItem;
exit: TMenuItem;
N1: TMenuItem;
DBGrid_productinfo: TDBGrid;
N3: TMenuItem;
N4: TMenuItem;
procedure FormShow(Sender: TObject);
procedure reduceClick(Sender: TObject);
procedure exitClick(Sender: TObject);
procedure insertClick(Sender: TObject);
procedure upperClick(Sender: TObject);
procedure N9Click(Sender: TObject);
procedure DBGrid_productinfoDblClick(Sender: TObject);
procedure uplowClick(Sender: TObject);
procedure N3Click(Sender: TObject);
{ procedure FormShow(Sender: TObject); }
private
{ Private declarations }
public
{ Public declarations }
end;
var
lproductinfof: Tlproductinfof;
implementation
uses dm,main_page, lprore, ldgysda, Unit1, de, llow, upper, jd1f;
{$R *.dfm}
procedure Tlproductinfof.FormShow(Sender: TObject);
begin
Q_productinfo.Close;
Q_productinfo.SQL.Text:='select * FROM '+DatabaseName+'decision';
Q_productinfo.Open;
end;
procedure Tlproductinfof.reduceClick(Sender: TObject);
begin
upf:=Tupf.Create(nil);
with upf do
try
ShowModal;
finally
Free;
end;
end;
procedure Tlproductinfof.exitClick(Sender: TObject);
begin
close;
end;
procedure Tlproductinfof.insertClick(Sender: TObject);
begin
ISinsert:=true;
ldproductinfof:=Tldproductinfof.Create(nil);
with ldproductinfof do
try
ShowModal;
finally
free;
end;
end;
procedure Tlproductinfof.upperClick(Sender: TObject);
begin
upf:=Tupf.Create(nil);
with upf do
try
ShowModal;
finally
Free;
end;
end;
procedure Tlproductinfof.N9Click(Sender: TObject);
begin
Q_productinfo.Delete;
Q_productinfo.ExecSQL;
end;
procedure Tlproductinfof.DBGrid_productinfoDblClick(Sender: TObject);
begin
if not Q_productinfo.IsEmpty then
begin
ISinsert:=false;
ldproductinfof:=Tldproductinfof.Create(nil);
with ldproductinfof do
try
ShowModal;
finally
free;
end;
end else
begin
MessageBox(Handle,'没有记录可修改!','提示信息', MB_ICONINFORMATION or MB_OK);
// exit;
end;
end;
procedure Tlproductinfof.uplowClick(Sender: TObject);
begin
llowf:=Tllowf.Create(nil);
with llowf do
try
ShowModal;
finally
Free;
end;
end;
procedure Tlproductinfof.N3Click(Sender: TObject);
begin
jd1:=Tjd1.Create(nil);
with jd1 do
try
ShowModal;
finally
Free;
end;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -