udm_ysbzjpx_pxjh.pas

来自「运输培训管理束)录像等四个按钮。 [Conferencing_Vidio_s」· PAS 代码 · 共 58 行

PAS
58
字号
unit uDm_ysbZjpx_pxjh;

interface

uses
  SysUtils, Classes, DB, ADODB,dialogs,windows;

type
  TDm_ysbZjpx_pxjh = class(TDataModule)
    dst_pxjh: TADODataSet;
    dst_pxjhyyyymm: TStringField;
    dst_pxjhpxnr: TBlobField;
  private
    { Private declarations }
  public
    procedure cx(yyyymm:string);
    function New(yyyymm:string): Boolean;
    { Public declarations }
  end;

var
  Dm_ysbZjpx_pxjh: TDm_ysbZjpx_pxjh;

implementation

uses uDm_YsbZjpx;

procedure TDm_ysbZjpx_pxjh.cx(yyyymm:string);
begin
  with dst_pxjh do
  begin
    close;
    parameters.ParamByName('s_yyyymm').Value:=yyyymm;
    open;
  end;
end;

function TDm_ysbZjpx_pxjh.New(yyyymm:string): Boolean;
begin
  cx(yyyymm);
  if dst_pxjh.IsEmpty then
  begin
    dst_pxjh.Insert;
    dst_pxjh.FieldByName('yyyymm').Value:=yyyymm;
    result:=true;
  end
  else
  begin
    showmessage( PChar(copy(yyyymm,1,4)+'年'+copy(yyyymm,5,2)+'月数据已存在!'));
    result:=false;
  end;

end;


{$R *.dfm}
end.

⌨️ 快捷键说明

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