duheng
2024-07-10 2a41fffc9f962999ba163c3b471873b6b96f05bc
WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/PumpProductMainPanel.cs
ÎļþÃû´Ó WinFrmUI/HStation.WinFrmUI.Xhs.Project/03-PumpManage/PumpManageCtrl.cs ÐÞ¸Ä
@@ -1,14 +1,14 @@
using HStation.BLL;
using HStation.Dto;
using HStation.WinFrmUI.Xhs.Project;
using HStation.WinFrmUI.Xhs.PumpProduct;
using Mapster;
using SQLitePCL;
namespace HStation.WinFrmUI.Xhs
{
    public partial class PumpManageCtrl : DocumentPage
    public partial class PumpProductMainPanel : DocumentPage
    {
        public PumpManageCtrl()
        public PumpProductMainPanel()
        {
            InitializeComponent();
            this.PageTitle.Caption = "泵管理";
@@ -17,7 +17,7 @@
            this.pumpSeriesTreeListCtrl1.FocusedChangedEvent += PumpSeriesTreeListCtrl1_FocusedChangedEvent;
        }
        private readonly List<CurrentViewModel> _allBindingList = new();
        private readonly List<PumpMainViewModel> _allBindingList = new();
        private PumpMain _bll = null;
@@ -36,7 +36,7 @@
                var alllist = await _bll.GetAll();
                foreach (var item in alllist)
                {
                    _allBindingList.Add(new CurrentViewModel(item));
                    _allBindingList.Add(new PumpMainViewModel(item));
                }*/
        }
@@ -50,7 +50,7 @@
                _allBindingList.Clear();
                foreach (var item in alllist)
                {
                    _allBindingList.Add(new CurrentViewModel(item));
                    _allBindingList.Add(new PumpMainViewModel(item));
                }
            }
            else
@@ -62,7 +62,7 @@
                    _allBindingList.Clear();
                    foreach (var item in alllist)
                    {
                        _allBindingList.Add(new CurrentViewModel(item));
                        _allBindingList.Add(new PumpMainViewModel(item));
                    }
                }
            }
@@ -72,7 +72,7 @@
        //增加
        private void BtnAdd_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            var dlg = new AddPumpMainDlg();
            var dlg = new AddPumpProductMainDlg();
            //系列ID
            var id = this.pumpSeriesTreeListCtrl1.GetCurrentID();
            if (id <= 0)
@@ -93,7 +93,7 @@
                if (id > 0)
                {
                    var model = await _bll.GetByID(id);
                    _allBindingList.Add(new CurrentViewModel(model));
                    _allBindingList.Add(new PumpMainViewModel(model));
                    this.currentViewModelBindingSource.ResetBindings(false);
                    return true;
                }
@@ -111,7 +111,7 @@
                MessageBoxHelper.ShowWarning("请选择数据行!");
                return;
            }
            var dlg = new EditPumpMainDlg();
            var dlg = new EditPumpProductMainDlg();
            dlg.SetBindingData(currentVm.ID);
            dlg.ReloadDataEvent += async (rhs) =>
            {
@@ -170,10 +170,10 @@
                var model = await _bll.GetByID(currentVm.ID);
                if (model != null)
                {
                    var page = new ModelManageCtrl(model);
                    page.PageTitle.Caption = guid.Function;
                    page.SurfaceGuid = guid;
                    CreatePage(page, guid);
                    /*    var page = new ModelManageCtrl(model);
                        page.PageTitle.Caption = guid.Function;
                        page.SurfaceGuid = guid;
                        CreatePage(page, guid);*/
                }
            }
        }