⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 w_xsydxx.pas

📁 系统管理程序的源码
💻 PAS
字号:
unit w_xsydxx;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ComCtrls, DBCtrls, Mask, ExtCtrls;

type
  Txsydxx = class(TForm)
    Panel1: TPanel;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    DBEdit1: TDBEdit;
    DBEdit2: TDBEdit;
    Panel2: TPanel;
    Panel3: TPanel;
    Button2: TButton;
    Button3: TButton;
    Button1: TButton;
    Button4: TButton;
    Button5: TButton;
    Label5: TLabel;
    Label7: TLabel;
    Label8: TLabel;
    Label11: TLabel;
    Label10: TLabel;
    Label9: TLabel;
    Label12: TLabel;
    Label6: TLabel;
    DBComboBox1: TDBComboBox;
    DBComboBox2: TDBComboBox;
    DBComboBox3: TDBComboBox;
    DBComboBox4: TDBComboBox;
    DBComboBox5: TDBComboBox;
    DBMemo1: TDBMemo;
    DBEdit4: TDBEdit;
    DBEdit5: TDBEdit;
    DBComboBox6: TDBComboBox;
    Label4: TLabel;
    Button6: TButton;
    DBLookupComboBox1: TDBLookupComboBox;
    procedure Button2Click(Sender: TObject);
    procedure Button3Click(Sender: TObject);
    procedure Button1Click(Sender: TObject);
    procedure Button4Click(Sender: TObject);
    procedure Button5Click(Sender: TObject);
    procedure Button6Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  xsydxx: Txsydxx;

implementation

uses mydata;

{$R *.dfm}

procedure Txsydxx.Button2Click(Sender: TObject);
begin

data.txj.Prior ;
 if (data.txj.bof=true) then
  begin
    button2.Enabled:=false;
  end;
   button3.Enabled:=true;

end;

procedure Txsydxx.Button3Click(Sender: TObject);
begin

data.txj.Next;
if (data.txj.eof=true) then
   begin
    button3.Enabled:=false;

   end;
    button2.Enabled :=true;
;
end;

procedure Txsydxx.Button1Click(Sender: TObject);
begin

data.tyd.Insert ;
data.tyd.FieldByName('学号').Value:=data.txj.fieldbyname('学号').Value ;
data.tyd.FieldByName('姓名').Value:=data.txj.fieldbyname('姓名').Value ;
data.tyd.FieldByName('班级').Value:=data.txj.fieldbyname('班级').Value ;
data.tyd.FieldByName('性别').Value:=data.txj.fieldbyname('性别').Value ;
button4.Enabled :=true;
button5.Enabled :=true;
button1.Enabled :=false;
//dbedit1.ReadOnly :=false;
//dbedit1.Text :='';
//dbedit2.ReadOnly :=false;
//dbedit2.text:='';
//dbedit3.ReadOnly :=false;
//dbedit3.Text :='';
dbedit4.ReadOnly :=false;
dbedit4.text:='';
dbedit5.ReadOnly :=false;
dbedit5.Text :='';
//dbedit6.ReadOnly :=false;
//dbedit6.text:='';
dbcombobox1.ReadOnly :=false;
dbcombobox1.Text :='';
dbcombobox2.ReadOnly :=false;
dbcombobox2.Text :='';
dbcombobox3.ReadOnly :=false;
dbcombobox3.Text :='';
dbcombobox4.ReadOnly :=false;
dbcombobox4.Text :='';
dbcombobox5.ReadOnly :=false;
dbcombobox5.Text :='';
//dbcombobox6.ReadOnly :=false;
//dbcombobox6.Text :='';
dbmemo1.ReadOnly :=false;
dbmemo1.Text :='';

end;

procedure Txsydxx.Button4Click(Sender: TObject);
begin
button1.Enabled :=true;
button4.Enabled :=false;
button5.Enabled :=false;
dbedit1.ReadOnly :=true;
dbedit2.ReadOnly :=true;
//dbedit3.ReadOnly :=true;
dbedit4.ReadOnly :=true;
dbedit5.ReadOnly :=true;
//dbedit6.ReadOnly :=false;
//dbedit6.text:='';
dbcombobox1.ReadOnly :=true;
dbcombobox2.ReadOnly :=true;
dbcombobox3.ReadOnly :=true;
dbcombobox4.ReadOnly :=true;
dbcombobox5.ReadOnly :=true;
//dbcombobox6.ReadOnly :=true;
dbmemo1.ReadOnly :=true;
if data.tyd.Modified then
 data.tyd.Post;

end;

procedure Txsydxx.Button5Click(Sender: TObject);
begin
button1.Enabled :=true;
button4.Enabled :=false;button5.Enabled:=false;
if data.tyd.Modified then
data.tyd.Cancel;

end;

procedure Txsydxx.Button6Click(Sender: TObject);
begin
xsydxx.Close ;
end;

end.

⌨️ 快捷键说明

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