SVN-Revision: r445
This commit is contained in:
tdx
2025-04-05 13:34:17 +00:00
parent 9cafae5f0a
commit e21b913f31
2 changed files with 26 additions and 0 deletions
+18
View File
@@ -167,7 +167,9 @@ namespace Lskj.PubBomImport
frmProgress.StartImportInQDFile(dirPath); frmProgress.StartImportInQDFile(dirPath);
}; };
frmProgress.ImportTimer.Enabled = true; frmProgress.ImportTimer.Enabled = true;
frmProgress.OnImportCallBack += OnImportCallBack;
frmProgress.ShowDialog(); frmProgress.ShowDialog();
frmProgress.Dispose(); frmProgress.Dispose();
} }
else else
@@ -211,6 +213,22 @@ namespace Lskj.PubBomImport
this.Dispose(); this.Dispose();
} }
} }
/// <summary>
/// 导入后关闭回调
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnImportCallBack(object sender, EventArgs e)
{
FormDialogModel dialogModel = new FormDialogModel()
{
DialogDllName = "Lskj.PubBomImport.dll",
PubDialogType = DialogType.PubAddRecord,
ReturnTag = Model.ShowType
};
this.Tag = dialogModel;
}
/// <summary> /// <summary>
/// 读取按钮点击 /// 读取按钮点击
/// </summary> /// </summary>
@@ -43,6 +43,10 @@ namespace Lskj.PubBomImport
/// </summary> /// </summary>
public partial class FrmProgress : Form public partial class FrmProgress : Form
{ {
/// <summary>
/// Occurs when [on add record call back].
/// </summary>
public event EventHandler OnImportCallBack;
public FrmMain frmMain; public FrmMain frmMain;
public DynamicBomImport Model; public DynamicBomImport Model;
public System.Windows.Forms.Timer ImportTimer = new System.Windows.Forms.Timer(); public System.Windows.Forms.Timer ImportTimer = new System.Windows.Forms.Timer();
@@ -568,6 +572,8 @@ namespace Lskj.PubBomImport
} }
finally finally
{ {
if (this.OnImportCallBack != null)
this.OnImportCallBack(null, null);
this.DialogResult = DialogResult.OK; this.DialogResult = DialogResult.OK;
this.Close(); this.Close();
ImportTimer?.Dispose(); ImportTimer?.Dispose();
@@ -657,6 +663,8 @@ namespace Lskj.PubBomImport
} }
finally finally
{ {
if (this.OnImportCallBack != null)
this.OnImportCallBack(null, null);
this.DialogResult = DialogResult.OK; this.DialogResult = DialogResult.OK;
this.Close(); this.Close();
ImportTimer?.Dispose(); ImportTimer?.Dispose();