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

📄 climain.pas

📁 《Delphi开发人员指南》配书原码
💻 PAS
字号:
unit CliMain;

interface

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

type
  TForm1 = class(TForm)
    DBGrid1: TDBGrid;
    btnApplyUpdates: TButton;
    btnCancelUpdates: TButton;
    btnRefresh: TButton;
    dsJoin: TDataSource;
    cdsJoin: TClientDataSet;
    DCOMConnection1: TDCOMConnection;
    procedure btnApplyUpdatesClick(Sender: TObject);
    procedure btnCancelUpdatesClick(Sender: TObject);
    procedure btnRefreshClick(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure cdsJoinReconcileError(DataSet: TClientDataSet;
      E: EReconcileError; UpdateKind: TUpdateKind;
      var Action: TReconcileAction);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

uses
  RecError;
  
{$R *.DFM}

procedure TForm1.btnApplyUpdatesClick(Sender: TObject);
begin
  cdsJoin.ApplyUpdates(0);
end;

procedure TForm1.btnCancelUpdatesClick(Sender: TObject);
begin
  cdsJoin.CancelUpdates;
end;

procedure TForm1.btnRefreshClick(Sender: TObject);
begin
  cdsJoin.Refresh;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  cdsJoin.Open;
end;

procedure TForm1.cdsJoinReconcileError(DataSet: TClientDataSet;
  E: EReconcileError; UpdateKind: TUpdateKind;
  var Action: TReconcileAction);
begin
  Action:=HandleReconcileError(Dataset, UpdateKind, E);
end;

end.
 

⌨️ 快捷键说明

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