?? unit7.pas
字號:
unit Unit7;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ComCtrls;
type
TForm_relation = class(TForm)
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
MC_B: TMonthCalendar;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
ComboBox_Race: TComboBox;
Label8: TLabel;
Label9: TLabel;
Label10: TLabel;
Button1: TButton;
Edit_Name: TEdit;
Edit_Call: TEdit;
Edit_Co: TEdit;
Edit_Party: TEdit;
Edit_Post: TEdit;
Edit_Country: TEdit;
Edit_Degree: TEdit;
Edit_Res: TEdit;
Label11: TLabel;
Edit_Phone: TEdit;
Label12: TLabel;
Edit_Add: TEdit;
procedure Button1Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form_relation: TForm_relation;
implementation
uses Unit2, Unit6, Unit1;
{$R *.dfm}
procedure TForm_relation.Button1Click(Sender: TObject);
var
count_relation2: integer;
begin
with DM do
begin
Table_relation2.Active:=True;
count_relation2:=Table_relation2.RecordCount;
if Form1.Modify_relation then
begin
Form1.Modify_relation:=False;
end
else
begin
Table_relation2.Append;
Table_relation2.FieldByName('序號').AsString:=IntToStr(count_relation2+1);
end;
Table_relation2.FieldByName('職工號').AsString:=Table_basic.FieldValues['職工號'];
Table_relation2.FieldByName('姓名').AsString:=Edit_Name.Text;
Table_relation2.FieldByName('政治面貌').AsString:=Edit_Party.Text;
Table_relation2.FieldByName('稱謂').AsString:=Edit_Call.Text;
Table_relation2.FieldByName('出生日期').AsDateTime:=MC_B.Date;
Table_relation2.FieldByName('國籍').AsString:=Edit_Country.Text;
Table_relation2.FieldByName('民族').AsString:=ComboBox_Race.Items[ComboBox_Race.ItemIndex];
Table_relation2.FieldByName('學歷').AsString:=Edit_Degree.Text;
Table_relation2.FieldByName('職務').AsString:=Edit_Res.Text;
Table_relation2.FieldByName('單位').AsString:=Edit_Co.Text;
Table_relation2.FieldByName('住址').AsString:=Edit_Add.Text;
Table_relation2.FieldByName('電話').AsString:=Edit_Phone.Text;
Table_relation2.FieldByName('郵編').AsString:=Edit_Post.Text;
Table_relation2.Post;
Table_relation2.Refresh;
Table_relation2.Active:=False;
Table_relation.Refresh;
end;
Form_relation.Hide;
end;
procedure TForm_relation.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
with DM do
begin
Table_exp.Cancel;
Table_exp.Refresh;
end;
end;
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -