lixiaojun
2024-10-26 dd4da9a651330fabe210618581299ac3536bda2f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
using DevExpress.XtraBars.Ribbon;
using DevExpress.XtraEditors;
using Yw.DAL.Basic;
 
namespace Yw.WinFrmUI
{
    public partial class ApplyHydroGradingDlg : XtraForm
    {
        public ApplyHydroGradingDlg()
        {
            InitializeComponent();
            this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon;
            this.layoutControl1.SetupLayoutControl();
        }
 
        /// <summary>
        /// 
        /// </summary>
        public event Action<List<HydroGradingApplyResultViewModel>> ReloadDataEvent;
 
        /// <summary>
        /// 
        /// </summary>
        public void SetBindingData
            (
                Func<Yw.Model.HydroModelInfo> hydroInfoFunc,
                List<HydroGradingApplyViewModel> allApplyList,
                List<IHydroCalcuResult> allCalcuResultList
            )
        {
            this.applyHydroGradingPureCtrl1.SetBindingData(hydroInfoFunc, allApplyList, allCalcuResultList);
        }
 
        //确定
        private async void btnOk_Click(object sender, EventArgs e)
        {
            var allResultList = await this.applyHydroGradingPureCtrl1.GetResultList();
            this.ReloadDataEvent?.Invoke(allResultList);
            this.DialogResult = DialogResult.OK;
            this.Close();
        }
 
    }
}