using DevExpress.XtraEditors;
|
using System;
|
using System.Windows.Forms;
|
|
namespace Yw.WinFrmUI.Phart
|
{
|
/// <summary>
|
/// 设置排序码
|
/// </summary>
|
public partial class PickEqupPointDlg : XtraForm
|
{
|
public PickEqupPointDlg()
|
{
|
InitializeComponent();
|
}
|
|
/// <summary>
|
/// 回调事件
|
/// </summary>
|
public event Func<double, bool> ReloadDataEvent;
|
|
|
//验证
|
private bool Valid()
|
{
|
this.dxErrorProvider1.ClearErrors();
|
if (string.IsNullOrEmpty(this.txtEta.Text.Trim()))
|
{
|
this.dxErrorProvider1.SetError(this.txtEta, "必填项");
|
return false;
|
}
|
return true;
|
}
|
|
//确定
|
private void btnOk_Click(object sender, EventArgs e)
|
{
|
if (!Valid())
|
return;
|
this.ReloadDataEvent.Invoke(double.Parse(this.txtEta.Text));
|
/*if (this.ReloadDataEvent != null)
|
{
|
var result = this.ReloadDataEvent.Invoke(int.Parse(this.txEta.Text));
|
if (result)
|
{
|
XtraMessageBox.Show("设置成功!");
|
}
|
else
|
{
|
XtraMessageBox.Show("设置失败!");
|
return;
|
}
|
}*/
|
this.DialogResult = DialogResult.OK;
|
this.Close();
|
}
|
|
}
|
}
|