duheng
2024-04-15 154d4c352b9ab06a925451f1fdcea6afd1701e10
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
45
using DevExpress.XtraEditors;
using System;
using System.Windows.Forms;
 
namespace ISupply.WinFrm.Main
{
    /// <summary>
    /// 设置排序码
    /// </summary>
    public partial class SetSortCodeDlg : XtraForm
    {
        public SetSortCodeDlg()
        {
            InitializeComponent();
        }
 
        /// <summary>
        /// 回调事件
        /// </summary>
        public event Func<int, bool> ReloadDataEvent;
 
 
        public void SetBindingData(int sortcode)
        {
            this.txtSortCode.EditValue = sortcode;
        }
 
 
 
 
        private void btnOk_Click(object sender, EventArgs e)
        {
            if (this.ReloadDataEvent.Invoke(Convert.ToInt32(this.txtSortCode.EditValue)))
            {
                XtraMessageBox.Show("修改成功!");
            }
            else
            {
                XtraMessageBox.Show("修改失败!");
                return;
            }
            this.Close();
        }
    }
}