duheng
2024-06-25 43e88ef24c6b3a7988c495d1740e68e33ce52f84
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
using HStation.Dto;
 
namespace HStation.WinFrmUI.Xhs.Project
{
    public partial class ModelEdit : DevExpress.XtraEditors.XtraForm
    {
        public ModelEdit()
        {
            InitializeComponent();
        }
 
        private BLL.XhsProjectItemModel _BllModel = new BLL.XhsProjectItemModel();
 
        private List<ProjectModelViewModel> _AllBindingList = new List<ProjectModelViewModel>();
 
        /// <summary>
        /// 数据绑定
        /// </summary>
        public async void SetBiningData(long Prjid)
        {
            _AllBindingList.Clear();
            var alllist = await _BllModel.GetByPrjID(Prjid);
            foreach (var item in alllist)
            {
                _AllBindingList.Add(new ProjectModelViewModel(item));
            }
            this.projectModelViewModelBindingSource.DataSource = _AllBindingList;
            this.projectModelViewModelBindingSource.ResetBindings(false);
        }
    }
}