yjxgfrm.pas

来自「本人编写的有关军队营房工作的管理系统」· PAS 代码 · 共 84 行

PAS
84
字号
unit yjxgfrm;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, db,StdCtrls, ExtCtrls, Buttons;

type
  Tyjxg = class(TForm)
    Panel1: TPanel;
    Panel2: TPanel;
    Label1: TLabel;
    Edit1: TEdit;
    Label2: TLabel;
    Edit2: TEdit;
    Label3: TLabel;
    ComboBox1: TComboBox;
    SpeedButton3: TSpeedButton;
    SpeedButton1: TSpeedButton;
    procedure SpeedButton3Click(Sender: TObject);
    procedure SpeedButton1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  yjxg: Tyjxg;

implementation
uses datafrm;
{$R *.dfm}

procedure Tyjxg.SpeedButton3Click(Sender: TObject);
begin
close;
end;

procedure Tyjxg.SpeedButton1Click(Sender: TObject);
begin
if yjxg.ComboBox1.Text<>'' then
  begin
    if yfgldata.yj.Locate('编号',yjxg.Edit1.Text,[loCaseInsensitive]) then
      begin
        yfgldata.yj.Edit;
        yfgldata.yj.FieldByName('使用状况').AsString:=yjxg.ComboBox1.Text;
        yfgldata.yj.Post;
      end;
    if yfgldata.kcyj.Locate('编号',yjxg.Edit1.Text,[loCaseInsensitive]) then
      begin
        yfgldata.kcyj.Edit;
        yfgldata.kcyj.FieldByName('使用状况').AsString:=yjxg.ComboBox1.Text;
        yfgldata.kcyj.Post;
      end;
    if yfgldata.dwyj.Locate('编号',yjxg.Edit1.Text,[loCaseInsensitive]) then
      begin
        yfgldata.dwyj.Edit;
        yfgldata.dwyj.FieldByName('使用状况').AsString:=yjxg.ComboBox1.Text;
        yfgldata.dwyj.Post;
      end;
    if yfgldata.grjyyj.Locate('编号',yjxg.Edit1.Text,[loCaseInsensitive]) then
      begin
        yfgldata.grjyyj.Edit;
        yfgldata.grjyyj.FieldByName('使用状况').AsString:=yjxg.ComboBox1.Text;
        yfgldata.grjyyj.Post;
      end;
    yfgldata.Qyj.Active:=false;
    yfgldata.Qyj.Active:=true;
    yfgldata.Qkcyj.Active:=false;
    yfgldata.Qkcyj.Active:=true;
    yfgldata.Qdwyj.Active:=false;
    yfgldata.Qdwyj.Active:=true;
    yfgldata.Qgrjyyj.Active:=false;
    yfgldata.Qgrjyyj.Active:=true;
    close;
  end
else
  messagebox(yjxg.handle,'请选择营具使用状况。','营房工作管理系统',16);
end;

end.

⌨️ 快捷键说明

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