📄 u_seedata.pas
字号:
unit U_SeeData;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Grids, Menus, StdCtrls, ExtCtrls, Db, DBTables;
type
TF_SeeData = class(TForm)
Table1: TTable;
StringGrid1: TStringGrid;
procedure FormShow(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
private
{ Private declarations }
public
{ Public declarations }
end;
var
F_SeeData: TF_SeeData;
implementation
{$R *.DFM}
procedure TF_SeeData.FormShow(Sender: TObject);
var
i, k: integer;
begin
StringGrid1.Cells[1,0]:=' 送货单位';
StringGrid1.Cells[2,0]:=' 收货单位';
StringGrid1.Cells[3,0]:=' 货品名称';
StringGrid1.Cells[4,0]:=' 车牌号码';
StringGrid1.Cells[5,0]:='总重(Kg)';
StringGrid1.Cells[6,0]:=' 皮重(Kg)';
StringGrid1.Cells[7,0]:=' 净重(Kg)';
StringGrid1.Cells[8,0]:=' 司称员';
StringGrid1.Cells[9,0]:=' 日期';
StringGrid1.Cells[10,0]:=' 入厂时间';
StringGrid1.Cells[11,0]:=' 出厂时间';
StringGrid1.Cells[12,0]:='料号(空罐号)';
StringGrid1.Cells[13,0]:='序号';
with Table1 do
TableName:='DATA\'+'MainWeight.DBF';
with Table1 do
begin
open;
first;
begin
StringGrid1.RowCount:=Table1.RecordCount+2;
for i:=1 to Table1.RecordCount do
StringGrid1.Cells[0,i]:=IntToStr(i);
for k:=1 to Table1.RecordCount do
begin
StringGrid1.Cells[1,k]:=Table1['SD'];
StringGrid1.Cells[2,k]:=Table1['RD'];
StringGrid1.Cells[3,k]:=Table1['NAME'] ;
StringGrid1.Cells[4,k]:=Table1['CARNO'];
StringGrid1.Cells[5,k]:=Table1['TWET'];
StringGrid1.Cells[6,k]:=Table1['LWET'];
StringGrid1.Cells[7,k]:=Table1['WET'];
StringGrid1.Cells[8,k]:=Table1['OPTER'];
StringGrid1.Cells[9,k]:=Table1['DATE'];
StringGrid1.Cells[10,k]:=Table1['INTIME'];
StringGrid1.Cells[11,k]:=Table1['OUTTIME'];
StringGrid1.Cells[12,k]:=Table1['METERNO'];
StringGrid1.Cells[13,k]:=Table1['ORD'];
next;
end ;
close;
end;
end;
end;
procedure TF_SeeData.FormClose(Sender: TObject; var Action: TCloseAction);
begin
Table1.close;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -