repeatlno_f.pas

来自「县级供电企业电费核算源码, 在客户处正常运行8年以上, Delphi 5开发,数」· PAS 代码 · 共 74 行

PAS
74
字号
unit RepeatLNo_F;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, Mask, DBCtrls, ExtCtrls, Grids, DBGrids;

type
  TF_RepeatLNo = class(TForm)
    DBGrid1: TDBGrid;
    DBGrid2: TDBGrid;
    Panel1: TPanel;
    Panel2: TPanel;
    Bt_Close: TButton;
    DBE_CenterNo: TDBEdit;
    DBE_LNo: TDBEdit;
    procedure DBGrid1DblClick(Sender: TObject);
    procedure FormShow(Sender: TObject);
    procedure Bt_CloseClick(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  F_RepeatLNo: TF_RepeatLNo;

implementation

uses Mobile_DM, CommFee;

{$R *.DFM}

procedure TF_RepeatLNo.DBGrid1DblClick(Sender: TObject);
begin
	with DM_Mobile Do
    Begin
		if Q_RepeatLNo.Eof Then//not found repeat lno
    	Begin
	    	ShowMessage('系统没有发现有重复的逻辑表号,请放心使用');
    		Exit;
    	End;
		if(Q_RepeatLNoDetail.Active) Then
		    Q_RepeatLNoDetail.Active := false;
		Q_RepeatLNoDetail.Params.ParamByName('v_CenterNo').AsInteger := StrToInt(DBE_CenterNo.Text);
		Q_RepeatLNoDetail.Params.ParamByName('v_LNo').AsString := DBE_LNo.Text;
    	Q_RepeatLNoDetail.Prepare();
    	Q_RepeatLNoDetail.Open();
    End;
end;

procedure TF_RepeatLNo.FormShow(Sender: TObject);
begin
	DM_Mobile.Q_RepeatLNo.Close();
    DM_Mobile.Q_RepeatLNo.Open();
    DM_Mobile.Q_RepeatLNoDetail.Close();
end;

procedure TF_RepeatLNo.Bt_CloseClick(Sender: TObject);
begin
	Close();	
end;

procedure TF_RepeatLNo.FormClose(Sender: TObject;
  var Action: TCloseAction);
begin
	MyReleaseForm(TForm(F_RepeatLNo));//.Show();
end;

end.

⌨️ 快捷键说明

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