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

📄 wz_ck_cfrm.pas

📁 关于利用DELPHI来进行企业级方案解决的著作的附书源码
💻 PAS
字号:
unit WZ_CK_cFRM;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  Db, DBClient, MConnect, Mask, DBCtrls, StdCtrls, DBCGrids, ExtCtrls,
  Grids, DBGrids;

type
  TCKForm = class(TForm)
    DBNavigator1: TDBNavigator;
    Edit1: TEdit;
    Button1: TButton;
    DBCtrlGrid1: TDBCtrlGrid;
    DBGrid1: TDBGrid;
    Panel1: TPanel;
    Label18: TLabel;
    Shape1: TShape;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    Label5: TLabel;
    Label7: TLabel;
    Label8: TLabel;
    Label9: TLabel;
    Label10: TLabel;
    Label11: TLabel;
    Label12: TLabel;
    Shape2: TShape;
    Shape3: TShape;
    Shape4: TShape;
    Shape5: TShape;
    Shape6: TShape;
    Shape7: TShape;
    Shape8: TShape;
    Shape9: TShape;
    DBText1: TDBText;
    DBText2: TDBText;
    Label6: TLabel;
    Label13: TLabel;
    Label14: TLabel;
    Label16: TLabel;
    Label17: TLabel;
    DBText3: TDBText;
    DBText4: TDBText;
    DBText5: TDBText;
    DBText6: TDBText;
    Bevel1: TBevel;
    DBEdit1: TDBEdit;
    DBEdit2: TDBEdit;
    DBEdit3: TDBEdit;
    DBEdit4: TDBEdit;
    DBEdit5: TDBEdit;
    DBEdit6: TDBEdit;
    DBEdit7: TDBEdit;
    DBEdit8: TDBEdit;
    DBMemo1: TDBMemo;
    Button2: TButton;
    procedure Button1Click(Sender: TObject);
    procedure ClientDataSet1AfterPost(DataSet: TDataSet);
    procedure ClientDataSet1ReconcileError(DataSet: TClientDataSet;
      E: EReconcileError; UpdateKind: TUpdateKind;
      var Action: TReconcileAction);
    procedure FormCreate(Sender: TObject);
    procedure FormActivate(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    
  public
    myState:integer;{ Public declarations }
  end;

var
  CKForm: TCKForm;

implementation

{$R *.DFM}
uses
 WZ_LogIn_cFRM,
 WZ_CK_cDM;


procedure TCKForm.ClientDataSet1AfterPost(DataSet: TDataSet);
begin
  Edit1.Text := IntToStr(cDataModule.ClientDataSet1.ChangeCount);
end;
        
procedure TCKForm.Button1Click(Sender: TObject);
begin
  cDataModule.ClientDataSet1.ApplyUpdates(0);
  Edit1.Text := '0';
end;

procedure TCKForm.ClientDataSet1ReconcileError(DataSet: TClientDataSet;
  E: EReconcileError; UpdateKind: TUpdateKind;
  var Action: TReconcileAction);
begin
  ShowMessage(e.Context);
  ShowMessage(e.Message);
end;

procedure TCKForm.FormCreate(Sender: TObject);
begin
    with cDataModule do
    begin
     if not LOGINConnection1.Connected then
        LOGINConnection1.Connected := True;
     LogInForm:=TLogInForm.Create(application);
     LogInForm.ShowModal;
     myState:=LogInForm.state;
     LogInForm.Free;
     case myState of
       0:begin
         application.MessageBox('退出系统!','非法用户!',0);
         application.Terminate;
         exit;
         end;
       1:CKForm.caption:='出库——填单';
       2:CKForm.caption:='出库——发货';
     end;
    end;
end;

procedure TCKForm.FormActivate(Sender: TObject);
begin
  with cDataModule do
  begin
    if not CKConnection1.Connected then CKConnection1.Connected := True;
    CKConnection1.AppServer.setState(myState);
    ClientDataSet1.Open;
  end;
end;

procedure TCKForm.Button2Click(Sender: TObject);
begin
    close;
end;

end.

⌨️ 快捷键说明

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