gpt-3.5-turbo-0613· OpenAI
WildChat-4.8M (AI2)
protected virtual void ExecuteDelete(object parameter) { LazyService.Logger.Info("删除数据",…
- User
protected virtual void ExecuteDelete(object parameter) { LazyService.Logger.Info("删除数据", base.Caption);
List<string> cmdList = this.GetDeleteSQLCommand(); if (cmdList.IsNull()) return; string result = LazyService.DataProvider.ExecuteTrans(cmdList); if (result == "成功") { if (this._isShowSuccessDialogAfterDelete) MessageBoxEx.ShowDeleteSuccessHint(LazyService.MainWindow); //触发事件 DeleteDataRowEventHandler eHandler = this.AfterDelete; if (eHandler != null) { DeleteDataRowEventArgs e = new DeleteDataRowEventArgs(this._tableName, this._keyInfo.Clone()); eHandler(this, e); } } else { MessageBoxEx.ShowDeleteFailHint(LazyService.MainWindow, result); } this.InvokeAfterExecuteSaveCommandEvent(EditButtonCommandType.Delete, this._tableName, false, this._keyInfo.Clone()); }代码转为 ts
- Assistant
protected executeDelete(parameter: any) { LazyService.Logger.Info("删除数据", base.Caption);
const cmdList: Array<string> = this.getDeleteSQLCommand(); if (cmdList == null) return; const result: string = LazyService.DataProvider.ExecuteTrans(cmdList); if (result == "成功") { if (this._isShowSuccessDialogAfterDelete) MessageBoxEx.ShowDeleteSuccessHint(LazyService.MainWindow); //触发事件 const eHandler: DeleteDataRowEventHandler = this.AfterDelete; if (eHandler != null) { const e: DeleteDataRowEventArgs = new DeleteDataRowEventArgs(this._tableName, this._keyInfo.Clone()); eHandler(this, e); } } else { MessageBoxEx.ShowDeleteFailHint(LazyService.MainWindow, result); } this.InvokeAfterExecuteSaveCommandEvent(EditButtonCommandType.Delete, this._tableName, false, this._keyInfo.Clone()); }