📄 cuperror.pas
字号:
unit CUpError;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ExtCtrls,DB,dbitypes,dbiprocs,dbtables;
type
TFormError = class(TForm)
Panel1: TPanel;
LabelOld: TLabel;
LabelNew: TLabel;
LabelMessage: TLabel;
EditOld: TEdit;
EditNew: TEdit;
ButtonIgnore: TButton;
ButtonRetry: TButton;
ButtonAbort: TButton;
private
{ Private declarations }
public
function ErrorDecision(DataSet : TDataSet; E: EDataBaseError;
UpdateKind: TUpdateKind):TUpdateAction;
{ Public declarations }
end;
var
FormError: TFormError;
implementation
uses unDM2;
{$R *.DFM}
function TFormError.Errordecision(Dataset: TDataSet;
E: EDataBaseError; UpdateKind: TUpdateKind):
TUpdateAction;
const
UpdateKindStr: array[TUpdateKind] of String =('Modify Error',
'Insert Error','Delete Error');
begin
Panel1.caption := UpdateKindStr[UpdateKind];
LabelMessage.Caption := E.Message;
EditOld.text := DM2.qryPieceWork.Fields[0].OldValue;
EditNew.text := DM2.qryPieceWork.Fields[0].NewValue;
ShowModal;
case ModalResult of
mrRetry:
begin
DM2.qryPieceWork.Fields[0].newvalue := EditNew.text;
Result := uaRetry;
end;
mrIgnore: Result := uaSkip;
else
result := uaAbort;
end;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -