You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

169 lines
4.2 KiB
Plaintext

11 months ago
unit u_rp_zou_total;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, bsSkinCtrls, DB, ADODB, TeEngine, Series, ExtCtrls, TeeProcs,
Chart, DbChart,teeprevi, XPMenu, Menus;
type
Tfrm_rp_zou_total = class(TForm)
bsSkinPanel2: TbsSkinPanel;
bsSkinButton10: TbsSkinButton;
bsSkinButton9: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
bsSkinCheckRadioBox1: TbsSkinCheckRadioBox;
bsSkinCheckRadioBox2: TbsSkinCheckRadioBox;
p_seae: TADOStoredProc;
p_seai: TADOStoredProc;
p_airi: TADOStoredProc;
p_aire: TADOStoredProc;
bsSkinPanel1: TbsSkinPanel;
bsSkinCheckRadioBox3: TbsSkinCheckRadioBox;
bsSkinCheckRadioBox4: TbsSkinCheckRadioBox;
Panel1: TPanel;
bsSkinPanel3: TbsSkinPanel;
DBChart2: TDBChart;
LineSeries1: TBarSeries;
LineSeries2: TBarSeries;
LineSeries3: TBarSeries;
LineSeries4: TBarSeries;
DBChart1: TDBChart;
Series1: TLineSeries;
Series2: TLineSeries;
Series3: TLineSeries;
Series4: TLineSeries;
bsSkinPanel4: TbsSkinPanel;
p_total: TADOStoredProc;
DBChart3: TDBChart;
LineSeries5: TLineSeries;
DBChart4: TDBChart;
LineSeries6: TBarSeries;
PopupMenu1: TPopupMenu;
N5: TMenuItem;
N1: TMenuItem;
N2: TMenuItem;
XPMenu1: TXPMenu;
bsSkinButton1: TbsSkinButton;
SaveDialog1: TSaveDialog;
procedure bsSkinPanel2Resize(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure bsSkinButton5Click(Sender: TObject);
procedure bsSkinCheckRadioBox3Click(Sender: TObject);
procedure bsSkinCheckRadioBox4Click(Sender: TObject);
procedure bsSkinButton10Click(Sender: TObject);
procedure Panel1Resize(Sender: TObject);
procedure N5Click(Sender: TObject);
procedure N2Click(Sender: TObject);
procedure bsSkinButton9Click(Sender: TObject);
procedure bsSkinButton1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frm_rp_zou_total: Tfrm_rp_zou_total;
implementation
uses u_main, u_rp_query;
{$R *.dfm}
procedure Tfrm_rp_zou_total.bsSkinPanel2Resize(Sender: TObject);
var
i:integer;
begin
i:=round(bsSkinPanel2.Width/8);
bsSkinPanel1.Width:=i*2;
bsSkinCheckRadioBox3.Width:=i;
bsSkinCheckRadioBox2.Width:=i;
bsSkinCheckRadioBox1.Width:=i;
bsSkinButton10.Width:=i;
bsSkinButton9.Width:=i;
bsSkinButton1.Width:=i;
end;
procedure Tfrm_rp_zou_total.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
frm_rp_zou_total.Hide;
frm_rp_zou_total.ManualFloat(frm_rp_zou_total.BoundsRect );
frm_main.freeTabs('frm_rp_zou_total');
action:=cafree;
frm_rp_zou_total:=nil;
end;
procedure Tfrm_rp_zou_total.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_rp_zou_total.bsSkinCheckRadioBox3Click(Sender: TObject);
begin
DBChart1.Visible:=true;
DBChart2.Visible:=false;
DBChart3.Visible:=true;
DBChart4.Visible:=false;
end;
procedure Tfrm_rp_zou_total.bsSkinCheckRadioBox4Click(Sender: TObject);
begin
DBChart2.Visible:=true;
DBChart1.Visible:=false;
DBChart4.Visible:=true;
DBChart3.Visible:=false;
end;
procedure Tfrm_rp_zou_total.bsSkinButton10Click(Sender: TObject);
begin
try
frm_rp_query:=tfrm_rp_query.Create (self);
rp_query_limited:='0037';
rp_query_bs:=3;
frm_rp_query.ShowModal;
finally
frm_rp_query.Free;
end;
end;
procedure Tfrm_rp_zou_total.Panel1Resize(Sender: TObject);
begin
bsSkinPanel3.Height:=round(Panel1.Height/2);
end;
procedure Tfrm_rp_zou_total.N5Click(Sender: TObject);
begin
if DBChart1.Visible then
chartpreview(frm_rp_zou_total,dbchart1)
else
chartpreview(frm_rp_zou_total,dbchart2);
end;
procedure Tfrm_rp_zou_total.N2Click(Sender: TObject);
begin
if DBChart3.Visible then
chartpreview(frm_rp_zou_total,dbchart3)
else
chartpreview(frm_rp_zou_total,dbchart4);
end;
procedure Tfrm_rp_zou_total.bsSkinButton9Click(Sender: TObject);
var
Pnt:Tpoint;
begin
Pnt:=bsSkinButton9.ClientToScreen(Point(0,bsSkinButton9.Height));
PopupMenu1.Popup(Pnt.x,Pnt.y);
end;
procedure Tfrm_rp_zou_total.bsSkinButton1Click(Sender: TObject);
begin
if SaveDialog1.Execute then
frm_rp_zou_total.GetFormImage.SaveToFile(SaveDialog1.FileName+'.bmp');
end;
end.