?? proom.pas
字號:
{*******************************************************}
{ }
{ }
{ }
{ 中軟金馬公司版權所有。2002.12前 }
{ }
{ 編制:中軟金馬郵資票品項目開發組 }
{ }
{ }
{*******************************************************}
(*
本模塊在省級系統管理里面調用。
*)
{
有關表:
人員組別表、組別表、人員表
部門表
數據來源:
用戶:人員表
隸屬于:人員組別表
不隸屬于:組別表
功能:
算法:
更新有關表: 人員組別表、人員表
備注:口令、確定口令不使用數據感應控鍵
}
unit PRoom;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
FormBase, StdCtrls, Buttons, DBCtrls, Mask, UserList, BoxProcs;
type
TfrmPRoom = class(TFFormBase)
ListBox1: TListBox;
Label7: TLabel;
ListBox2: TListBox;
Label8: TLabel;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
BitBtn3: TBitBtn;
BitBtn4: TBitBtn;
Label3: TLabel;
ComboBox1: TComboBox;
procedure BitBtn3Click(Sender: TObject);
procedure BitBtn4Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure BitBtn1Click(Sender: TObject);
procedure BitBtn2Click(Sender: TObject);
procedure ComboBox1Change(Sender: TObject);
private
{ Private declarations }
procedure InitData;
public
{ Public declarations }
end;
function ShowPRoom: Boolean;
var
frmPRoom: TfrmPRoom;
implementation
uses datas,Pub;
{$R *.DFM}
function ShowPRoom: Boolean;
begin
Application.CreateForm(TfrmPRoom, frmPRoom);
with frmPRoom do
try
result := ShowModal = MB_OK;
finally
Free;
end;
end;
procedure TfrmPRoom.BitBtn3Click(Sender: TObject);
begin
inherited;
with frmUserList do
if not SaveKFRYDZB(Copy(ComboBox1.Text, 1, pos(' ', combobox1.Text) - 1), ListBox1.Items) then
CHQMsgBox('保存錯誤!');
end;
procedure TfrmPRoom.BitBtn4Click(Sender: TObject);
begin
inherited;
with frmUserList.qryUser do
CancelUpdates;
close;
end;
procedure TfrmPRoom.FormCreate(Sender: TObject);
const
KFSQL = 'SELECT KFDM||'' ''||KFMC FROM TGS_KFB where KFDM not in(''-1'',''-2'') order by KFDM';
begin
inherited;
InitList(ComboBox1.Items, KFSQL);
if ComboBox1.items.count > 0 then ComboBox1.ItemIndex := 0;
InitData;
end;
procedure TfrmPRoom.BitBtn1Click(Sender: TObject);
begin
if ListBox2.Items.Count = 0 then
exit;
BoxMoveSelectedItems(ListBox2, ListBox1);
end;
procedure TfrmPRoom.BitBtn2Click(Sender: TObject);
begin
if ListBox1.Items.Count = 0 then
exit;
BoxMoveSelectedItems(ListBox1, ListBox2);
end;
procedure TfrmPRoom.InitData;
const
NSQL = 'SELECT R.YGDM||'' ''||R.YGMC FROM TGS_RYB R Where R.YGDM not in (Select YGDM From tgs_KFRYDZB where KFDM = ''%s'') order by R.YGDM';
ISQL = 'SELECT R.YGDM||'' ''||R.YGMC FROM TGS_RYB R, tgs_KFRYDZB M Where R.YGDM = M.YGDM AND M.KFDM = ''%s'' order by R.YGDM';
begin
InitList(ListBox2.Items, Format(NSQL, [Copy(ComboBox1.Text, 1, pos(' ', combobox1.Text) - 1)]));
InitList(ListBox1.Items, Format(ISQL, [Copy(ComboBox1.Text, 1, pos(' ', combobox1.Text) - 1)]));
end;
procedure TfrmPRoom.ComboBox1Change(Sender: TObject);
begin
inherited;
InitData;
end;
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -