ÎļþÃû´Ó WinFrmUI/HStation.WinFrmUI.Xhs.Project/03-PumpManage/PumpManageCtrl.cs ÐÞ¸Ä |
| | |
| | | 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 = "泵管ç"; |
| | |
| | | this.pumpSeriesTreeListCtrl1.FocusedChangedEvent += PumpSeriesTreeListCtrl1_FocusedChangedEvent; |
| | | } |
| | | |
| | | private readonly List<CurrentViewModel> _allBindingList = new(); |
| | | private readonly List<PumpMainViewModel> _allBindingList = new(); |
| | | |
| | | private PumpMain _bll = null; |
| | | |
| | |
| | | var alllist = await _bll.GetAll(); |
| | | foreach (var item in alllist) |
| | | { |
| | | _allBindingList.Add(new CurrentViewModel(item)); |
| | | _allBindingList.Add(new PumpMainViewModel(item)); |
| | | }*/ |
| | | } |
| | | |
| | |
| | | _allBindingList.Clear(); |
| | | foreach (var item in alllist) |
| | | { |
| | | _allBindingList.Add(new CurrentViewModel(item)); |
| | | _allBindingList.Add(new PumpMainViewModel(item)); |
| | | } |
| | | } |
| | | else |
| | |
| | | _allBindingList.Clear(); |
| | | foreach (var item in alllist) |
| | | { |
| | | _allBindingList.Add(new CurrentViewModel(item)); |
| | | _allBindingList.Add(new PumpMainViewModel(item)); |
| | | } |
| | | } |
| | | } |
| | |
| | | //å¢å |
| | | 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) |
| | |
| | | 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; |
| | | } |
| | |
| | | MessageBoxHelper.ShowWarning("è¯·éæ©æ°æ®è¡ï¼"); |
| | | return; |
| | | } |
| | | var dlg = new EditPumpMainDlg(); |
| | | var dlg = new EditPumpProductMainDlg(); |
| | | dlg.SetBindingData(currentVm.ID); |
| | | dlg.ReloadDataEvent += async (rhs) => |
| | | { |
| | |
| | | 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);*/ |
| | | } |
| | | } |
| | | } |