using DevExpress.XtraEditors;
|
using HStation.Vmo;
|
|
namespace HStation.WinFrmUI
|
{
|
public partial class ImportPumpPerform2dByExcelDlg : XtraForm
|
{
|
public ImportPumpPerform2dByExcelDlg()
|
{
|
InitializeComponent();
|
this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon;
|
this.generalOkAndCancelCtrl1.OkEvent += GeneralOkAndCancelCtrl1_OkEvent;
|
}
|
|
/// <summary>
|
/// 回调事件
|
/// </summary>
|
public event Func<Vmo.PhartDiagramRelationExtensionsVmo, string, string, Task<bool>> ReloadDataEvent;
|
|
//确定
|
private async void GeneralOkAndCancelCtrl1_OkEvent()
|
{
|
var vmo = this.pumpChartExcelImportCtrl1.Get();
|
var ExtensionsVmo = new PhartDiagramRelationExtensionsVmo();
|
ExtensionsVmo.Diagram = vmo;
|
var result = await this.ReloadDataEvent.Invoke(ExtensionsVmo, this.textEditName.Text, this.textEditImportance.Text);
|
if (!result)
|
{
|
XtraMessageBox.Show("导入失败!");
|
return;
|
}
|
XtraMessageBox.Show("导入成功!");
|
this.DialogResult = DialogResult.OK;
|
this.Close();
|
}
|
}
|
}
|