namespace Yw.WinFrmUI
|
{
|
public partial class ApplyHydroGradingDlg : DevExpress.XtraBars.Ribbon.RibbonForm
|
{
|
public ApplyHydroGradingDlg()
|
{
|
InitializeComponent();
|
this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon;
|
this.layoutControl1.SetupLayoutControl();
|
this.generalOkAndCancelCtrl1.OkEvent += GeneralOkAndCancelCtrl1_OkEvent;
|
}
|
|
/// <summary>
|
/// 重载数据事件
|
/// </summary>
|
public event Action<List<HydroGradingApplyViewModel>> ReloadDataEvent;
|
|
//所有绑定列表
|
private List<HydroGradingApplyViewModel> _allBindingList = null;
|
|
/// <summary>
|
/// 绑定数据
|
/// </summary>
|
public void SetBindingData(List<HydroGradingApplyViewModel> allApplyList)
|
{
|
_allBindingList = allApplyList;
|
this.applyHydroGradingCtrl1.SetBindingData(allApplyList);
|
}
|
|
//确定
|
private void GeneralOkAndCancelCtrl1_OkEvent()
|
{
|
_allBindingList = this.applyHydroGradingCtrl1.GetApplyList();
|
this.ReloadDataEvent?.Invoke(_allBindingList);
|
this.DialogResult = DialogResult.OK;
|
this.Close();
|
}
|
|
|
}
|
}
|