?? main_unit.~pas
字號:
unit main_unit;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, TEMPLETFORM, Menus, ComCtrls, ToolWin, StdCtrls, ExtCtrls, jpeg,
GX_Outlook, ImgList, fcOutlookList, fcButton, fcImgBtn, fcShapeBtn,
fcClearPanel, fcButtonGroup, fcOutlookBar;
type
Tmain_form = class(TTEMPLETF)
Panel1: TPanel;
Image1: TImage;
fcOutlookBar1: TfcOutlookBar;
fcOutlookBar1OutlookList1: TfcOutlookList;
fcOutlookBar1fcShapeBtn1: TfcShapeBtn;
fcOutlookBar1OutlookList2: TfcOutlookList;
fcOutlookBar1fcShapeBtn2: TfcShapeBtn;
fcOutlookBar1OutlookList3: TfcOutlookList;
fcOutlookBar1fcShapeBtn3: TfcShapeBtn;
ImageList1: TImageList;
Edit1: TEdit;
Edit2: TEdit;
fcOutlookBar1OutlookList4: TfcOutlookList;
fcOutlookBar1fcShapeBtn4: TfcShapeBtn;
procedure fcOutlookBar1OutlookList1Items1Click(
OutlookList: TfcCustomOutlookList; Item: TfcOutlookListItem);
procedure fcOutlookBar1OutlookList2Items0Click(
OutlookList: TfcCustomOutlookList; Item: TfcOutlookListItem);
procedure fcOutlookBar1OutlookList1Items0Click(
OutlookList: TfcCustomOutlookList; Item: TfcOutlookListItem);
procedure fcOutlookBar1OutlookList2Items1Click(
OutlookList: TfcCustomOutlookList; Item: TfcOutlookListItem);
procedure fcOutlookBar1OutlookList2Items2Click(
OutlookList: TfcCustomOutlookList; Item: TfcOutlookListItem);
procedure fcOutlookBar1OutlookList2Items3Click(
OutlookList: TfcCustomOutlookList; Item: TfcOutlookListItem);
procedure fcOutlookBar1OutlookList2Items4Click(
OutlookList: TfcCustomOutlookList; Item: TfcOutlookListItem);
procedure fcOutlookBar1OutlookList3Items0Click(
OutlookList: TfcCustomOutlookList; Item: TfcOutlookListItem);
procedure fcOutlookBar1OutlookList3Items1Click(
OutlookList: TfcCustomOutlookList; Item: TfcOutlookListItem);
procedure fcOutlookBar1OutlookList3Items2Click(
OutlookList: TfcCustomOutlookList; Item: TfcOutlookListItem);
procedure fcOutlookBar1OutlookList3Items3Click(
OutlookList: TfcCustomOutlookList; Item: TfcOutlookListItem);
procedure fcOutlookBar1OutlookList2Items5Click(
OutlookList: TfcCustomOutlookList; Item: TfcOutlookListItem);
procedure FormShow(Sender: TObject);
procedure fcOutlookBar1OutlookList4Items0Click(
OutlookList: TfcCustomOutlookList; Item: TfcOutlookListItem);
procedure fcOutlookBar1OutlookList4Items1Click(
OutlookList: TfcCustomOutlookList; Item: TfcOutlookListItem);
private
{ Private declarations }
public
{ Public declarations }
end;
var
main_form: Tmain_form;
implementation
uses goodsin_unit, login_unit, receive_unit, withdraw_unit, exchange_unit,
check_unit, manufacturer_unit, depot_unit, storage_unit, sell_unit,
goods_out_unit,Registry,data_unit;
{$R *.dfm}
procedure Tmain_form.fcOutlookBar1OutlookList1Items1Click(
OutlookList: TfcCustomOutlookList; Item: TfcOutlookListItem);
begin
inherited;
close;
end;
procedure Tmain_form.fcOutlookBar1OutlookList2Items0Click(
OutlookList: TfcCustomOutlookList; Item: TfcOutlookListItem);
begin
inherited;
goods_in.ShowModal;
end;
procedure Tmain_form.fcOutlookBar1OutlookList1Items0Click(
OutlookList: TfcCustomOutlookList; Item: TfcOutlookListItem);
begin
inherited;
if fcOutlookBar1OutlookList1.Items[0].Text='用戶登陸' then
login.ShowModal
else
begin
if application.MessageBox('確定注銷嗎?','系統信息',mb_yesno+mb_iconquestion)=id_yes then
begin
main_form.fcOutlookBar1fcShapeBtn2.Enabled:=false;
main_form.fcOutlookBar1fcShapeBtn3.Enabled:=false;
main_form.fcOutlookBar1fcShapeBtn4.Enabled:=false;
fcOutlookBar1OutlookList1.Items[0].Text:='用戶登陸'
end;
end;
end;
procedure Tmain_form.fcOutlookBar1OutlookList2Items1Click(
OutlookList: TfcCustomOutlookList; Item: TfcOutlookListItem);
begin
inherited;
receive.ShowModal;
end;
procedure Tmain_form.fcOutlookBar1OutlookList2Items2Click(
OutlookList: TfcCustomOutlookList; Item: TfcOutlookListItem);
begin
inherited;
withdraw.ShowModal;
end;
procedure Tmain_form.fcOutlookBar1OutlookList2Items3Click(
OutlookList: TfcCustomOutlookList; Item: TfcOutlookListItem);
begin
inherited;
exchange.ShowModal;
end;
procedure Tmain_form.fcOutlookBar1OutlookList2Items4Click(
OutlookList: TfcCustomOutlookList; Item: TfcOutlookListItem);
begin
inherited;
if strtoint(trim(edit1.Text))=63 then
check.ShowModal
else
begin
application.MessageBox('您的權限不夠,不能使用!','系統信息',mb_ok+mb_iconinformation);
exit;
end;
end;
procedure Tmain_form.fcOutlookBar1OutlookList3Items0Click(
OutlookList: TfcCustomOutlookList; Item: TfcOutlookListItem);
begin
inherited;
manufacturer.ShowModal;
end;
procedure Tmain_form.fcOutlookBar1OutlookList3Items1Click(
OutlookList: TfcCustomOutlookList; Item: TfcOutlookListItem);
begin
inherited;
depot.ShowModal;
end;
procedure Tmain_form.fcOutlookBar1OutlookList3Items2Click(
OutlookList: TfcCustomOutlookList; Item: TfcOutlookListItem);
begin
inherited;
storage.ShowModal;
end;
procedure Tmain_form.fcOutlookBar1OutlookList3Items3Click(
OutlookList: TfcCustomOutlookList; Item: TfcOutlookListItem);
begin
inherited;
sell.ShowModal;
end;
procedure Tmain_form.fcOutlookBar1OutlookList2Items5Click(
OutlookList: TfcCustomOutlookList; Item: TfcOutlookListItem);
begin
inherited;
goods_out.ShowModal;
end;
procedure Tmain_form.FormShow(Sender: TObject);
var
Reg: TRegistry;
var server,uid,sqlPassword,databasename,s:string;
begin
inherited;
databasename:='silk'; //讀取注冊表
Reg := TRegistry.Create;
Reg.RootKey := HKEY_LOCAL_MACHINE;
try
if Reg.OpenKey('\SOFTWARE\Silk\DBConn', True) then
begin
server:=Reg.ReadString('DataSource');
uid:=Reg.ReadString('UserName');
sqlPassword:=Reg.ReadString('Password');
end ;
except
Reg.Free;
end;
data.ADOConnection1.Close;
s:='';
s:=s+'Provider=SQLOLEDB.1;';
s:=s+'Password='+ sqlPassword +';';
s:=S+'Persist Security Info=True;';
s:=S+'User ID='+ UID +';';
s:=S+'Initial Catalog='+ dataBaseName +';';
s:=S+'Data Source='+ server + ';';
try
data.ADOConnection1.ConnectionString:=s;
data.ADOConnection1.LoginPrompt:=false;
data.ADOConnection1.Connected:=true;
except
showmessage('數據庫錯誤');
application.Terminate;
end;
end;
procedure Tmain_form.fcOutlookBar1OutlookList4Items0Click(
OutlookList: TfcCustomOutlookList; Item: TfcOutlookListItem);
begin
inherited;
storage.ShowModal ;
end;
procedure Tmain_form.fcOutlookBar1OutlookList4Items1Click(
OutlookList: TfcCustomOutlookList; Item: TfcOutlookListItem);
begin
inherited;
sell.ShowModal;
end;
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -