From 185565a8eb30c0546746aad52aac0926d395a76d Mon Sep 17 00:00:00 2001 From: qin <a@163.com> Date: 星期五, 14 三月 2025 11:01:41 +0800 Subject: [PATCH] Merge branch 'master' of http://47.103.154.90:83/r/HStation/XHS.V1.0 --- Dto/PBS.Dto/02-facility/FacilityDto.cs | 16 WinFrmUI/PBS.WinFrmUI.WE/WaterUtensil/WaterUtensilMgr.resx | 4 BLL/PBS.BLL.WE/01-interface/03-catalogue/ICatalogueMapping.cs | 2 WinFrmUI/PBS.WinFrmUI.WE/WaterUtensil/WaterUtensilMgr.designer.cs | 43 + WinFrmUI/PBS.WinFrmUI/02-facility/FacilityMgrPage.Designer.cs | 9 Dto/PBS.Dto/01-place/AddPlaceInput.cs | 5 WinFrmUI/PBS.WinFrmUI.WE/WaterWE/EditWaterUtensilDlg.designer.cs | 90 +- WinFrmUI/PBS.WinFrmUI/01-place/EditPlaceDlg.cs | 133 ++++ Vmo/PBS.Vmo/02-facility/FacilityVmo.cs | 6 WinFrmUI/PBS.WinFrmUI/01-place/AddPlaceDlg.resx | 3 Dto/PBS.Dto/01-place/UpdatePlaceInput.cs | 4 WinFrmUI/PBS.WinFrmUI/02-facility/00-core/FacilityViewModel.cs | 15 WinFrmUI/PBS.WinFrmUI/01-place/PlaceMgrPage.Designer.cs | 11 WinFrmUI/PBS.WinFrmUI/01-place/PlaceMgrPage.cs | 24 BLL/PBS.BLL.WE/03-localclient/03-catalogue/CatalogueMapping.cs | 6 WinFrmUI/PBS.WinFrmUI/02-facility/00-core/FacilitiesCtrl.cs | 79 +- Service/PBS.Service/01-entity/02-facility/Facility.cs | 6 WinFrmUI/PBS.WinFrmUI/02-facility/EditFacilityDlg.cs | 42 + Dto/PBS.Dto/02-facility/UpdateFacilityInput.cs | 10 WinFrmUI/PBS.WinFrmUI/01-place/00-core/PlaceViewModel.cs | 6 WinFrmUI/PBS.WinFrmUI/01-place/00-core/BuildWizardForm.cs | 33 - WinFrmUI/Yw.WinFrmUI.Division.Core/01-division/DivisionMainPage.designer.cs | 33 WinFrmUI/PBS.WinFrmUI.WE/WaterWE/EditWaterUtensilDlg.resx | 6 WinFrmUI/PBS.WinFrmUI/01-place/AddPlaceDlg.Designer.cs | 9 WinFrmUI/PBS.WinFrmUI/02-facility/AddFacilityDlg.Designer.cs | 56 BLL/PBS.BLL.WE/02-httpclient/03-catalogue/CatalogueMapping.cs | 2 WinFrmUI/PBS.WinFrmUI.WE/WaterWE/WaterEquivalentMgr.resx | 6 WinFrmUI/PBS.WinFrmUI/02-facility/EditFacilityDlg.resx | 0 WinFrmUI/PBS.WinFrmUI/PBS.WinFrmUI.csproj | 8 Service/PBS.Service/02-model/02-facility/Facility.cs | 6 WinFrmUI/PBS.WinFrmUI/01-place/EditPlaceDlg.resx | 123 +++ WinFrmUI/PBS.WinFrmUI/02-facility/AddFacilityDlg.cs | 39 + /dev/null | 51 - WinFrmUI/PBS.WinFrmUI/02-facility/EditFacilityDlg.Designer.cs | 64 +- WinFrmUI/PBS.WinFrmUI.WE/WaterWE/WaterEquivalentMgr.designer.cs | 75 + WinFrmUI/PBS.WinFrmUI/01-place/AddPlaceDlg.cs | 15 BLL/PBS.BLL.WE/04-bll/03-catalogue/CatalogueMapping.cs | 4 WinFrmUI/PBS.WinFrmUI/01-place/EditPlaceDlg.Designer.cs | 319 ++++++++++ WinFrmUI/PBS.WinFrmUI.WE/WaterUtensil/WaterUtensilMgr.cs | 79 -- WinFrmUI/PBS.WinFrmUI.WE/WaterWE/EditWaterUtensilDlg.cs | 26 WinFrmUI/PBS.WinFrmUI/01-place/00-core/BuildWizardForm.Designer.cs | 3 WinFrmUI/PBS.WinFrmUI/02-facility/00-core/FacilitiesCtrl.Designer.cs | 268 ++------ WinFrmUI/PBS.WinFrmUI/02-facility/FacilityMgrPage.cs | 25 Dto/PBS.Dto/02-facility/AddFacilityInput.cs | 10 WinFrmUI/PBS.WinFrmUI.WE/WaterWE/WaterEquivalentMgr.cs | 59 + WinFrmUI/PBS.WinFrmUI/02-facility/AddFacilityDlg.resx | 0 46 files changed, 1,230 insertions(+), 603 deletions(-) diff --git a/BLL/PBS.BLL.WE/01-interface/03-catalogue/ICatalogueMapping.cs b/BLL/PBS.BLL.WE/01-interface/03-catalogue/ICatalogueMapping.cs index cd3cdea..5bf4f9a 100644 --- a/BLL/PBS.BLL.WE/01-interface/03-catalogue/ICatalogueMapping.cs +++ b/BLL/PBS.BLL.WE/01-interface/03-catalogue/ICatalogueMapping.cs @@ -7,6 +7,6 @@ ///</summary> public interface ICatalogueMapping : IBaseCAL<AddCatalogueMappingInput, UpdateCatalogueMappingInput, CatalogueMappingDto> { - public Task<CatalogueMappingDto> GetByCatalogueID(long CatalogueID); + public Task<List<CatalogueMappingDto>> GetByCatalogueID(long CatalogueID); } } \ No newline at end of file diff --git a/BLL/PBS.BLL.WE/02-httpclient/03-catalogue/CatalogueMapping.cs b/BLL/PBS.BLL.WE/02-httpclient/03-catalogue/CatalogueMapping.cs index 786d6f4..6c3b9a6 100644 --- a/BLL/PBS.BLL.WE/02-httpclient/03-catalogue/CatalogueMapping.cs +++ b/BLL/PBS.BLL.WE/02-httpclient/03-catalogue/CatalogueMapping.cs @@ -12,7 +12,7 @@ get { return $"{ConfigHelper.HttpUrl}/CatalogueMapping"; } } - public Task<CatalogueMappingDto> GetByCatalogueID(long CatalogueID) + public Task<List<CatalogueMappingDto>> GetByCatalogueID(long CatalogueID) { throw new NotImplementedException(); } diff --git a/BLL/PBS.BLL.WE/03-localclient/03-catalogue/CatalogueMapping.cs b/BLL/PBS.BLL.WE/03-localclient/03-catalogue/CatalogueMapping.cs index 6b39962..fda2742 100644 --- a/BLL/PBS.BLL.WE/03-localclient/03-catalogue/CatalogueMapping.cs +++ b/BLL/PBS.BLL.WE/03-localclient/03-catalogue/CatalogueMapping.cs @@ -37,13 +37,13 @@ /// <summary> /// 閫氳繃 鐩綍ID 鑾峰彇 /// </summary> - public async Task<CatalogueMappingDto> GetByCatalogueID(long CatalogueID) + public async Task<List<CatalogueMappingDto>> GetByCatalogueID(long CatalogueID) { return await Task.Factory.StartNew(() => { var list = _service.GetAll(); - var select = list.Find(x => x.CatalogueID == CatalogueID); - return select == null ? null : new CatalogueMappingDto(select); + var select = list.Where(x => x.CatalogueID == CatalogueID).ToList(); + return select == null ? null : select?.Select(x => new CatalogueMappingDto(x)).ToList(); }); } diff --git a/BLL/PBS.BLL.WE/04-bll/03-catalogue/CatalogueMapping.cs b/BLL/PBS.BLL.WE/04-bll/03-catalogue/CatalogueMapping.cs index ce465c0..df1374f 100644 --- a/BLL/PBS.BLL.WE/04-bll/03-catalogue/CatalogueMapping.cs +++ b/BLL/PBS.BLL.WE/04-bll/03-catalogue/CatalogueMapping.cs @@ -30,10 +30,10 @@ /// <summary> /// 閫氳繃 鐩綍ID 鑾峰彇 /// </summary> - public async Task<Vmo.WE.CatalogueMappingVmo> GetByCatalogueID(long CatalogueID) + public async Task<List<Vmo.WE.CatalogueMappingVmo>> GetByCatalogueID(long CatalogueID) { var dto = await _cal.GetByCatalogueID(CatalogueID); - return Dto2Vmo(dto); + return Dto2Vmos(dto); } /// <summary> diff --git a/Dto/PBS.Dto/01-place/AddPlaceInput.cs b/Dto/PBS.Dto/01-place/AddPlaceInput.cs index c4d322a..3d12c35 100644 --- a/Dto/PBS.Dto/01-place/AddPlaceInput.cs +++ b/Dto/PBS.Dto/01-place/AddPlaceInput.cs @@ -36,6 +36,11 @@ public string Address { get; set; } /// <summary> + /// 浣跨敤鐘舵�� + ///</summary> + public Yw.Model.eUseStatus UseStatus { get; set; } + + /// <summary> /// 鍙傛暟 ///</summary> public Dictionary<string, string> Paras { get; set; } diff --git a/Dto/PBS.Dto/01-place/UpdatePlaceInput.cs b/Dto/PBS.Dto/01-place/UpdatePlaceInput.cs index 95b0afd..3ad741d 100644 --- a/Dto/PBS.Dto/01-place/UpdatePlaceInput.cs +++ b/Dto/PBS.Dto/01-place/UpdatePlaceInput.cs @@ -40,6 +40,10 @@ /// 鍦板潃 ///</summary> public string Address { get; set; } + /// <summary> + /// 浣跨敤鐘舵�� + ///</summary> + public Yw.Model.eUseStatus UseStatus { get; set; } /// <summary> /// 鍙傛暟 diff --git a/Dto/PBS.Dto/02-facility/AddFacilityInput.cs b/Dto/PBS.Dto/02-facility/AddFacilityInput.cs index c249ec5..d4eec0b 100644 --- a/Dto/PBS.Dto/02-facility/AddFacilityInput.cs +++ b/Dto/PBS.Dto/02-facility/AddFacilityInput.cs @@ -67,6 +67,11 @@ public double? TerminalPressure { get; set; } /// <summary> + /// 鏈�楂樻ゼ灞傛爣楂� + /// </summary> + public double MaxHeight { get; set; } + + /// <summary> /// 鍙傛暟 ///</summary> public Dictionary<string, string> Paras { get; set; } @@ -77,6 +82,11 @@ public List<string> Flags { get; set; } /// <summary> + /// 浣跨敤鐘舵�� + ///</summary> + public Yw.Model.eUseStatus UseStatus { get; set; } + + /// <summary> /// 鏍囧織 ///</summary> public string TagName { get; set; } diff --git a/Dto/PBS.Dto/02-facility/FacilityDto.cs b/Dto/PBS.Dto/02-facility/FacilityDto.cs index 80c3f61..6677dc2 100644 --- a/Dto/PBS.Dto/02-facility/FacilityDto.cs +++ b/Dto/PBS.Dto/02-facility/FacilityDto.cs @@ -30,6 +30,7 @@ this.MaxWaterDemand = rhs.MaxWaterDemand; this.ConstantPressure = rhs.ConstantPressure; this.TerminalPressure = rhs.TerminalPressure; + this.MaxHeight = rhs.MaxHeight; this.Paras = rhs.Paras == null ? null : new(rhs.Paras); this.Flags = rhs.Flags?.ToList(); this.TagName = rhs.TagName; @@ -99,6 +100,16 @@ public double? TerminalPressure { get; set; } /// <summary> + /// 浣跨敤鐘舵�� + ///</summary> + public Yw.Model.eUseStatus UseStatus { get; set; } + + /// <summary> + /// 鏈�楂樻ゼ灞傛爣楂� + /// </summary> + public double MaxHeight { get; set; } + + /// <summary> /// 鍙傛暟 ///</summary> public Dictionary<string, string> Paras { get; set; } @@ -112,11 +123,6 @@ /// 鏍囧織 ///</summary> public string TagName { get; set; } - - /// <summary> - /// 浣跨敤鐘舵�� - ///</summary> - public Yw.Model.eUseStatus UseStatus { get; set; } /// <summary> /// 鎺掑簭鐮� diff --git a/Dto/PBS.Dto/02-facility/UpdateFacilityInput.cs b/Dto/PBS.Dto/02-facility/UpdateFacilityInput.cs index d22a472..a6f81fd 100644 --- a/Dto/PBS.Dto/02-facility/UpdateFacilityInput.cs +++ b/Dto/PBS.Dto/02-facility/UpdateFacilityInput.cs @@ -73,6 +73,16 @@ public double? TerminalPressure { get; set; } /// <summary> + /// 浣跨敤鐘舵�� + ///</summary> + public Yw.Model.eUseStatus UseStatus { get; set; } + + /// <summary> + /// 鏈�楂樻ゼ灞傛爣楂� + /// </summary> + public double MaxHeight { get; set; } + + /// <summary> /// 鍙傛暟 ///</summary> public Dictionary<string, string> Paras { get; set; } diff --git a/Service/PBS.Service/01-entity/02-facility/Facility.cs b/Service/PBS.Service/01-entity/02-facility/Facility.cs index 74db6e0..426b621 100644 --- a/Service/PBS.Service/01-entity/02-facility/Facility.cs +++ b/Service/PBS.Service/01-entity/02-facility/Facility.cs @@ -31,6 +31,7 @@ this.MaxWaterDemand = rhs.MaxWaterDemand; this.ConstantPressure = rhs.ConstantPressure; this.TerminalPressure = rhs.TerminalPressure; + this.MaxHeight = rhs.MaxHeight; this.Paras = rhs.Paras; this.Flags = rhs.Flags; this.TagName = rhs.TagName; @@ -96,6 +97,11 @@ public double TerminalPressure { get; set; } /// <summary> + /// 鏈�楂樻ゼ灞傛爣楂� + /// </summary> + public double MaxHeight { get; set; } + + /// <summary> /// 鍙傛暟 ///</summary> [SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = true)] diff --git a/Service/PBS.Service/02-model/02-facility/Facility.cs b/Service/PBS.Service/02-model/02-facility/Facility.cs index 89c8101..80ec282 100644 --- a/Service/PBS.Service/02-model/02-facility/Facility.cs +++ b/Service/PBS.Service/02-model/02-facility/Facility.cs @@ -55,6 +55,7 @@ this.MaxWaterDemand = rhs.MaxWaterDemand; this.ConstantPressure = rhs.ConstantPressure; this.TerminalPressure = rhs.TerminalPressure; + this.MaxHeight = rhs.MaxHeight; this.Paras = rhs.Paras == null ? null : new(rhs.Paras); this.Flags = rhs.Flags?.ToList(); this.TagName = rhs.TagName; @@ -119,6 +120,11 @@ public double? TerminalPressure { get; set; } /// <summary> + /// 鏈�楂樻ゼ灞傛爣楂� + /// </summary> + public double MaxHeight { get; set; } + + /// <summary> /// 鍙傛暟 ///</summary> public Dictionary<string, string> Paras { get; set; } diff --git a/Vmo/PBS.Vmo/02-facility/FacilityVmo.cs b/Vmo/PBS.Vmo/02-facility/FacilityVmo.cs index 5a7d857..4c60026 100644 --- a/Vmo/PBS.Vmo/02-facility/FacilityVmo.cs +++ b/Vmo/PBS.Vmo/02-facility/FacilityVmo.cs @@ -31,6 +31,7 @@ this.ConstantPressure = rhs.ConstantPressure; this.TerminalPressure = rhs.TerminalPressure; this.Paras = rhs.Paras == null ? null : new(rhs.Paras); + this.MaxHeight = rhs.MaxHeight; this.Flags = rhs.Flags?.ToList(); this.TagName = rhs.TagName; this.UseStatus = (Yw.Vmo.eUseStatus)(int)rhs.UseStatus; @@ -99,6 +100,11 @@ public double? TerminalPressure { get; set; } /// <summary> + /// 鏈�楂樻ゼ灞傛爣楂� + /// </summary> + public double MaxHeight { get; set; } + + /// <summary> /// 鍙傛暟 ///</summary> public Dictionary<string, string> Paras { get; set; } diff --git a/WinFrmUI/PBS.WinFrmUI.WE/WaterUtensil/WaterUtensilMgr.cs b/WinFrmUI/PBS.WinFrmUI.WE/WaterUtensil/WaterUtensilMgr.cs index 4aba262..937e64a 100644 --- a/WinFrmUI/PBS.WinFrmUI.WE/WaterUtensil/WaterUtensilMgr.cs +++ b/WinFrmUI/PBS.WinFrmUI.WE/WaterUtensil/WaterUtensilMgr.cs @@ -163,84 +163,6 @@ } /// <summary> - /// 鏍囩鍚嶇О - /// </summary> - private void barBtnUpdateTagName_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) - { - /* var vm = this.gridView1.GetCurrentViewModel(_allBindingList); - if (vm == null) - { - MessageBoxHelper.ShowWarning("璇烽�夋嫨鏁版嵁琛岋紒"); - return; - } - var dlg = new SetTagNameDlg(); - dlg.SetBindingData(vm.TagName); - dlg.ReloadDataEvent += (tagName) => - { - var result = _bll.UpdateTagName(vm.UserID, tagName); - if (result) - { - vm.TagName = tagName; - this.gridView1.RefreshRow(this.gridView1.FocusedRowHandle); - } - return result; - }; - dlg.ShowDialog();*/ - } - - /// <summary> - /// 鎺掑簭鐮� - /// </summary> - private void barBtnUpdateSortCode_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) - { - /* var vm = this.gridView1.GetCurrentViewModel(_allBindingList); - if (vm == null) - { - MessageBoxHelper.ShowWarning("璇烽�夋嫨鏁版嵁琛岋紒"); - return; - } - var dlg = new SetSortCodeDlg(); - dlg.SetBindingData(vm.SortCode); - dlg.ReloadDataEvent += (sortCode) => - { - var result = _bll.UpdateSortCode(vm.UserID, sortCode); - if (result) - { - vm.SortCode = sortCode; - this.currentViewModelBindingSource.ResetBindings(false); - } - return result; - }; - dlg.ShowDialog();*/ - } - - /// <summary> - /// 浣跨敤鐘舵�� - /// </summary> - private void barBtnUpdateUseStatus_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) - { - /* var vm = this.gridView1.GetCurrentViewModel(_allBindingList); - if (vm == null) - { - MessageBoxHelper.ShowWarning("璇烽�夋嫨鏁版嵁琛岋紒"); - return; - } - var dlg = new SetUseStatusDlg(); - dlg.SetBindingData(vm.UseStatus); - dlg.ReloadDataEvent += (useStatus) => - { - var result = _bll.UpdateUseStatus(vm.UserID, (int)useStatus); - if (result) - { - vm.UseStatus = useStatus; - this.gridView1.RefreshRow(this.gridView1.FocusedRowHandle); - } - return result; - }; - dlg.ShowDialog();*/ - } - - /// <summary> /// 妫�绱� /// </summary> private void barCekSearch_CheckedChanged(object sender, DevExpress.XtraBars.ItemClickEventArgs e) @@ -260,5 +182,6 @@ } #endregion 浜嬩欢 + } } \ No newline at end of file diff --git a/WinFrmUI/PBS.WinFrmUI.WE/WaterUtensil/WaterUtensilMgr.designer.cs b/WinFrmUI/PBS.WinFrmUI.WE/WaterUtensil/WaterUtensilMgr.designer.cs index 255ce48..8f4b415 100644 --- a/WinFrmUI/PBS.WinFrmUI.WE/WaterUtensil/WaterUtensilMgr.designer.cs +++ b/WinFrmUI/PBS.WinFrmUI.WE/WaterUtensil/WaterUtensilMgr.designer.cs @@ -86,17 +86,19 @@ dockPanel5.Dock = DevExpress.XtraBars.Docking.DockingStyle.Left; dockPanel5.ID = new Guid("d6e238bd-07a7-4505-ad80-881552a2b63c"); dockPanel5.Location = new Point(0, 0); + dockPanel5.Margin = new Padding(3, 4, 3, 4); dockPanel5.Name = "dockPanel5"; dockPanel5.OriginalSize = new Size(200, 200); - dockPanel5.Size = new Size(200, 696); + dockPanel5.Size = new Size(200, 895); dockPanel5.Text = "鐢ㄦ按鍣ㄥ叿缁�"; // // dockPanel5_Container // dockPanel5_Container.Controls.Add(utensilGroupCtrl1); - dockPanel5_Container.Location = new Point(3, 26); + dockPanel5_Container.Location = new Point(4, 32); + dockPanel5_Container.Margin = new Padding(3, 4, 3, 4); dockPanel5_Container.Name = "dockPanel5_Container"; - dockPanel5_Container.Size = new Size(193, 667); + dockPanel5_Container.Size = new Size(190, 859); dockPanel5_Container.TabIndex = 0; // // utensilGroupCtrl1 @@ -105,8 +107,9 @@ utensilGroupCtrl1.Appearance.Options.UseBackColor = true; utensilGroupCtrl1.Dock = DockStyle.Fill; utensilGroupCtrl1.Location = new Point(0, 0); + utensilGroupCtrl1.Margin = new Padding(3, 5, 3, 5); utensilGroupCtrl1.Name = "utensilGroupCtrl1"; - utensilGroupCtrl1.Size = new Size(193, 667); + utensilGroupCtrl1.Size = new Size(190, 859); utensilGroupCtrl1.TabIndex = 0; // // sidePanel1 @@ -115,8 +118,9 @@ sidePanel1.Controls.Add(ribbonControl1); sidePanel1.Dock = DockStyle.Fill; sidePanel1.Location = new Point(200, 0); + sidePanel1.Margin = new Padding(3, 4, 3, 4); sidePanel1.Name = "sidePanel1"; - sidePanel1.Size = new Size(675, 696); + sidePanel1.Size = new Size(800, 895); sidePanel1.TabIndex = 22; sidePanel1.Text = "sidePanel1"; // @@ -124,68 +128,85 @@ // gridControl1.DataSource = waterUtensilViewModelBindingSource; gridControl1.Dock = DockStyle.Fill; - gridControl1.Location = new Point(0, 77); + gridControl1.EmbeddedNavigator.Margin = new Padding(3, 4, 3, 4); + gridControl1.Location = new Point(0, 128); gridControl1.MainView = gridView1; + gridControl1.Margin = new Padding(3, 4, 3, 4); gridControl1.Name = "gridControl1"; - gridControl1.Size = new Size(675, 619); + gridControl1.Size = new Size(800, 767); gridControl1.TabIndex = 21; gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { gridView1 }); // // gridView1 // gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { colName, colRatedFlow, colMinRatedFlow, colTagName, colDescription }); + gridView1.DetailHeight = 450; gridView1.GridControl = gridControl1; gridView1.Name = "gridView1"; + gridView1.OptionsEditForm.PopupEditFormWidth = 914; // // colName // colName.FieldName = "Name"; + colName.MinWidth = 23; colName.Name = "colName"; colName.Visible = true; colName.VisibleIndex = 0; + colName.Width = 86; // // colRatedFlow // colRatedFlow.FieldName = "RatedFlow"; + colRatedFlow.MinWidth = 23; colRatedFlow.Name = "colRatedFlow"; colRatedFlow.Visible = true; colRatedFlow.VisibleIndex = 1; + colRatedFlow.Width = 86; // // colMinRatedFlow // colMinRatedFlow.FieldName = "MinRatedFlow"; + colMinRatedFlow.MinWidth = 23; colMinRatedFlow.Name = "colMinRatedFlow"; colMinRatedFlow.Visible = true; colMinRatedFlow.VisibleIndex = 2; + colMinRatedFlow.Width = 86; // // colTagName // colTagName.FieldName = "TagName"; + colTagName.MinWidth = 23; colTagName.Name = "colTagName"; colTagName.Visible = true; colTagName.VisibleIndex = 3; + colTagName.Width = 86; // // colDescription // colDescription.FieldName = "Description"; + colDescription.MinWidth = 23; colDescription.Name = "colDescription"; colDescription.Visible = true; colDescription.VisibleIndex = 4; + colDescription.Width = 86; // // ribbonControl1 // ribbonControl1.DrawGroupsBorderMode = DevExpress.Utils.DefaultBoolean.False; + ribbonControl1.EmptyAreaImageOptions.ImagePadding = new Padding(34, 39, 34, 39); ribbonControl1.ExpandCollapseItem.Id = 0; ribbonControl1.ItemPanelStyle = DevExpress.XtraBars.Ribbon.RibbonItemPanelStyle.Classic; ribbonControl1.Items.AddRange(new DevExpress.XtraBars.BarItem[] { ribbonControl1.ExpandCollapseItem, barBtnAdd, barBtnEdit, barBtnRefresh, barBtnDelete, barBtnUpdateSortCode, barBtnDetail, barBtnUpdateTagName, barBtnUpdateUseStatus, barCekSearch }); ribbonControl1.Location = new Point(0, 0); + ribbonControl1.Margin = new Padding(3, 4, 3, 4); ribbonControl1.MaxItemId = 26; ribbonControl1.Name = "ribbonControl1"; + ribbonControl1.OptionsMenuMinWidth = 377; ribbonControl1.Pages.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPage[] { ribbonPage }); ribbonControl1.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.False; ribbonControl1.ShowExpandCollapseButton = DevExpress.Utils.DefaultBoolean.False; ribbonControl1.ShowPageHeadersMode = DevExpress.XtraBars.Ribbon.ShowPageHeadersMode.Hide; - ribbonControl1.Size = new Size(675, 77); + ribbonControl1.Size = new Size(800, 128); ribbonControl1.ToolbarLocation = DevExpress.XtraBars.Ribbon.RibbonQuickAccessToolbarLocation.Hidden; // // barBtnAdd @@ -258,6 +279,7 @@ barCekSearch.Id = 25; barCekSearch.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barCekSearch.ImageOptions.SvgImage"); barCekSearch.Name = "barCekSearch"; + barCekSearch.ItemClick += barCekSearch_CheckedChanged; // // ribbonPage // @@ -288,12 +310,13 @@ // Appearance.BackColor = SystemColors.Control; Appearance.Options.UseBackColor = true; - AutoScaleDimensions = new SizeF(7F, 14F); + AutoScaleDimensions = new SizeF(8F, 18F); AutoScaleMode = AutoScaleMode.Font; Controls.Add(sidePanel1); Controls.Add(dockPanel5); + Margin = new Padding(3, 5, 3, 5); Name = "WaterUtensilMainPage"; - Size = new Size(875, 696); + Size = new Size(1000, 895); ((ISupportInitialize)waterUtensilViewModelBindingSource).EndInit(); ((ISupportInitialize)dockManager1).EndInit(); dockPanel5.ResumeLayout(false); diff --git a/WinFrmUI/PBS.WinFrmUI.WE/WaterUtensil/WaterUtensilMgr.resx b/WinFrmUI/PBS.WinFrmUI.WE/WaterUtensil/WaterUtensilMgr.resx index 3b84708..bf0e36e 100644 --- a/WinFrmUI/PBS.WinFrmUI.WE/WaterUtensil/WaterUtensilMgr.resx +++ b/WinFrmUI/PBS.WinFrmUI.WE/WaterUtensil/WaterUtensilMgr.resx @@ -1,7 +1,7 @@ 锘�<?xml version="1.0" encoding="utf-8"?> <root> <!-- - Microsoft ResX Schema + Microsoft ResX Schema Version 2.0 @@ -48,7 +48,7 @@ value : The object must be serialized with : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter : and then encoded with base64 encoding. - + mimetype: application/x-microsoft.net.object.soap.base64 value : The object must be serialized with : System.Runtime.Serialization.Formatters.Soap.SoapFormatter diff --git a/WinFrmUI/PBS.WinFrmUI.WE/WaterWE/EditWaterUtensilDlg.cs b/WinFrmUI/PBS.WinFrmUI.WE/WaterWE/EditWaterUtensilDlg.cs index c7c6a8a..9e29467 100644 --- a/WinFrmUI/PBS.WinFrmUI.WE/WaterWE/EditWaterUtensilDlg.cs +++ b/WinFrmUI/PBS.WinFrmUI.WE/WaterWE/EditWaterUtensilDlg.cs @@ -1,4 +1,6 @@ -锘縰sing Yw.WinFrmUI; +锘縰sing DevExpress.XtraEditors; +using System.Data; +using Yw.WinFrmUI; namespace PBS.WinFrmUI.WE { @@ -27,7 +29,7 @@ private PBS.Vmo.WE.ItemVmo _model = null; - private List<PBS.Vmo.WE.UtensilVmo> AllUtensilList = null; + private List<PBS.Vmo.WE.UtensilVmo> _allUtensilList = null; private PBS.Vmo.WE.CatalogueMappingVmo _CatalogueMappingVmo; @@ -37,8 +39,8 @@ public async void SetBindingData(PBS.Vmo.WE.ItemVmo item, long CatalogueID) { _allBindingList = new List<ItemViewModel>(); - var utensilList = await new PBS.BLL.WE.Utensil().GetAll(); - this.repositoryItemTreeListLookUpEdit1.DataSource = utensilList; + _allUtensilList = await new PBS.BLL.WE.Utensil().GetAll(); + this.repositoryItemTreeListLookUpEdit1.DataSource = _allUtensilList; if (item == null) { _CatalogueMappingVmo = new PBS.Vmo.WE.CatalogueMappingVmo(); @@ -125,5 +127,21 @@ _allBindingList.Remove(row); this.itemViewModelBindingSource.ResetBindings(false); } + + private void repositoryItemTreeListLookUpEdit1_EditValueChanged(object sender, EventArgs e) + { // 鑾峰彇褰撳墠閫変腑椤圭殑鍊� + TreeListLookUpEdit edit = sender as TreeListLookUpEdit; + if (edit != null && edit.EditValue != null) + { + // 鑾峰彇閫変腑椤圭殑 ID + long selectedID = Convert.ToInt64(edit.EditValue); + var select = _allUtensilList.Find(x => x.ID == selectedID); + if (select != null) + { + gridView1.SetFocusedRowCellValue("RatedFlow", select.RatedFlow); + gridView1.SetFocusedRowCellValue("MinRatedFlow", select.MinRatedFlow); + } + } + } } } \ No newline at end of file diff --git a/WinFrmUI/PBS.WinFrmUI.WE/WaterWE/EditWaterUtensilDlg.designer.cs b/WinFrmUI/PBS.WinFrmUI.WE/WaterWE/EditWaterUtensilDlg.designer.cs index 2c7e27f..ad7ab18 100644 --- a/WinFrmUI/PBS.WinFrmUI.WE/WaterWE/EditWaterUtensilDlg.designer.cs +++ b/WinFrmUI/PBS.WinFrmUI.WE/WaterWE/EditWaterUtensilDlg.designer.cs @@ -35,12 +35,12 @@ private void InitializeComponent() { components = new Container(); - DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions1 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions(); + DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions2 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions(); ComponentResourceManager resources = new ComponentResourceManager(typeof(EditWaterWEDlg)); - SerializableAppearanceObject serializableAppearanceObject1 = new SerializableAppearanceObject(); - SerializableAppearanceObject serializableAppearanceObject2 = new SerializableAppearanceObject(); - SerializableAppearanceObject serializableAppearanceObject3 = new SerializableAppearanceObject(); - SerializableAppearanceObject serializableAppearanceObject4 = new SerializableAppearanceObject(); + SerializableAppearanceObject serializableAppearanceObject5 = new SerializableAppearanceObject(); + SerializableAppearanceObject serializableAppearanceObject6 = new SerializableAppearanceObject(); + SerializableAppearanceObject serializableAppearanceObject7 = new SerializableAppearanceObject(); + SerializableAppearanceObject serializableAppearanceObject8 = new SerializableAppearanceObject(); dataLayoutControl1 = new DevExpress.XtraDataLayout.DataLayoutControl(); gridControl1 = new DevExpress.XtraGrid.GridControl(); itemViewModelBindingSource = new BindingSource(components); @@ -92,21 +92,24 @@ dataLayoutControl1.Controls.Add(textEditName); dataLayoutControl1.Dock = DockStyle.Fill; dataLayoutControl1.Location = new Point(0, 0); + dataLayoutControl1.Margin = new Padding(3, 4, 3, 4); dataLayoutControl1.Name = "dataLayoutControl1"; dataLayoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new Rectangle(900, 230, 650, 400); dataLayoutControl1.Root = Root; - dataLayoutControl1.Size = new Size(672, 392); + dataLayoutControl1.Size = new Size(768, 504); dataLayoutControl1.TabIndex = 0; dataLayoutControl1.Text = "dataLayoutControl1"; // // gridControl1 // gridControl1.DataSource = itemViewModelBindingSource; - gridControl1.Location = new Point(12, 36); + gridControl1.EmbeddedNavigator.Margin = new Padding(3, 5, 3, 5); + gridControl1.Location = new Point(13, 46); gridControl1.MainView = gridView1; + gridControl1.Margin = new Padding(3, 4, 3, 4); gridControl1.Name = "gridControl1"; gridControl1.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] { repositoryItemTreeListLookUpEdit1, repositoryItemButtonEdit1 }); - gridControl1.Size = new Size(648, 318); + gridControl1.Size = new Size(742, 409); gridControl1.TabIndex = 6; gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { gridView1 }); // @@ -119,6 +122,7 @@ gridView1.Appearance.HeaderPanel.Options.UseTextOptions = true; gridView1.Appearance.HeaderPanel.TextOptions.HAlignment = HorzAlignment.Center; gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { gridColumn2, gridColumn1, colPumpID, colUserCount, ColDelete }); + gridView1.DetailHeight = 450; gridView1.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus; gridView1.GridControl = gridControl1; gridView1.Name = "gridView1"; @@ -126,6 +130,7 @@ gridView1.OptionsCustomization.AllowFilter = false; gridView1.OptionsCustomization.AllowQuickHideColumns = false; gridView1.OptionsCustomization.AllowSort = false; + gridView1.OptionsEditForm.PopupEditFormWidth = 914; gridView1.OptionsMenu.EnableColumnMenu = false; gridView1.OptionsMenu.EnableFooterMenu = false; gridView1.OptionsView.NewItemRowPosition = DevExpress.XtraGrid.Views.Grid.NewItemRowPosition.Bottom; @@ -136,19 +141,21 @@ // gridColumn2.Caption = "鏈�灏忛瀹氭祦閲�"; gridColumn2.FieldName = "MinRatedFlow"; + gridColumn2.MinWidth = 23; gridColumn2.Name = "gridColumn2"; gridColumn2.Visible = true; gridColumn2.VisibleIndex = 2; - gridColumn2.Width = 164; + gridColumn2.Width = 187; // // gridColumn1 // gridColumn1.Caption = "棰濆畾娴侀噺"; gridColumn1.FieldName = "RatedFlow"; + gridColumn1.MinWidth = 23; gridColumn1.Name = "gridColumn1"; gridColumn1.Visible = true; gridColumn1.VisibleIndex = 1; - gridColumn1.Width = 139; + gridColumn1.Width = 159; // // colPumpID // @@ -157,10 +164,11 @@ colPumpID.Caption = "鐢ㄦ按鍣ㄥ叿"; colPumpID.ColumnEdit = repositoryItemTreeListLookUpEdit1; colPumpID.FieldName = "UtensilID"; + colPumpID.MinWidth = 23; colPumpID.Name = "colPumpID"; colPumpID.Visible = true; colPumpID.VisibleIndex = 0; - colPumpID.Width = 305; + colPumpID.Width = 349; // // repositoryItemTreeListLookUpEdit1 // @@ -172,23 +180,28 @@ repositoryItemTreeListLookUpEdit1.NullText = ""; repositoryItemTreeListLookUpEdit1.TreeList = treeList1; repositoryItemTreeListLookUpEdit1.ValueMember = "ID"; + repositoryItemTreeListLookUpEdit1.EditValueChanged += repositoryItemTreeListLookUpEdit1_EditValueChanged; // // treeList1 // treeList1.Columns.AddRange(new DevExpress.XtraTreeList.Columns.TreeListColumn[] { treeListColumn1 }); treeList1.Location = new Point(-111, -28); + treeList1.MinWidth = 23; treeList1.Name = "treeList1"; treeList1.OptionsView.ShowIndentAsRowStyle = true; treeList1.Size = new Size(400, 200); treeList1.TabIndex = 0; + treeList1.TreeLevelWidth = 21; // // treeListColumn1 // treeListColumn1.Caption = "鐢ㄦ按鍣ㄥ叿"; treeListColumn1.FieldName = "Name"; + treeListColumn1.MinWidth = 23; treeListColumn1.Name = "treeListColumn1"; treeListColumn1.Visible = true; treeListColumn1.VisibleIndex = 0; + treeListColumn1.Width = 86; // // colUserCount // @@ -196,10 +209,11 @@ colUserCount.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center; colUserCount.Caption = "浣跨敤鏁伴噺"; colUserCount.FieldName = "UtensilCount"; + colUserCount.MinWidth = 23; colUserCount.Name = "colUserCount"; colUserCount.Visible = true; colUserCount.VisibleIndex = 3; - colUserCount.Width = 123; + colUserCount.Width = 141; // // ColDelete // @@ -207,17 +221,19 @@ ColDelete.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center; ColDelete.Caption = "鍒犻櫎"; ColDelete.ColumnEdit = repositoryItemButtonEdit1; + ColDelete.MinWidth = 23; ColDelete.Name = "ColDelete"; ColDelete.OptionsColumn.AllowEdit = false; ColDelete.Visible = true; ColDelete.VisibleIndex = 4; - ColDelete.Width = 126; + ColDelete.Width = 144; // // repositoryItemButtonEdit1 // repositoryItemButtonEdit1.AutoHeight = false; - editorButtonImageOptions1.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("editorButtonImageOptions1.SvgImage"); - repositoryItemButtonEdit1.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "", -1, true, true, false, editorButtonImageOptions1, new KeyShortcut(Keys.None), serializableAppearanceObject1, serializableAppearanceObject2, serializableAppearanceObject3, serializableAppearanceObject4, "", null, null, ToolTipAnchor.Default) }); + editorButtonImageOptions2.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("editorButtonImageOptions2.SvgImage"); + editorButtonImageOptions2.SvgImageSize = new Size(25, 25); + repositoryItemButtonEdit1.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "", -1, true, true, false, editorButtonImageOptions2, new KeyShortcut(Keys.None), serializableAppearanceObject5, serializableAppearanceObject6, serializableAppearanceObject7, serializableAppearanceObject8, "", null, null, ToolTipAnchor.Default) }); repositoryItemButtonEdit1.Name = "repositoryItemButtonEdit1"; repositoryItemButtonEdit1.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.HideTextEditor; // @@ -225,9 +241,10 @@ // btnOk.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Primary; btnOk.Appearance.Options.UseBackColor = true; - btnOk.Location = new Point(483, 358); + btnOk.Location = new Point(552, 461); + btnOk.Margin = new Padding(3, 4, 3, 4); btnOk.Name = "btnOk"; - btnOk.Size = new Size(91, 22); + btnOk.Size = new Size(105, 27); btnOk.StyleController = dataLayoutControl1; btnOk.TabIndex = 7; btnOk.Text = "纭畾"; @@ -238,18 +255,20 @@ btnCancel.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Warning; btnCancel.Appearance.Options.UseBackColor = true; btnCancel.DialogResult = DialogResult.Cancel; - btnCancel.Location = new Point(578, 358); + btnCancel.Location = new Point(661, 461); + btnCancel.Margin = new Padding(3, 4, 3, 4); btnCancel.Name = "btnCancel"; - btnCancel.Size = new Size(82, 22); + btnCancel.Size = new Size(94, 27); btnCancel.StyleController = dataLayoutControl1; btnCancel.TabIndex = 8; btnCancel.Text = "鍙栨秷"; // // textEditName // - textEditName.Location = new Point(83, 12); + textEditName.Location = new Point(100, 16); + textEditName.Margin = new Padding(3, 4, 3, 4); textEditName.Name = "textEditName"; - textEditName.Size = new Size(577, 20); + textEditName.Size = new Size(655, 24); textEditName.StyleController = dataLayoutControl1; textEditName.TabIndex = 10; // @@ -261,7 +280,7 @@ Root.GroupBordersVisible = false; Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlGroup1 }); Root.Name = "Root"; - Root.Size = new Size(672, 392); + Root.Size = new Size(768, 504); Root.TextVisible = false; // // layoutControlGroup1 @@ -271,32 +290,32 @@ layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem1, layoutControlItem2, emptySpaceItem1, layoutControlItem4, layoutControlItem3 }); layoutControlGroup1.Location = new Point(0, 0); layoutControlGroup1.Name = "autoGeneratedGroup0"; - layoutControlGroup1.Size = new Size(652, 372); + layoutControlGroup1.Size = new Size(746, 478); // // layoutControlItem1 // layoutControlItem1.Control = btnCancel; - layoutControlItem1.Location = new Point(566, 346); + layoutControlItem1.Location = new Point(648, 445); layoutControlItem1.Name = "layoutControlItem1"; - layoutControlItem1.Size = new Size(86, 26); + layoutControlItem1.Size = new Size(98, 33); layoutControlItem1.TextSize = new Size(0, 0); layoutControlItem1.TextVisible = false; // // layoutControlItem2 // layoutControlItem2.Control = btnOk; - layoutControlItem2.Location = new Point(471, 346); + layoutControlItem2.Location = new Point(539, 445); layoutControlItem2.Name = "layoutControlItem2"; - layoutControlItem2.Size = new Size(95, 26); + layoutControlItem2.Size = new Size(109, 33); layoutControlItem2.TextSize = new Size(0, 0); layoutControlItem2.TextVisible = false; // // emptySpaceItem1 // emptySpaceItem1.AllowHotTrack = false; - emptySpaceItem1.Location = new Point(0, 346); + emptySpaceItem1.Location = new Point(0, 445); emptySpaceItem1.Name = "emptySpaceItem1"; - emptySpaceItem1.Size = new Size(471, 26); + emptySpaceItem1.Size = new Size(539, 33); emptySpaceItem1.TextSize = new Size(0, 0); // // layoutControlItem4 @@ -305,16 +324,16 @@ layoutControlItem4.Control = textEditName; layoutControlItem4.Location = new Point(0, 0); layoutControlItem4.Name = "layoutControlItem4"; - layoutControlItem4.Size = new Size(652, 24); + layoutControlItem4.Size = new Size(746, 30); layoutControlItem4.Text = "<color=red>*</color>鍣ㄥ叿鍚嶇О:"; - layoutControlItem4.TextSize = new Size(59, 14); + layoutControlItem4.TextSize = new Size(73, 18); // // layoutControlItem3 // layoutControlItem3.Control = gridControl1; - layoutControlItem3.Location = new Point(0, 24); + layoutControlItem3.Location = new Point(0, 30); layoutControlItem3.Name = "layoutControlItem3"; - layoutControlItem3.Size = new Size(652, 322); + layoutControlItem3.Size = new Size(746, 415); layoutControlItem3.TextSize = new Size(0, 0); layoutControlItem3.TextVisible = false; // @@ -324,10 +343,11 @@ // // EditWaterWEDlg // - AutoScaleDimensions = new SizeF(7F, 14F); + AutoScaleDimensions = new SizeF(8F, 18F); AutoScaleMode = AutoScaleMode.Font; - ClientSize = new Size(672, 392); + ClientSize = new Size(768, 504); Controls.Add(dataLayoutControl1); + Margin = new Padding(3, 4, 3, 4); Name = "EditWaterWEDlg"; StartPosition = FormStartPosition.CenterParent; Text = "缂栬緫"; diff --git a/WinFrmUI/PBS.WinFrmUI.WE/WaterWE/EditWaterUtensilDlg.resx b/WinFrmUI/PBS.WinFrmUI.WE/WaterWE/EditWaterUtensilDlg.resx index a0fd17c..edc566e 100644 --- a/WinFrmUI/PBS.WinFrmUI.WE/WaterWE/EditWaterUtensilDlg.resx +++ b/WinFrmUI/PBS.WinFrmUI.WE/WaterWE/EditWaterUtensilDlg.resx @@ -1,7 +1,7 @@ 锘�<?xml version="1.0" encoding="utf-8"?> <root> <!-- - Microsoft ResX Schema + Microsoft ResX Schema Version 2.0 @@ -48,7 +48,7 @@ value : The object must be serialized with : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter : and then encoded with base64 encoding. - + mimetype: application/x-microsoft.net.object.soap.base64 value : The object must be serialized with : System.Runtime.Serialization.Formatters.Soap.SoapFormatter @@ -121,7 +121,7 @@ <value>172, 17</value> </metadata> <assembly alias="DevExpress.Data.v23.2" name="DevExpress.Data.v23.2, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> - <data name="editorButtonImageOptions1.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <data name="editorButtonImageOptions2.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value> AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl diff --git a/WinFrmUI/PBS.WinFrmUI.WE/WaterWE/WaterEquivalentMgr.cs b/WinFrmUI/PBS.WinFrmUI.WE/WaterWE/WaterEquivalentMgr.cs index 82629fd..002b0f4 100644 --- a/WinFrmUI/PBS.WinFrmUI.WE/WaterWE/WaterEquivalentMgr.cs +++ b/WinFrmUI/PBS.WinFrmUI.WE/WaterWE/WaterEquivalentMgr.cs @@ -30,22 +30,25 @@ private async void GroupTreeListCtrl1_ReloadEvent(long catalogueID) { _allBindingList.Clear(); - var model = await new PBS.BLL.WE.CatalogueMapping().GetByCatalogueID(catalogueID); - if (model != null) + var modelList = await new PBS.BLL.WE.CatalogueMapping().GetByCatalogueID(catalogueID); + if (modelList != null) { - var itemModel = await _bll.GetByID(model.ItemID); - if (itemModel != null) + foreach (var model in modelList) { - var utensilList = await new PBS.BLL.WE.UtensilMapping().GetByItemID(itemModel.ID); - if (utensilList != null) + var itemModel = await _bll.GetByID(model.ItemID); + if (itemModel != null) { - _allBindingList.Clear(); - foreach (var item in utensilList) + var utensilList = await new PBS.BLL.WE.UtensilMapping().GetByItemID(itemModel.ID); + if (utensilList != null) { - var utensil = await new PBS.BLL.WE.Utensil().GetByID(item.UtensilID); - if (utensil != null) + //_allBindingList.Clear(); + foreach (var item in utensilList) { - _allBindingList.Add(new ItemViewModel(itemModel, item, utensil.Name)); + var utensil = await new PBS.BLL.WE.Utensil().GetByID(item.UtensilID); + if (utensil != null) + { + _allBindingList.Add(new ItemViewModel(itemModel, item, utensil.Name)); + } } } } @@ -97,7 +100,7 @@ PBS.Vmo.WE.ItemVmo itemVmo = null; if (model != null) { - itemVmo = await new PBS.BLL.WE.Item().GetByID(model.ItemID); + // itemVmo = await new PBS.BLL.WE.Item().GetByID(model.ItemID); } dlg.SetBindingData(itemVmo, catalogueID); dlg.ReloadDataEvent += async (item, catalogue, mappingList) => @@ -161,23 +164,23 @@ } //鍒犻櫎 - private void barBtnDelete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + private async void barBtnDelete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { - /* var vm = this.gridView1.GetCurrentViewModel(_allBindingList); - if (vm == null) - { - MessageBoxHelper.ShowWarning("璇烽�夋嫨鏁版嵁琛�!"); - return; - } - if (MessageBoxHelper.IsClickOk($"纭鍒犻櫎鏁版嵁琛�?")) - return; - if (_bllWaterEquivalent.DeleteByID(vm.UserID, out string msg)) - { - MessageBoxHelper.ShowSuccess("鍒犻櫎鎴愬姛!"); - _allBindingList.Remove(vm); - this.currentViewModelBindingSource.ResetBindings(false); - } - else MessageBoxHelper.ShowError($"鍒犻櫎澶辫触!\n{msg}");*/ + var vm = this.gridView1.GetCurrentViewModel(_allBindingList); + if (vm == null) + { + MessageBoxHelper.ShowWarning("璇烽�夋嫨鏁版嵁琛�!"); + return; + } + if (MessageBoxHelper.IsClickOk($"纭鍒犻櫎鏁版嵁琛�?")) + return; + if (await _bll.DeleteByID(vm.ID)) + { + MessageBoxHelper.ShowSuccess("鍒犻櫎鎴愬姛!"); + _allBindingList.Remove(vm); + this.itemViewModelBindingSource.ResetBindings(false); + } + else MessageBoxHelper.ShowError($"鍒犻櫎澶辫触!"); } } } \ No newline at end of file diff --git a/WinFrmUI/PBS.WinFrmUI.WE/WaterWE/WaterEquivalentMgr.designer.cs b/WinFrmUI/PBS.WinFrmUI.WE/WaterWE/WaterEquivalentMgr.designer.cs index 54f49dd..432a08e 100644 --- a/WinFrmUI/PBS.WinFrmUI.WE/WaterWE/WaterEquivalentMgr.designer.cs +++ b/WinFrmUI/PBS.WinFrmUI.WE/WaterWE/WaterEquivalentMgr.designer.cs @@ -46,6 +46,8 @@ ribbonControl1 = new DevExpress.XtraBars.Ribbon.RibbonControl(); barBtnRefresh = new DevExpress.XtraBars.BarButtonItem(); barCekSearch = new DevExpress.XtraBars.BarCheckItem(); + barBtnSetting = new DevExpress.XtraBars.BarButtonItem(); + BtnDelete = new DevExpress.XtraBars.BarButtonItem(); ribbonPage = new DevExpress.XtraBars.Ribbon.RibbonPage(); ribbonPageGroup1 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup(); dockManager1 = new DevExpress.XtraBars.Docking.DockManager(components); @@ -55,7 +57,6 @@ barBtnEdit = new DevExpress.XtraBars.BarButtonItem(); barBtnAdd = new DevExpress.XtraBars.BarButtonItem(); barBtnSave = new DevExpress.XtraBars.BarButtonItem(); - barBtnSetting = new DevExpress.XtraBars.BarButtonItem(); ((ISupportInitialize)gridControl1).BeginInit(); ((ISupportInitialize)itemViewModelBindingSource).BeginInit(); ((ISupportInitialize)gridView1).BeginInit(); @@ -69,10 +70,12 @@ // gridControl1.DataSource = itemViewModelBindingSource; gridControl1.Dock = DockStyle.Fill; - gridControl1.Location = new Point(200, 77); + gridControl1.EmbeddedNavigator.Margin = new Padding(3, 4, 3, 4); + gridControl1.Location = new Point(200, 128); gridControl1.MainView = gridView1; + gridControl1.Margin = new Padding(3, 4, 3, 4); gridControl1.Name = "gridControl1"; - gridControl1.Size = new Size(618, 604); + gridControl1.Size = new Size(735, 748); gridControl1.TabIndex = 18; gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { gridView1 }); // @@ -85,67 +88,84 @@ gridView1.Appearance.HeaderPanel.Options.UseTextOptions = true; gridView1.Appearance.HeaderPanel.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { colName, colUtensilName, colUtensilCount, colRatedFlow, colMinRatedFlow, colDescription }); + gridView1.DetailHeight = 450; gridView1.GridControl = gridControl1; gridView1.Name = "gridView1"; gridView1.OptionsBehavior.Editable = false; gridView1.OptionsDetail.EnableMasterViewMode = false; + gridView1.OptionsEditForm.PopupEditFormWidth = 914; // // colName // colName.FieldName = "Name"; + colName.MinWidth = 23; colName.Name = "colName"; colName.Visible = true; colName.VisibleIndex = 0; + colName.Width = 86; // // colUtensilName // colUtensilName.FieldName = "UtensilName"; + colUtensilName.MinWidth = 23; colUtensilName.Name = "colUtensilName"; colUtensilName.Visible = true; colUtensilName.VisibleIndex = 1; + colUtensilName.Width = 86; // // colUtensilCount // colUtensilCount.FieldName = "UtensilCount"; + colUtensilCount.MinWidth = 23; colUtensilCount.Name = "colUtensilCount"; colUtensilCount.Visible = true; colUtensilCount.VisibleIndex = 2; + colUtensilCount.Width = 86; // // colRatedFlow // colRatedFlow.FieldName = "RatedFlow"; + colRatedFlow.MinWidth = 23; colRatedFlow.Name = "colRatedFlow"; colRatedFlow.Visible = true; colRatedFlow.VisibleIndex = 3; + colRatedFlow.Width = 86; // // colMinRatedFlow // colMinRatedFlow.FieldName = "MinRatedFlow"; + colMinRatedFlow.MinWidth = 23; colMinRatedFlow.Name = "colMinRatedFlow"; colMinRatedFlow.Visible = true; colMinRatedFlow.VisibleIndex = 4; + colMinRatedFlow.Width = 86; // // colDescription // colDescription.FieldName = "Description"; + colDescription.MinWidth = 23; colDescription.Name = "colDescription"; colDescription.Visible = true; colDescription.VisibleIndex = 5; + colDescription.Width = 86; // // ribbonControl1 // ribbonControl1.DrawGroupsBorderMode = DevExpress.Utils.DefaultBoolean.False; + ribbonControl1.EmptyAreaImageOptions.ImagePadding = new Padding(34, 39, 34, 39); ribbonControl1.ExpandCollapseItem.Id = 0; ribbonControl1.ItemPanelStyle = DevExpress.XtraBars.Ribbon.RibbonItemPanelStyle.Classic; - ribbonControl1.Items.AddRange(new DevExpress.XtraBars.BarItem[] { ribbonControl1.ExpandCollapseItem, barBtnRefresh, barCekSearch, barBtnSetting }); + ribbonControl1.Items.AddRange(new DevExpress.XtraBars.BarItem[] { ribbonControl1.ExpandCollapseItem, barBtnRefresh, barCekSearch, barBtnSetting, BtnDelete }); ribbonControl1.Location = new Point(0, 0); - ribbonControl1.MaxItemId = 30; + ribbonControl1.Margin = new Padding(3, 4, 3, 4); + ribbonControl1.MaxItemId = 32; ribbonControl1.Name = "ribbonControl1"; + ribbonControl1.OptionsMenuMinWidth = 377; ribbonControl1.Pages.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPage[] { ribbonPage }); ribbonControl1.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.False; ribbonControl1.ShowExpandCollapseButton = DevExpress.Utils.DefaultBoolean.False; ribbonControl1.ShowPageHeadersMode = DevExpress.XtraBars.Ribbon.ShowPageHeadersMode.Hide; - ribbonControl1.Size = new Size(818, 77); + ribbonControl1.Size = new Size(935, 128); ribbonControl1.ToolbarLocation = DevExpress.XtraBars.Ribbon.RibbonQuickAccessToolbarLocation.Hidden; // // barBtnRefresh @@ -164,6 +184,21 @@ barCekSearch.Name = "barCekSearch"; barCekSearch.CheckedChanged += barCekSearch_CheckedChanged; // + // barBtnSetting + // + barBtnSetting.Caption = "璁剧疆"; + barBtnSetting.Id = 29; + barBtnSetting.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnSetting.ImageOptions.SvgImage"); + barBtnSetting.Name = "barBtnSetting"; + barBtnSetting.ItemClick += barBtnEdit_ItemClick; + // + // BtnDelete + // + BtnDelete.Caption = "鍒犻櫎"; + BtnDelete.Id = 31; + BtnDelete.Name = "BtnDelete"; + BtnDelete.ItemClick += barBtnDelete_ItemClick; + // // ribbonPage // ribbonPage.Groups.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageGroup[] { ribbonPageGroup1 }); @@ -175,6 +210,7 @@ ribbonPageGroup1.ItemLinks.Add(barBtnSetting); ribbonPageGroup1.ItemLinks.Add(barCekSearch); ribbonPageGroup1.ItemLinks.Add(barBtnRefresh); + ribbonPageGroup1.ItemLinks.Add(BtnDelete); ribbonPageGroup1.Name = "ribbonPageGroup1"; ribbonPageGroup1.Text = "鍩虹"; // @@ -190,19 +226,21 @@ dockPanel1.Controls.Add(dockPanel1_Container); dockPanel1.Dock = DevExpress.XtraBars.Docking.DockingStyle.Left; dockPanel1.ID = new Guid("583d6725-09f6-4943-a6d1-8cf0d94f9044"); - dockPanel1.Location = new Point(0, 77); + dockPanel1.Location = new Point(0, 128); + dockPanel1.Margin = new Padding(3, 4, 3, 4); dockPanel1.Name = "dockPanel1"; dockPanel1.Options.ShowCloseButton = false; dockPanel1.OriginalSize = new Size(200, 200); - dockPanel1.Size = new Size(200, 604); + dockPanel1.Size = new Size(200, 748); dockPanel1.Text = "褰撻噺鐩綍"; // // dockPanel1_Container // dockPanel1_Container.Controls.Add(catalogueCtrl1); - dockPanel1_Container.Location = new Point(0, 23); + dockPanel1_Container.Location = new Point(0, 28); + dockPanel1_Container.Margin = new Padding(3, 4, 3, 4); dockPanel1_Container.Name = "dockPanel1_Container"; - dockPanel1_Container.Size = new Size(199, 581); + dockPanel1_Container.Size = new Size(199, 720); dockPanel1_Container.TabIndex = 0; // // catalogueCtrl1 @@ -211,8 +249,9 @@ catalogueCtrl1.Appearance.Options.UseBackColor = true; catalogueCtrl1.Dock = DockStyle.Fill; catalogueCtrl1.Location = new Point(0, 0); + catalogueCtrl1.Margin = new Padding(3, 5, 3, 5); catalogueCtrl1.Name = "catalogueCtrl1"; - catalogueCtrl1.Size = new Size(199, 581); + catalogueCtrl1.Size = new Size(199, 720); catalogueCtrl1.TabIndex = 0; // // barBtnEdit @@ -238,25 +277,18 @@ barBtnSave.Name = "barBtnSave"; barBtnSave.Visibility = DevExpress.XtraBars.BarItemVisibility.Never; // - // barBtnSetting - // - barBtnSetting.Caption = "璁剧疆"; - barBtnSetting.Id = 29; - barBtnSetting.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barButtonItem1.ImageOptions.SvgImage"); - barBtnSetting.Name = "barBtnSetting"; - barBtnSetting.ItemClick += barBtnEdit_ItemClick; - // // WaterWEMgr // Appearance.BackColor = SystemColors.Control; Appearance.Options.UseBackColor = true; - AutoScaleDimensions = new SizeF(7F, 14F); + AutoScaleDimensions = new SizeF(8F, 18F); AutoScaleMode = AutoScaleMode.Font; Controls.Add(gridControl1); Controls.Add(dockPanel1); Controls.Add(ribbonControl1); + Margin = new Padding(3, 5, 3, 5); Name = "WaterWEMgr"; - Size = new Size(818, 681); + Size = new Size(935, 876); ((ISupportInitialize)gridControl1).EndInit(); ((ISupportInitialize)itemViewModelBindingSource).EndInit(); ((ISupportInitialize)gridView1).EndInit(); @@ -291,5 +323,6 @@ private DevExpress.XtraBars.BarButtonItem barBtnEdit; private DevExpress.XtraBars.BarButtonItem barBtnAdd; private DevExpress.XtraBars.BarButtonItem barBtnSave; + private DevExpress.XtraBars.BarButtonItem BtnDelete; } } diff --git a/WinFrmUI/PBS.WinFrmUI.WE/WaterWE/WaterEquivalentMgr.resx b/WinFrmUI/PBS.WinFrmUI.WE/WaterWE/WaterEquivalentMgr.resx index 344f784..3618e73 100644 --- a/WinFrmUI/PBS.WinFrmUI.WE/WaterWE/WaterEquivalentMgr.resx +++ b/WinFrmUI/PBS.WinFrmUI.WE/WaterWE/WaterEquivalentMgr.resx @@ -1,7 +1,7 @@ 锘�<?xml version="1.0" encoding="utf-8"?> <root> <!-- - Microsoft ResX Schema + Microsoft ResX Schema Version 2.0 @@ -48,7 +48,7 @@ value : The object must be serialized with : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter : and then encoded with base64 encoding. - + mimetype: application/x-microsoft.net.object.soap.base64 value : The object must be serialized with : System.Runtime.Serialization.Formatters.Soap.SoapFormatter @@ -168,7 +168,7 @@ QmxhY2siIC8+DQogIDwvZz4NCjwvc3ZnPgs= </value> </data> - <data name="barButtonItem1.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <data name="barBtnSetting.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value> AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl diff --git a/WinFrmUI/PBS.WinFrmUI/01-place/00-core/BuildWizardForm.Designer.cs b/WinFrmUI/PBS.WinFrmUI/01-place/00-core/BuildWizardForm.Designer.cs index a13743a..79499ea 100644 --- a/WinFrmUI/PBS.WinFrmUI/01-place/00-core/BuildWizardForm.Designer.cs +++ b/WinFrmUI/PBS.WinFrmUI/01-place/00-core/BuildWizardForm.Designer.cs @@ -300,8 +300,7 @@ Margin = new Padding(2, 3, 2, 3); Name = "BuildWizardForm"; Size = new Size(925, 321); - Load += BuildWizardForm_Load; - ((System.ComponentModel.ISupportInitialize)layoutControl1).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControl1).EndInit(); layoutControl1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)cbPropertyType.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)txtCompletionTime.Properties).EndInit(); diff --git a/WinFrmUI/PBS.WinFrmUI/01-place/00-core/BuildWizardForm.cs b/WinFrmUI/PBS.WinFrmUI/01-place/00-core/BuildWizardForm.cs index 55d08ba..f96a06d 100644 --- a/WinFrmUI/PBS.WinFrmUI/01-place/00-core/BuildWizardForm.cs +++ b/WinFrmUI/PBS.WinFrmUI/01-place/00-core/BuildWizardForm.cs @@ -42,8 +42,7 @@ TotalHouseHolds = string.IsNullOrEmpty(txtTotalHouseHolds.Text) ? 0 : int.Parse(txtTotalHouseHolds.Text) };*/ var m = new PlaceBuildParasInfo(); - - // 澶勭悊 AreaSquare + // 澶勭悊 AreaSquare if (string.IsNullOrEmpty(txtAreaSquare.Text) || !decimal.TryParse(txtAreaSquare.Text, out decimal areaSquare)) { m.AreaSquare = decimal.Zero; @@ -121,35 +120,5 @@ // cbDist.EditValue = model.Dist; } - private void BuildWizardForm_Load(object sender, EventArgs e) - { - /* var allProvince = new BLL.Region().GetAll().Where(x => x.Type == eRegionType.Province).ToList(); - foreach (var item in allProvince) - { - var imageItem = new ImageComboBoxItem(item.Name, item.ID); - cbArea.Properties.Items.Add(imageItem); - //鍩庡競娣诲姞鐪佷唤鍙槸涓轰簡涓存椂鐢�,鍚庢湡浼氭洿鏀� - cbCity.Properties.Items.Add(imageItem); - } - ValueChangeEvent(); //涓轰簡缂栬緫椤甸潰鐨勬椂鍊欏彲浠ラ�変腑鎵�閫夐」*/ - } - - private void cbArea_SelectedIndexChanged(object sender, EventArgs e) - { - ValueChangeEvent(); - } - - private void ValueChangeEvent() - { - /* if (cbArea.EditValue != null) - { - var AllDist = new BLL.Region().GetChildrenByID((long)cbArea.EditValue); - foreach (var item in AllDist) - { - var imageItem = new ImageComboBoxItem(item.Name, item.ID); - cbDist.Properties.Items.Add(imageItem); - } - }*/ - } } } \ No newline at end of file diff --git a/WinFrmUI/PBS.WinFrmUI/01-place/00-core/PlaceViewModel.cs b/WinFrmUI/PBS.WinFrmUI/01-place/00-core/PlaceViewModel.cs index 293fa0c..980580c 100644 --- a/WinFrmUI/PBS.WinFrmUI/01-place/00-core/PlaceViewModel.cs +++ b/WinFrmUI/PBS.WinFrmUI/01-place/00-core/PlaceViewModel.cs @@ -21,7 +21,9 @@ this.UseStatus = rhs.UseStatus; this.SortCode = rhs.SortCode; this.Description = rhs.Description; + this.Paras = rhs.Paras; this.Flags = FlagsHelper.ToString(rhs.Flags); + this.Vmo = rhs; } public void Resert(Vmo.PlaceVmo rhs) @@ -32,10 +34,12 @@ this.PlaceType = rhs.PlaceType; this.PlaceInfo = rhs.PlaceInfo; this.Address = rhs.Address; + this.Paras = rhs.Paras; this.UseStatus = rhs.UseStatus; this.SortCode = rhs.SortCode; this.Description = rhs.Description; this.Flags = FlagsHelper.ToString(rhs.Flags); + this.Vmo = rhs; } /// <summary> @@ -121,5 +125,7 @@ [DisplayName("璇存槑")] [Browsable(true)] public string Description { get; set; } + + public Vmo.PlaceVmo Vmo { get; set; } } } \ No newline at end of file diff --git a/WinFrmUI/PBS.WinFrmUI/01-place/AddPlaceDlg.Designer.cs b/WinFrmUI/PBS.WinFrmUI/01-place/AddPlaceDlg.Designer.cs index 4b2c704..c12415b 100644 --- a/WinFrmUI/PBS.WinFrmUI/01-place/AddPlaceDlg.Designer.cs +++ b/WinFrmUI/PBS.WinFrmUI/01-place/AddPlaceDlg.Designer.cs @@ -28,6 +28,7 @@ /// </summary> private void InitializeComponent() { + components = new System.ComponentModel.Container(); Root = new DevExpress.XtraLayout.LayoutControlGroup(); layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); generalOkAndCancelCtrl1 = new Yw.WinFrmUI.GeneralOkAndCancelCtrl(); @@ -47,6 +48,7 @@ layoutControlGroup3 = new DevExpress.XtraLayout.LayoutControlGroup(); layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); + dxErrorProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(components); ((System.ComponentModel.ISupportInitialize)Root).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem7).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem8).BeginInit(); @@ -66,6 +68,7 @@ ((System.ComponentModel.ISupportInitialize)layoutControlGroup3).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem4).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem3).BeginInit(); + ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).BeginInit(); SuspendLayout(); // // Root @@ -253,6 +256,10 @@ layoutControlItem3.Text = "璇︾粏鍦板潃:"; layoutControlItem3.TextSize = new Size(65, 18); // + // dxErrorProvider1 + // + dxErrorProvider1.ContainerControl = this; + // // AddPlaceDlg // AutoScaleDimensions = new SizeF(8F, 18F); @@ -282,6 +289,7 @@ ((System.ComponentModel.ISupportInitialize)layoutControlGroup3).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem4).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem3).EndInit(); + ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).EndInit(); ResumeLayout(false); } @@ -306,5 +314,6 @@ private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; private DevExpress.XtraEditors.TreeListLookUpEdit txtEditRegion; private DevExpress.XtraTreeList.TreeList treeListLookUpEdit1TreeList; + private DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider dxErrorProvider1; } } \ No newline at end of file diff --git a/WinFrmUI/PBS.WinFrmUI/01-place/AddPlaceDlg.cs b/WinFrmUI/PBS.WinFrmUI/01-place/AddPlaceDlg.cs index 585ff5d..14f6307 100644 --- a/WinFrmUI/PBS.WinFrmUI/01-place/AddPlaceDlg.cs +++ b/WinFrmUI/PBS.WinFrmUI/01-place/AddPlaceDlg.cs @@ -1,5 +1,6 @@ 锘縰sing DevExpress.XtraEditors; using HStation.PBS; +using System.Windows.Forms.VisualStyles; using Yw.WinFrmUI; namespace PBS.WinFrmUI @@ -68,11 +69,25 @@ this.divisionViewModelBindingSource.DataSource = _allBindingList;*/ } + private bool Valid() + { + bool isExist = true; + this.dxErrorProvider1.ClearErrors(); + if (string.IsNullOrEmpty(this.txtEditName.Text.Trim())) + { + this.dxErrorProvider1.SetError(this.txtEditName, "蹇呭~椤�"); + isExist = false; + } + return isExist; + } + /// <summary> /// 纭畾 /// </summary> private async void GeneralOkAndCancelCtrl1_OkEvent() { + if (!Valid()) + return; switch (_sign) { case ePlaceType.Build: diff --git a/WinFrmUI/PBS.WinFrmUI/01-place/AddPlaceDlg.resx b/WinFrmUI/PBS.WinFrmUI/01-place/AddPlaceDlg.resx index 8b2ff64..43b467c 100644 --- a/WinFrmUI/PBS.WinFrmUI/01-place/AddPlaceDlg.resx +++ b/WinFrmUI/PBS.WinFrmUI/01-place/AddPlaceDlg.resx @@ -117,4 +117,7 @@ <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> + <metadata name="dxErrorProvider1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> </root> \ No newline at end of file diff --git a/WinFrmUI/PBS.WinFrmUI/01-place/EditPlaceDlg.Designer.cs b/WinFrmUI/PBS.WinFrmUI/01-place/EditPlaceDlg.Designer.cs new file mode 100644 index 0000000..75a024d --- /dev/null +++ b/WinFrmUI/PBS.WinFrmUI/01-place/EditPlaceDlg.Designer.cs @@ -0,0 +1,319 @@ +锘縩amespace PBS.WinFrmUI +{ + partial class EditPlaceDlg + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + components = new System.ComponentModel.Container(); + Root = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); + generalOkAndCancelCtrl1 = new Yw.WinFrmUI.GeneralOkAndCancelCtrl(); + layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); + txtEditName = new DevExpress.XtraEditors.TextEdit(); + layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); + panelControl1 = new DevExpress.XtraEditors.PanelControl(); + textEditAddress = new DevExpress.XtraEditors.TextEdit(); + memoEdit1 = new DevExpress.XtraEditors.MemoEdit(); + txtEditRegion = new DevExpress.XtraEditors.TreeListLookUpEdit(); + treeListLookUpEdit1TreeList = new DevExpress.XtraTreeList.TreeList(); + layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + tabbedControlGroup1 = new DevExpress.XtraLayout.TabbedControlGroup(); + layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlGroup2 = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlGroup3 = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); + dxErrorProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(components); + ((System.ComponentModel.ISupportInitialize)Root).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem7).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem8).BeginInit(); + ((System.ComponentModel.ISupportInitialize)txtEditName.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControl1).BeginInit(); + layoutControl1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)panelControl1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)textEditAddress.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)memoEdit1.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)txtEditRegion.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)treeListLookUpEdit1TreeList).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)tabbedControlGroup1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem2).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup2).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup3).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem4).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem3).BeginInit(); + ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).BeginInit(); + SuspendLayout(); + // + // Root + // + Root.AppearanceItemCaption.Options.UseTextOptions = true; + Root.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; + Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; + Root.GroupBordersVisible = false; + Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem7, layoutControlItem8, layoutControlItem1, tabbedControlGroup1, layoutControlItem3 }); + Root.Name = "Root"; + Root.Size = new Size(811, 539); + Root.TextVisible = false; + // + // layoutControlItem7 + // + layoutControlItem7.Control = generalOkAndCancelCtrl1; + layoutControlItem7.Location = new Point(0, 482); + layoutControlItem7.Name = "layoutControlItem7"; + layoutControlItem7.Size = new Size(791, 37); + layoutControlItem7.TextSize = new Size(0, 0); + layoutControlItem7.TextVisible = false; + // + // generalOkAndCancelCtrl1 + // + generalOkAndCancelCtrl1.ButtonCancelMaxSize = new Size(131, 42); + generalOkAndCancelCtrl1.ButtonCancelMinSize = new Size(114, 33); + generalOkAndCancelCtrl1.ButtonOkMaxSize = new Size(131, 42); + generalOkAndCancelCtrl1.ButtonOkMinSize = new Size(114, 33); + generalOkAndCancelCtrl1.Location = new Point(12, 494); + generalOkAndCancelCtrl1.Margin = new Padding(3, 5, 3, 5); + generalOkAndCancelCtrl1.Name = "generalOkAndCancelCtrl1"; + generalOkAndCancelCtrl1.Size = new Size(787, 33); + generalOkAndCancelCtrl1.TabIndex = 6; + // + // layoutControlItem8 + // + layoutControlItem8.AllowHtmlStringInCaption = true; + layoutControlItem8.Control = txtEditName; + layoutControlItem8.Location = new Point(0, 0); + layoutControlItem8.Name = "layoutControlItem8"; + layoutControlItem8.Size = new Size(791, 28); + layoutControlItem8.Text = "<color=red>*</color>鍚嶇О:"; + layoutControlItem8.TextSize = new Size(65, 18); + // + // txtEditName + // + txtEditName.Location = new Point(89, 12); + txtEditName.Margin = new Padding(3, 4, 3, 4); + txtEditName.Name = "txtEditName"; + txtEditName.Size = new Size(710, 24); + txtEditName.StyleController = layoutControl1; + txtEditName.TabIndex = 0; + // + // layoutControl1 + // + layoutControl1.Controls.Add(panelControl1); + layoutControl1.Controls.Add(generalOkAndCancelCtrl1); + layoutControl1.Controls.Add(txtEditName); + layoutControl1.Controls.Add(textEditAddress); + layoutControl1.Controls.Add(memoEdit1); + layoutControl1.Controls.Add(txtEditRegion); + layoutControl1.Dock = DockStyle.Fill; + layoutControl1.Location = new Point(0, 0); + layoutControl1.Margin = new Padding(3, 4, 3, 4); + layoutControl1.Name = "layoutControl1"; + layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new Rectangle(826, 220, 650, 400); + layoutControl1.Root = Root; + layoutControl1.Size = new Size(811, 539); + layoutControl1.TabIndex = 2; + layoutControl1.Text = "layoutControl1"; + // + // panelControl1 + // + panelControl1.Location = new Point(15, 129); + panelControl1.Margin = new Padding(3, 4, 3, 4); + panelControl1.Name = "panelControl1"; + panelControl1.Size = new Size(781, 358); + panelControl1.TabIndex = 1; + // + // textEditAddress + // + textEditAddress.Location = new Point(89, 68); + textEditAddress.Margin = new Padding(3, 4, 3, 4); + textEditAddress.Name = "textEditAddress"; + textEditAddress.Size = new Size(710, 24); + textEditAddress.StyleController = layoutControl1; + textEditAddress.TabIndex = 3; + // + // memoEdit1 + // + memoEdit1.Location = new Point(92, 129); + memoEdit1.Margin = new Padding(3, 4, 3, 4); + memoEdit1.Name = "memoEdit1"; + memoEdit1.Size = new Size(704, 358); + memoEdit1.StyleController = layoutControl1; + memoEdit1.TabIndex = 5; + // + // txtEditRegion + // + txtEditRegion.Location = new Point(89, 40); + txtEditRegion.Margin = new Padding(3, 4, 3, 4); + txtEditRegion.Name = "txtEditRegion"; + txtEditRegion.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); + txtEditRegion.Properties.DisplayMember = "Name"; + txtEditRegion.Properties.NullText = ""; + txtEditRegion.Properties.TreeList = treeListLookUpEdit1TreeList; + txtEditRegion.Properties.ValueMember = "ID"; + txtEditRegion.Size = new Size(710, 24); + txtEditRegion.StyleController = layoutControl1; + txtEditRegion.TabIndex = 2; + // + // treeListLookUpEdit1TreeList + // + treeListLookUpEdit1TreeList.Location = new Point(0, 0); + treeListLookUpEdit1TreeList.Name = "treeListLookUpEdit1TreeList"; + treeListLookUpEdit1TreeList.OptionsView.ShowIndentAsRowStyle = true; + treeListLookUpEdit1TreeList.Size = new Size(400, 200); + treeListLookUpEdit1TreeList.TabIndex = 0; + // + // layoutControlItem1 + // + layoutControlItem1.Control = txtEditRegion; + layoutControlItem1.Location = new Point(0, 28); + layoutControlItem1.Name = "layoutControlItem1"; + layoutControlItem1.Size = new Size(791, 28); + layoutControlItem1.Text = "鍦板尯:"; + layoutControlItem1.TextSize = new Size(65, 18); + // + // tabbedControlGroup1 + // + tabbedControlGroup1.Location = new Point(0, 84); + tabbedControlGroup1.Name = "tabbedControlGroup1"; + tabbedControlGroup1.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + tabbedControlGroup1.SelectedTabPage = layoutControlGroup1; + tabbedControlGroup1.Size = new Size(791, 398); + tabbedControlGroup1.TabPages.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlGroup1, layoutControlGroup2, layoutControlGroup3 }); + // + // layoutControlGroup1 + // + layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem2 }); + layoutControlGroup1.Location = new Point(0, 0); + layoutControlGroup1.Name = "layoutControlGroup1"; + layoutControlGroup1.Size = new Size(785, 362); + layoutControlGroup1.Text = "灞炴��"; + // + // layoutControlItem2 + // + layoutControlItem2.Control = panelControl1; + layoutControlItem2.Location = new Point(0, 0); + layoutControlItem2.Name = "layoutControlItem2"; + layoutControlItem2.Size = new Size(785, 362); + layoutControlItem2.TextSize = new Size(0, 0); + layoutControlItem2.TextVisible = false; + // + // layoutControlGroup2 + // + layoutControlGroup2.Location = new Point(0, 0); + layoutControlGroup2.Name = "layoutControlGroup2"; + layoutControlGroup2.Size = new Size(785, 362); + layoutControlGroup2.Text = "鍦板浘"; + // + // layoutControlGroup3 + // + layoutControlGroup3.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem4 }); + layoutControlGroup3.Location = new Point(0, 0); + layoutControlGroup3.Name = "layoutControlGroup3"; + layoutControlGroup3.Size = new Size(785, 362); + layoutControlGroup3.Text = "璇存槑"; + // + // layoutControlItem4 + // + layoutControlItem4.Control = memoEdit1; + layoutControlItem4.Location = new Point(0, 0); + layoutControlItem4.Name = "layoutControlItem4"; + layoutControlItem4.Size = new Size(785, 362); + layoutControlItem4.Text = "璇存槑"; + layoutControlItem4.TextSize = new Size(65, 18); + // + // layoutControlItem3 + // + layoutControlItem3.Control = textEditAddress; + layoutControlItem3.Location = new Point(0, 56); + layoutControlItem3.Name = "layoutControlItem3"; + layoutControlItem3.Size = new Size(791, 28); + layoutControlItem3.Text = "璇︾粏鍦板潃:"; + layoutControlItem3.TextSize = new Size(65, 18); + // + // dxErrorProvider1 + // + dxErrorProvider1.ContainerControl = this; + // + // EditPlaceDlg + // + AutoScaleDimensions = new SizeF(8F, 18F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(811, 539); + Controls.Add(layoutControl1); + Margin = new Padding(3, 4, 3, 4); + Name = "EditPlaceDlg"; + StartPosition = FormStartPosition.CenterScreen; + Text = "缂栬緫"; + ((System.ComponentModel.ISupportInitialize)Root).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem7).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem8).EndInit(); + ((System.ComponentModel.ISupportInitialize)txtEditName.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControl1).EndInit(); + layoutControl1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)panelControl1).EndInit(); + ((System.ComponentModel.ISupportInitialize)textEditAddress.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)memoEdit1.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)txtEditRegion.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)treeListLookUpEdit1TreeList).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem1).EndInit(); + ((System.ComponentModel.ISupportInitialize)tabbedControlGroup1).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup1).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem2).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup2).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup3).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem4).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem3).EndInit(); + ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).EndInit(); + ResumeLayout(false); + } + + #endregion + + private DevExpress.XtraLayout.LayoutControlGroup Root; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7; + private Yw.WinFrmUI.GeneralOkAndCancelCtrl generalOkAndCancelCtrl1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8; + private DevExpress.XtraLayout.LayoutControl layoutControl1; + private DevExpress.XtraEditors.TextEdit txtEditName; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; + private DevExpress.XtraEditors.PanelControl panelControl1; + private DevExpress.XtraEditors.TextEdit textEditAddress; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; + private DevExpress.XtraEditors.MemoEdit memoEdit1; + private DevExpress.XtraLayout.TabbedControlGroup tabbedControlGroup1; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup2; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup3; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; + private DevExpress.XtraEditors.TreeListLookUpEdit txtEditRegion; + private DevExpress.XtraTreeList.TreeList treeListLookUpEdit1TreeList; + private DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider dxErrorProvider1; + } +} \ No newline at end of file diff --git a/WinFrmUI/PBS.WinFrmUI/01-place/EditPlaceDlg.cs b/WinFrmUI/PBS.WinFrmUI/01-place/EditPlaceDlg.cs new file mode 100644 index 0000000..9209fa1 --- /dev/null +++ b/WinFrmUI/PBS.WinFrmUI/01-place/EditPlaceDlg.cs @@ -0,0 +1,133 @@ +锘縰sing DevExpress.XtraEditors; +using HStation.PBS; +using PBS.Model; +using PBS.Vmo; +using Yw.WinFrmUI; + +namespace PBS.WinFrmUI +{ + public partial class EditPlaceDlg : DevExpress.XtraEditors.XtraForm + { + public EditPlaceDlg() + { + InitializeComponent(); + this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; + this.generalOkAndCancelCtrl1.OkEvent += GeneralOkAndCancelCtrl1_OkEvent; ; + } + + private Vmo.PlaceVmo _placeVmo; + + private ePlaceType _sign; + + private BuildWizardForm _buildWizard; + private HospitalWizardForm _hospitalWizard; + private SchoolWizardForm _schoolWizard; + private ShopWizardForm _shopWizard; + + public event Func<Vmo.PlaceVmo, Task<bool>> ReloadDataEvent; + + public async void SetBindingData(PlaceVmo placeVmo) + { + _placeVmo = placeVmo; + var list = await new Yw.BLL.Division().GetAll(); + this.treeListLookUpEdit1TreeList.DataSource = list; + this.txtEditName.EditValue = _placeVmo.Name; + this.txtEditRegion.EditValue = _placeVmo.RegionID; + this.textEditAddress.EditValue = _placeVmo.Address; + switch (_placeVmo.PlaceType) + { + case ePlaceType.Build: + _buildWizard = new BuildWizardForm(); + _buildWizard.Dock = DockStyle.Fill; + _buildWizard.SetData(Yw.JsonHelper.Json2Object<PlaceBuildParasInfo>(_placeVmo.PlaceInfo)); + this.panelControl1.Controls.Add(_buildWizard); + break; + + case ePlaceType.Hospital: + _hospitalWizard = new HospitalWizardForm(); + _hospitalWizard.Dock = DockStyle.Fill; + _hospitalWizard.SetData(Yw.JsonHelper.Json2Object<PlaceHospitalParasInfo>(_placeVmo.PlaceInfo)); + this.panelControl1.Controls.Add(_hospitalWizard); + break; + + case ePlaceType.Shop: + _shopWizard = new ShopWizardForm(); + _shopWizard.Dock = DockStyle.Fill; + _shopWizard.SetData(Yw.JsonHelper.Json2Object<PlaceShopParasInfo>(_placeVmo.PlaceInfo)); + this.panelControl1.Controls.Add(_shopWizard); + break; + + case ePlaceType.School: + _schoolWizard = new SchoolWizardForm(); + _schoolWizard.Dock = DockStyle.Fill; + _schoolWizard.SetData(Yw.JsonHelper.Json2Object<PlaceSchoolParasInfo>(_placeVmo.PlaceInfo)); + this.panelControl1.Controls.Add(_schoolWizard); + break; + } + /* if (list != null && list.Count > 0) + { + foreach (var item in list) + { + var vm = new DivisionViewModel(item); + _allBindingList.Add(vm); + } + } + this.divisionViewModelBindingSource.DataSource = _allBindingList;*/ + } + + private bool Valid() + { + bool isExist = true; + this.dxErrorProvider1.ClearErrors(); + if (string.IsNullOrEmpty(this.txtEditName.Text.Trim())) + { + this.dxErrorProvider1.SetError(this.txtEditName, "蹇呭~椤�"); + isExist = false; + } + return isExist; + } + + /// <summary> + /// 纭畾 + /// </summary> + private async void GeneralOkAndCancelCtrl1_OkEvent() + { + if (!Valid()) + return; + switch (_sign) + { + case ePlaceType.Build: + _placeVmo.PlaceInfo = Yw.JsonHelper.Object2Json(_buildWizard.GetData()); + break; + + case ePlaceType.Shop: + _placeVmo.PlaceInfo = Yw.JsonHelper.Object2Json(_shopWizard.GetData()); + break; + + case ePlaceType.Hospital: + _placeVmo.PlaceInfo = Yw.JsonHelper.Object2Json(_hospitalWizard.GetData()); + break; + + case ePlaceType.School: + _placeVmo.PlaceInfo = Yw.JsonHelper.Object2Json(_schoolWizard.GetData()); + break; + } + _placeVmo.Name = txtEditName.Text.Trim(); + _placeVmo.Address = textEditAddress.Text.Trim(); + _placeVmo.UseStatus = Yw.Vmo.eUseStatus.Enable; + if (this.txtEditRegion.EditValue != null) + { + _placeVmo.RegionID = Convert.ToInt64(this.txtEditRegion.EditValue); + } + if (await ReloadDataEvent.Invoke(_placeVmo)) + { + TipFormHelper.ShowSucceed("淇敼鎴愬姛锛�"); + } + else + { + TipFormHelper.ShowError("淇敼澶辫触锛�"); + } + this.Close(); + } + } +} \ No newline at end of file diff --git a/WinFrmUI/PBS.WinFrmUI/01-place/EditPlaceDlg.resx b/WinFrmUI/PBS.WinFrmUI/01-place/EditPlaceDlg.resx new file mode 100644 index 0000000..43b467c --- /dev/null +++ b/WinFrmUI/PBS.WinFrmUI/01-place/EditPlaceDlg.resx @@ -0,0 +1,123 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <metadata name="dxErrorProvider1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> +</root> \ No newline at end of file diff --git a/WinFrmUI/PBS.WinFrmUI/01-place/PlaceMgrPage.Designer.cs b/WinFrmUI/PBS.WinFrmUI/01-place/PlaceMgrPage.Designer.cs index 6a82036..97a22d0 100644 --- a/WinFrmUI/PBS.WinFrmUI/01-place/PlaceMgrPage.Designer.cs +++ b/WinFrmUI/PBS.WinFrmUI/01-place/PlaceMgrPage.Designer.cs @@ -145,8 +145,6 @@ colParas.FieldName = "Paras"; colParas.MinWidth = 23; colParas.Name = "colParas"; - colParas.Visible = true; - colParas.VisibleIndex = 3; colParas.Width = 86; // // colFlags @@ -155,7 +153,7 @@ colFlags.MinWidth = 23; colFlags.Name = "colFlags"; colFlags.Visible = true; - colFlags.VisibleIndex = 4; + colFlags.VisibleIndex = 3; colFlags.Width = 86; // // colTagName @@ -164,7 +162,7 @@ colTagName.MinWidth = 23; colTagName.Name = "colTagName"; colTagName.Visible = true; - colTagName.VisibleIndex = 5; + colTagName.VisibleIndex = 4; colTagName.Width = 86; // // colUseStatus @@ -173,7 +171,7 @@ colUseStatus.MinWidth = 23; colUseStatus.Name = "colUseStatus"; colUseStatus.Visible = true; - colUseStatus.VisibleIndex = 6; + colUseStatus.VisibleIndex = 5; colUseStatus.Width = 86; // // colSortCode @@ -189,7 +187,7 @@ colDescription.MinWidth = 23; colDescription.Name = "colDescription"; colDescription.Visible = true; - colDescription.VisibleIndex = 7; + colDescription.VisibleIndex = 6; colDescription.Width = 86; // // ribbonControl1 @@ -217,6 +215,7 @@ barBtnEdit.Id = 17; barBtnEdit.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnEdit.ImageOptions.SvgImage"); barBtnEdit.Name = "barBtnEdit"; + barBtnEdit.ItemClick += barBtnEdit_ItemClick; // // barBtnRefresh // diff --git a/WinFrmUI/PBS.WinFrmUI/01-place/PlaceMgrPage.cs b/WinFrmUI/PBS.WinFrmUI/01-place/PlaceMgrPage.cs index 672decd..fdaebd8 100644 --- a/WinFrmUI/PBS.WinFrmUI/01-place/PlaceMgrPage.cs +++ b/WinFrmUI/PBS.WinFrmUI/01-place/PlaceMgrPage.cs @@ -117,6 +117,30 @@ dlg.ShowDialog(); } + //淇敼 + private void barBtnEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + var vm = this.gridView1.GetCurrentViewModel(_allBindingList); + if (vm == null) + { + TipFormHelper.ShowWarn("璇烽�夋嫨鏁版嵁琛�"); + } + var dlg = new EditPlaceDlg(); + dlg.SetBindingData(vm.Vmo); + dlg.ReloadDataEvent += async (vmo) => + { + var bol = await _placeBll.Update(vmo); + if (bol) + { + vm.Resert(vmo); + this.placeViewModelBindingSource.ResetBindings(false); + return true; + } + return false; + }; + dlg.ShowDialog(); + } + //鍒犻櫎 private async void barBtnDelete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { diff --git a/WinFrmUI/PBS.WinFrmUI/02-facility/00-core/FacilitiesCtrl.Designer.cs b/WinFrmUI/PBS.WinFrmUI/02-facility/00-core/FacilitiesCtrl.Designer.cs index 90a3a1b..d03d25e 100644 --- a/WinFrmUI/PBS.WinFrmUI/02-facility/00-core/FacilitiesCtrl.Designer.cs +++ b/WinFrmUI/PBS.WinFrmUI/02-facility/00-core/FacilitiesCtrl.Designer.cs @@ -35,30 +35,22 @@ txtName = new DevExpress.XtraEditors.TextEdit(); txtWaterPressure = new DevExpress.XtraEditors.TextEdit(); txtMaxWaterDemand = new DevExpress.XtraEditors.TextEdit(); - textEdit11 = new DevExpress.XtraEditors.TextEdit(); - textEditCount = new DevExpress.XtraEditors.TextEdit(); - textEditFacAmount = new DevExpress.XtraEditors.TextEdit(); comboBoxWaterSupply = new DevExpress.XtraEditors.ImageComboBoxEdit(); comboBoxCompletePlant = new DevExpress.XtraEditors.ImageComboBoxEdit(); txtFloorHouseHolds = new DevExpress.XtraEditors.TextEdit(); txtConstantP = new DevExpress.XtraEditors.TextEdit(); - textEdit2 = new DevExpress.XtraEditors.TextEdit(); textEditWaterModel = new DevExpress.XtraEditors.ImageComboBoxEdit(); layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup(); - txtFloorHeightitem = new DevExpress.XtraLayout.LayoutControlItem(); txtFlooritem = new DevExpress.XtraLayout.LayoutControlItem(); comboBoxCompletePlantitem = new DevExpress.XtraLayout.LayoutControlItem(); txtNameitem = new DevExpress.XtraLayout.LayoutControlItem(); comboBoxWaterSupplyitem = new DevExpress.XtraLayout.LayoutControlItem(); txtWaterPressureitem = new DevExpress.XtraLayout.LayoutControlItem(); - layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); - layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); - layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); - layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); - layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); txtWaterHeightitem = new DevExpress.XtraLayout.LayoutControlItem(); - layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); + txtFloorHeightitem = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); dxErrorProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(components); ((System.ComponentModel.ISupportInitialize)FacilitiesWizardFormlayoutControl1ConvertedLayout).BeginInit(); FacilitiesWizardFormlayoutControl1ConvertedLayout.SuspendLayout(); @@ -67,30 +59,22 @@ ((System.ComponentModel.ISupportInitialize)txtName.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)txtWaterPressure.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)txtMaxWaterDemand.Properties).BeginInit(); - ((System.ComponentModel.ISupportInitialize)textEdit11.Properties).BeginInit(); - ((System.ComponentModel.ISupportInitialize)textEditCount.Properties).BeginInit(); - ((System.ComponentModel.ISupportInitialize)textEditFacAmount.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)comboBoxWaterSupply.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)comboBoxCompletePlant.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)txtFloorHouseHolds.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)txtConstantP.Properties).BeginInit(); - ((System.ComponentModel.ISupportInitialize)textEdit2.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)textEditWaterModel.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlGroup1).BeginInit(); - ((System.ComponentModel.ISupportInitialize)txtFloorHeightitem).BeginInit(); ((System.ComponentModel.ISupportInitialize)txtFlooritem).BeginInit(); ((System.ComponentModel.ISupportInitialize)comboBoxCompletePlantitem).BeginInit(); ((System.ComponentModel.ISupportInitialize)txtNameitem).BeginInit(); ((System.ComponentModel.ISupportInitialize)comboBoxWaterSupplyitem).BeginInit(); ((System.ComponentModel.ISupportInitialize)txtWaterPressureitem).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem3).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem1).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem6).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem7).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem8).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem5).BeginInit(); ((System.ComponentModel.ISupportInitialize)txtWaterHeightitem).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem2).BeginInit(); + ((System.ComponentModel.ISupportInitialize)txtFloorHeightitem).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem6).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem5).BeginInit(); ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).BeginInit(); SuspendLayout(); // @@ -101,14 +85,10 @@ FacilitiesWizardFormlayoutControl1ConvertedLayout.Controls.Add(txtName); FacilitiesWizardFormlayoutControl1ConvertedLayout.Controls.Add(txtWaterPressure); FacilitiesWizardFormlayoutControl1ConvertedLayout.Controls.Add(txtMaxWaterDemand); - FacilitiesWizardFormlayoutControl1ConvertedLayout.Controls.Add(textEdit11); - FacilitiesWizardFormlayoutControl1ConvertedLayout.Controls.Add(textEditCount); - FacilitiesWizardFormlayoutControl1ConvertedLayout.Controls.Add(textEditFacAmount); FacilitiesWizardFormlayoutControl1ConvertedLayout.Controls.Add(comboBoxWaterSupply); FacilitiesWizardFormlayoutControl1ConvertedLayout.Controls.Add(comboBoxCompletePlant); FacilitiesWizardFormlayoutControl1ConvertedLayout.Controls.Add(txtFloorHouseHolds); FacilitiesWizardFormlayoutControl1ConvertedLayout.Controls.Add(txtConstantP); - FacilitiesWizardFormlayoutControl1ConvertedLayout.Controls.Add(textEdit2); FacilitiesWizardFormlayoutControl1ConvertedLayout.Controls.Add(textEditWaterModel); FacilitiesWizardFormlayoutControl1ConvertedLayout.Dock = DockStyle.Fill; FacilitiesWizardFormlayoutControl1ConvertedLayout.Location = new Point(0, 0); @@ -121,23 +101,23 @@ // // txtFloorHeight // - txtFloorHeight.Location = new Point(158, 160); + txtFloorHeight.Location = new Point(592, 132); txtFloorHeight.Margin = new Padding(2, 3, 2, 3); txtFloorHeight.MinimumSize = new Size(0, 36); txtFloorHeight.Name = "txtFloorHeight"; txtFloorHeight.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager)); - txtFloorHeight.Size = new Size(244, 36); + txtFloorHeight.Size = new Size(285, 36); txtFloorHeight.StyleController = FacilitiesWizardFormlayoutControl1ConvertedLayout; - txtFloorHeight.TabIndex = 9; + txtFloorHeight.TabIndex = 10; // // txtFloor // - txtFloor.Location = new Point(158, 120); + txtFloor.Location = new Point(158, 92); txtFloor.Margin = new Padding(2, 3, 2, 3); txtFloor.MinimumSize = new Size(0, 36); txtFloor.Name = "txtFloor"; txtFloor.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager)); - txtFloor.Size = new Size(244, 36); + txtFloor.Size = new Size(284, 36); txtFloor.StyleController = FacilitiesWizardFormlayoutControl1ConvertedLayout; txtFloor.TabIndex = 7; // @@ -147,118 +127,83 @@ txtName.Margin = new Padding(2, 3, 2, 3); txtName.MinimumSize = new Size(0, 36); txtName.Name = "txtName"; - txtName.Size = new Size(244, 36); + txtName.Size = new Size(284, 36); txtName.StyleController = FacilitiesWizardFormlayoutControl1ConvertedLayout; txtName.TabIndex = 0; // // txtWaterPressure // - txtWaterPressure.Location = new Point(552, 12); + txtWaterPressure.Location = new Point(592, 12); txtWaterPressure.Margin = new Padding(2, 3, 2, 3); txtWaterPressure.MinimumSize = new Size(0, 36); txtWaterPressure.Name = "txtWaterPressure"; - txtWaterPressure.Size = new Size(325, 36); + txtWaterPressure.Size = new Size(285, 36); txtWaterPressure.StyleController = FacilitiesWizardFormlayoutControl1ConvertedLayout; txtWaterPressure.TabIndex = 2; // // txtMaxWaterDemand // - txtMaxWaterDemand.Location = new Point(552, 92); + txtMaxWaterDemand.Location = new Point(592, 92); txtMaxWaterDemand.Margin = new Padding(2, 3, 2, 3); txtMaxWaterDemand.MinimumSize = new Size(0, 36); txtMaxWaterDemand.Name = "txtMaxWaterDemand"; txtMaxWaterDemand.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager)); - txtMaxWaterDemand.Size = new Size(325, 36); + txtMaxWaterDemand.Size = new Size(285, 36); txtMaxWaterDemand.StyleController = FacilitiesWizardFormlayoutControl1ConvertedLayout; txtMaxWaterDemand.TabIndex = 6; // - // textEdit11 - // - textEdit11.Location = new Point(158, 52); - textEdit11.Margin = new Padding(3, 4, 3, 4); - textEdit11.MinimumSize = new Size(0, 36); - textEdit11.Name = "textEdit11"; - textEdit11.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager)); - textEdit11.Size = new Size(244, 36); - textEdit11.StyleController = FacilitiesWizardFormlayoutControl1ConvertedLayout; - textEdit11.TabIndex = 3; - // - // textEditCount - // - textEditCount.Location = new Point(158, 240); - textEditCount.Margin = new Padding(3, 4, 3, 4); - textEditCount.MinimumSize = new Size(0, 36); - textEditCount.Name = "textEditCount"; - textEditCount.Size = new Size(244, 36); - textEditCount.StyleController = FacilitiesWizardFormlayoutControl1ConvertedLayout; - textEditCount.TabIndex = 12; - // - // textEditFacAmount - // - textEditFacAmount.Location = new Point(552, 132); - textEditFacAmount.Margin = new Padding(3, 4, 3, 4); - textEditFacAmount.MinimumSize = new Size(0, 36); - textEditFacAmount.Name = "textEditFacAmount"; - textEditFacAmount.Size = new Size(325, 36); - textEditFacAmount.StyleController = FacilitiesWizardFormlayoutControl1ConvertedLayout; - textEditFacAmount.TabIndex = 8; - // // comboBoxWaterSupply // - comboBoxWaterSupply.Location = new Point(552, 52); + comboBoxWaterSupply.Location = new Point(158, 52); comboBoxWaterSupply.Margin = new Padding(2, 3, 2, 3); comboBoxWaterSupply.MinimumSize = new Size(0, 36); comboBoxWaterSupply.Name = "comboBoxWaterSupply"; comboBoxWaterSupply.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); comboBoxWaterSupply.Properties.NullText = "璇烽�夋嫨"; - comboBoxWaterSupply.Size = new Size(325, 36); + comboBoxWaterSupply.Size = new Size(284, 36); comboBoxWaterSupply.StyleController = FacilitiesWizardFormlayoutControl1ConvertedLayout; comboBoxWaterSupply.TabIndex = 4; // // comboBoxCompletePlant // - comboBoxCompletePlant.Location = new Point(158, 200); + comboBoxCompletePlant.Location = new Point(158, 132); comboBoxCompletePlant.Margin = new Padding(2, 3, 2, 3); comboBoxCompletePlant.MinimumSize = new Size(0, 36); comboBoxCompletePlant.Name = "comboBoxCompletePlant"; comboBoxCompletePlant.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); comboBoxCompletePlant.Properties.NullText = "璇烽�夋嫨"; - comboBoxCompletePlant.Size = new Size(244, 36); + comboBoxCompletePlant.Size = new Size(284, 36); comboBoxCompletePlant.StyleController = FacilitiesWizardFormlayoutControl1ConvertedLayout; - comboBoxCompletePlant.TabIndex = 10; + comboBoxCompletePlant.TabIndex = 9; // // txtFloorHouseHolds // - txtFloorHouseHolds.Location = new Point(158, 92); + txtFloorHouseHolds.Location = new Point(592, 52); + txtFloorHouseHolds.Margin = new Padding(2, 3, 2, 3); + txtFloorHouseHolds.MinimumSize = new Size(0, 36); txtFloorHouseHolds.Name = "txtFloorHouseHolds"; - txtFloorHouseHolds.Size = new Size(244, 24); + txtFloorHouseHolds.Size = new Size(285, 36); txtFloorHouseHolds.StyleController = FacilitiesWizardFormlayoutControl1ConvertedLayout; txtFloorHouseHolds.TabIndex = 5; // // txtConstantP // - txtConstantP.Location = new Point(552, 200); + txtConstantP.Location = new Point(158, 172); + txtConstantP.MinimumSize = new Size(0, 36); txtConstantP.Name = "txtConstantP"; - txtConstantP.Size = new Size(325, 24); + txtConstantP.Size = new Size(284, 36); txtConstantP.StyleController = FacilitiesWizardFormlayoutControl1ConvertedLayout; txtConstantP.TabIndex = 11; // - // textEdit2 - // - textEdit2.Location = new Point(552, 240); - textEdit2.Name = "textEdit2"; - textEdit2.Size = new Size(325, 24); - textEdit2.StyleController = FacilitiesWizardFormlayoutControl1ConvertedLayout; - textEdit2.TabIndex = 13; - // // textEditWaterModel // - textEditWaterModel.Location = new Point(158, 280); + textEditWaterModel.Location = new Point(592, 172); + textEditWaterModel.MinimumSize = new Size(0, 36); textEditWaterModel.Name = "textEditWaterModel"; textEditWaterModel.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); - textEditWaterModel.Size = new Size(244, 24); + textEditWaterModel.Size = new Size(285, 36); textEditWaterModel.StyleController = FacilitiesWizardFormlayoutControl1ConvertedLayout; - textEditWaterModel.TabIndex = 14; + textEditWaterModel.TabIndex = 13; // // layoutControlGroup1 // @@ -266,29 +211,18 @@ layoutControlGroup1.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; layoutControlGroup1.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; layoutControlGroup1.GroupBordersVisible = false; - layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { txtFloorHeightitem, txtFlooritem, comboBoxCompletePlantitem, txtNameitem, comboBoxWaterSupplyitem, txtWaterPressureitem, layoutControlItem3, layoutControlItem1, layoutControlItem6, layoutControlItem7, layoutControlItem8, layoutControlItem5, txtWaterHeightitem, layoutControlItem2 }); + layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { txtFlooritem, comboBoxCompletePlantitem, txtNameitem, comboBoxWaterSupplyitem, txtWaterPressureitem, txtWaterHeightitem, txtFloorHeightitem, layoutControlItem6, layoutControlItem5, layoutControlItem7 }); layoutControlGroup1.Name = "Root"; layoutControlGroup1.Size = new Size(889, 396); layoutControlGroup1.TextVisible = false; - // - // txtFloorHeightitem - // - txtFloorHeightitem.AllowHtmlStringInCaption = true; - txtFloorHeightitem.Control = txtFloorHeight; - txtFloorHeightitem.Location = new Point(0, 148); - txtFloorHeightitem.Name = "txtFloorHeightitem"; - txtFloorHeightitem.Size = new Size(394, 40); - txtFloorHeightitem.Text = "<color=red>*</color>灞傞珮(m)锛�"; - txtFloorHeightitem.TextLocation = DevExpress.Utils.Locations.Left; - txtFloorHeightitem.TextSize = new Size(134, 18); // // txtFlooritem // txtFlooritem.AllowHtmlStringInCaption = true; txtFlooritem.Control = txtFloor; - txtFlooritem.Location = new Point(0, 108); + txtFlooritem.Location = new Point(0, 80); txtFlooritem.Name = "txtFlooritem"; - txtFlooritem.Size = new Size(394, 40); + txtFlooritem.Size = new Size(434, 40); txtFlooritem.Text = "<color=red>*</color>妤煎眰锛�"; txtFlooritem.TextLocation = DevExpress.Utils.Locations.Left; txtFlooritem.TextSize = new Size(134, 18); @@ -297,9 +231,9 @@ // comboBoxCompletePlantitem.AllowHtmlStringInCaption = true; comboBoxCompletePlantitem.Control = comboBoxCompletePlant; - comboBoxCompletePlantitem.Location = new Point(0, 188); + comboBoxCompletePlantitem.Location = new Point(0, 120); comboBoxCompletePlantitem.Name = "comboBoxCompletePlantitem"; - comboBoxCompletePlantitem.Size = new Size(394, 40); + comboBoxCompletePlantitem.Size = new Size(434, 40); comboBoxCompletePlantitem.Text = "<color=red>*</color>鎴愬璁惧锛�"; comboBoxCompletePlantitem.TextLocation = DevExpress.Utils.Locations.Left; comboBoxCompletePlantitem.TextSize = new Size(134, 18); @@ -310,7 +244,7 @@ txtNameitem.Control = txtName; txtNameitem.Location = new Point(0, 0); txtNameitem.Name = "txtNameitem"; - txtNameitem.Size = new Size(394, 40); + txtNameitem.Size = new Size(434, 40); txtNameitem.StartNewLine = true; txtNameitem.Text = "<color=red>*</color>璁炬柦鍚嶇О锛�"; txtNameitem.TextLocation = DevExpress.Utils.Locations.Left; @@ -320,9 +254,9 @@ // comboBoxWaterSupplyitem.AllowHtmlStringInCaption = true; comboBoxWaterSupplyitem.Control = comboBoxWaterSupply; - comboBoxWaterSupplyitem.Location = new Point(394, 40); + comboBoxWaterSupplyitem.Location = new Point(0, 40); comboBoxWaterSupplyitem.Name = "comboBoxWaterSupplyitem"; - comboBoxWaterSupplyitem.Size = new Size(475, 40); + comboBoxWaterSupplyitem.Size = new Size(434, 40); comboBoxWaterSupplyitem.Text = "<color=red>*</color>渚涙按鍗曞厓锛�"; comboBoxWaterSupplyitem.TextLocation = DevExpress.Utils.Locations.Left; comboBoxWaterSupplyitem.TextSize = new Size(134, 18); @@ -331,100 +265,64 @@ // txtWaterPressureitem.AllowHtmlStringInCaption = true; txtWaterPressureitem.Control = txtWaterPressure; - txtWaterPressureitem.Location = new Point(394, 0); + txtWaterPressureitem.Location = new Point(434, 0); txtWaterPressureitem.Name = "txtWaterPressureitem"; - txtWaterPressureitem.Size = new Size(475, 40); + txtWaterPressureitem.Size = new Size(435, 40); txtWaterPressureitem.Text = "<color=red>*</color>鏈鍘嬪姏(m):"; txtWaterPressureitem.TextLocation = DevExpress.Utils.Locations.Left; txtWaterPressureitem.TextSize = new Size(134, 18); // - // layoutControlItem3 + // layoutControlItem7 // - layoutControlItem3.AllowHtmlStringInCaption = true; - layoutControlItem3.Control = textEdit11; - layoutControlItem3.ControlAlignment = ContentAlignment.TopLeft; - layoutControlItem3.CustomizationFormText = "鏈�楂樻ゼ灞傛爣楂�:"; - layoutControlItem3.Location = new Point(0, 40); - layoutControlItem3.Name = "layoutControlItem3"; - layoutControlItem3.Size = new Size(394, 40); - layoutControlItem3.Text = "<color=red>*</color>鏈�楂樻ゼ灞傛爣楂�(m):"; - layoutControlItem3.TextSize = new Size(134, 18); + layoutControlItem7.Control = textEditWaterModel; + layoutControlItem7.Location = new Point(434, 160); + layoutControlItem7.Name = "layoutControlItem7"; + layoutControlItem7.Size = new Size(435, 216); + layoutControlItem7.Text = "渚涙按妯″紡:"; + layoutControlItem7.TextSize = new Size(134, 18); // - // layoutControlItem1 + // txtWaterHeightitem // - layoutControlItem1.AllowHtmlStringInCaption = true; - layoutControlItem1.Control = textEditCount; - layoutControlItem1.ControlAlignment = ContentAlignment.TopLeft; - layoutControlItem1.CustomizationFormText = "鐢ㄦ埛鏁帮細"; - layoutControlItem1.Location = new Point(0, 228); - layoutControlItem1.Name = "layoutControlItem1"; - layoutControlItem1.Size = new Size(394, 40); - layoutControlItem1.Text = "鐢ㄦ埛鏁帮細"; - layoutControlItem1.TextSize = new Size(134, 18); - layoutControlItem1.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never; + txtWaterHeightitem.AllowHtmlStringInCaption = true; + txtWaterHeightitem.Control = txtMaxWaterDemand; + txtWaterHeightitem.Location = new Point(434, 80); + txtWaterHeightitem.Name = "txtWaterHeightitem"; + txtWaterHeightitem.Size = new Size(435, 40); + txtWaterHeightitem.Text = "<color=red>*</color>鏈�澶х敤姘撮噺(m鲁/h):"; + txtWaterHeightitem.TextLocation = DevExpress.Utils.Locations.Left; + txtWaterHeightitem.TextSize = new Size(134, 18); + // + // txtFloorHeightitem + // + txtFloorHeightitem.AllowHtmlStringInCaption = true; + txtFloorHeightitem.Control = txtFloorHeight; + txtFloorHeightitem.Location = new Point(434, 120); + txtFloorHeightitem.Name = "txtFloorHeightitem"; + txtFloorHeightitem.Size = new Size(435, 40); + txtFloorHeightitem.Text = "<color=red>*</color>灞傞珮(m)锛�"; + txtFloorHeightitem.TextLocation = DevExpress.Utils.Locations.Left; + txtFloorHeightitem.TextSize = new Size(134, 18); // // layoutControlItem6 // layoutControlItem6.AllowHtmlStringInCaption = true; layoutControlItem6.Control = txtConstantP; - layoutControlItem6.Location = new Point(394, 188); + layoutControlItem6.Location = new Point(0, 160); layoutControlItem6.Name = "layoutControlItem6"; - layoutControlItem6.Size = new Size(475, 40); + layoutControlItem6.Size = new Size(434, 216); layoutControlItem6.Text = "<color=red>*</color>鎭掑畾鍘嬪姏:"; layoutControlItem6.TextSize = new Size(134, 18); - // - // layoutControlItem7 - // - layoutControlItem7.Control = textEditWaterModel; - layoutControlItem7.Location = new Point(0, 268); - layoutControlItem7.Name = "layoutControlItem7"; - layoutControlItem7.Size = new Size(394, 108); - layoutControlItem7.Text = "渚涙按妯″紡:"; - layoutControlItem7.TextSize = new Size(134, 18); - // - // layoutControlItem8 - // - layoutControlItem8.Control = textEdit2; - layoutControlItem8.Location = new Point(394, 228); - layoutControlItem8.Name = "layoutControlItem8"; - layoutControlItem8.Size = new Size(475, 148); - layoutControlItem8.Text = "鍏ユ埛绠¢暱:"; - layoutControlItem8.TextSize = new Size(134, 18); // // layoutControlItem5 // layoutControlItem5.AllowHtmlStringInCaption = true; layoutControlItem5.Control = txtFloorHouseHolds; layoutControlItem5.CustomizationFormText = "鎴锋暟锛�"; - layoutControlItem5.Location = new Point(0, 80); + layoutControlItem5.Location = new Point(434, 40); layoutControlItem5.Name = "layoutControlItem5"; - layoutControlItem5.Size = new Size(394, 28); + layoutControlItem5.Size = new Size(435, 40); layoutControlItem5.Text = "<color=red>*</color>鎴锋暟:"; layoutControlItem5.TextSize = new Size(134, 18); - // - // txtWaterHeightitem - // - txtWaterHeightitem.AllowHtmlStringInCaption = true; - txtWaterHeightitem.Control = txtMaxWaterDemand; - txtWaterHeightitem.Location = new Point(394, 80); - txtWaterHeightitem.Name = "txtWaterHeightitem"; - txtWaterHeightitem.Size = new Size(475, 40); - txtWaterHeightitem.Text = "<color=red>*</color>鏈�澶х敤姘撮噺(m鲁/h):"; - txtWaterHeightitem.TextLocation = DevExpress.Utils.Locations.Left; - txtWaterHeightitem.TextSize = new Size(134, 18); - // - // layoutControlItem2 - // - layoutControlItem2.AllowHtmlStringInCaption = true; - layoutControlItem2.Control = textEditFacAmount; - layoutControlItem2.ControlAlignment = ContentAlignment.TopLeft; - layoutControlItem2.CustomizationFormText = "褰撻噺鍣ㄥ叿鏁伴噺锛�"; - layoutControlItem2.Location = new Point(394, 120); - layoutControlItem2.Name = "layoutControlItem2"; - layoutControlItem2.Size = new Size(475, 68); - layoutControlItem2.Text = "褰撻噺鍣ㄥ叿鏁伴噺锛�"; - layoutControlItem2.TextSize = new Size(134, 18); - layoutControlItem2.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never; // // dxErrorProvider1 // @@ -438,37 +336,29 @@ Margin = new Padding(2, 3, 2, 3); Name = "FacilitiesCtrl"; Size = new Size(889, 396); - ((System.ComponentModel.ISupportInitialize)FacilitiesWizardFormlayoutControl1ConvertedLayout).EndInit(); + ((System.ComponentModel.ISupportInitialize)FacilitiesWizardFormlayoutControl1ConvertedLayout).EndInit(); FacilitiesWizardFormlayoutControl1ConvertedLayout.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)txtFloorHeight.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)txtFloor.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)txtName.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)txtWaterPressure.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)txtMaxWaterDemand.Properties).EndInit(); - ((System.ComponentModel.ISupportInitialize)textEdit11.Properties).EndInit(); - ((System.ComponentModel.ISupportInitialize)textEditCount.Properties).EndInit(); - ((System.ComponentModel.ISupportInitialize)textEditFacAmount.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)comboBoxWaterSupply.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)comboBoxCompletePlant.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)txtFloorHouseHolds.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)txtConstantP.Properties).EndInit(); - ((System.ComponentModel.ISupportInitialize)textEdit2.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)textEditWaterModel.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlGroup1).EndInit(); - ((System.ComponentModel.ISupportInitialize)txtFloorHeightitem).EndInit(); ((System.ComponentModel.ISupportInitialize)txtFlooritem).EndInit(); ((System.ComponentModel.ISupportInitialize)comboBoxCompletePlantitem).EndInit(); ((System.ComponentModel.ISupportInitialize)txtNameitem).EndInit(); ((System.ComponentModel.ISupportInitialize)comboBoxWaterSupplyitem).EndInit(); ((System.ComponentModel.ISupportInitialize)txtWaterPressureitem).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem3).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem1).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem6).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem7).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem8).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem5).EndInit(); ((System.ComponentModel.ISupportInitialize)txtWaterHeightitem).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem2).EndInit(); + ((System.ComponentModel.ISupportInitialize)txtFloorHeightitem).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem6).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem5).EndInit(); ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).EndInit(); ResumeLayout(false); } @@ -492,12 +382,9 @@ private DevExpress.XtraEditors.TextEdit textEdit11; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; public DevExpress.XtraEditors.TextEdit textEditCount; - public DevExpress.XtraEditors.TextEdit textEditFacAmount; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; private DevExpress.XtraEditors.ImageComboBoxEdit comboBoxWaterSupply; private DevExpress.XtraEditors.ImageComboBoxEdit comboBoxCompletePlant; - private DevExpress.XtraEditors.TextEdit txtFloorHouseHolds; private DevExpress.XtraEditors.TextEdit txtConstantP; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6; @@ -505,5 +392,6 @@ private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8; private DevExpress.XtraEditors.ImageComboBoxEdit textEditWaterModel; + public DevExpress.XtraEditors.TextEdit txtFloorHouseHolds; } } diff --git a/WinFrmUI/PBS.WinFrmUI/02-facility/00-core/FacilitiesCtrl.cs b/WinFrmUI/PBS.WinFrmUI/02-facility/00-core/FacilitiesCtrl.cs index 41b2a47..91f7ee7 100644 --- a/WinFrmUI/PBS.WinFrmUI/02-facility/00-core/FacilitiesCtrl.cs +++ b/WinFrmUI/PBS.WinFrmUI/02-facility/00-core/FacilitiesCtrl.cs @@ -43,11 +43,11 @@ this.dxErrorProvider1.SetError(this.txtConstantP, "蹇呭~椤�"); isExist = false; } - if (this.comboBoxCompletePlant.Text == "璇烽�夋嫨") - { - this.dxErrorProvider1.SetError(this.comboBoxCompletePlant, "蹇呭~椤�"); - isExist = false; - } + /* if (this.comboBoxCompletePlant.Text == "璇烽�夋嫨") + { + this.dxErrorProvider1.SetError(this.comboBoxCompletePlant, "蹇呭~椤�"); + isExist = false; + }*/ if (this.comboBoxWaterSupply.Text == "璇烽�夋嫨") { this.dxErrorProvider1.SetError(this.comboBoxWaterSupply, "蹇呭~椤�"); @@ -63,38 +63,30 @@ this.dxErrorProvider1.SetError(this.txtWaterPressure, "蹇呭~椤�"); return false; } - if (string.IsNullOrEmpty(this.textEdit11.Text.Trim())) - { - this.dxErrorProvider1.SetError(this.textEdit11, "蹇呭~椤�"); - return false; - } return isExist; } + private Vmo.FacilityVmo _facilityVmo = new Vmo.FacilityVmo(); + public async void SetBindingData() { - /* this.txtName.EditValue = model.Name; - this.txtFloor.EditValue = model.Floor; - this.txtFloorHouseHolds.EditValue = model.Households; - this.txtFloorHeight.EditValue = model.FloorHeight; - this.txtMaxWaterDemand.EditValue = model.MaxWaterDemand; - this.txtWaterPressure.EditValue = model.TerminalPressure; - this.comboBoxWaterSupply.EditValue = model.WaterSupply; - - this.txtConstantP.EditValue = model.ConstantPressure; - this.imageComboBoxEdit11.EditValue = model.SupplyMode; - *//* if (_model.ModelConfig.Contains("2d")) - checkedListBoxControl1.Items[0].CheckState = System.Windows.Forms.CheckState.Checked; - if (_model.ModelConfig.Contains("3d")) - checkedListBoxControl1.Items[1].CheckState = System.Windows.Forms.CheckState.Checked; - *//* - layoutControlItem1.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always; - layoutControlItem2.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always; - - */ this.textEditWaterModel.Properties.AddEnum(typeof(HStation.PBS.eSupplyMode)); this.comboBoxWaterSupply.Properties.AddEnum(typeof(HStation.PBS.eWaterSupply)); var allPackages = await new HStation.BLL.AssetsPackageMain().GetAll(); + } + + public void SetData(Vmo.FacilityVmo model) + { + _facilityVmo = model; + this.txtName.EditValue = model.Name; + this.txtFloor.EditValue = model.Floor; + this.txtFloorHouseHolds.EditValue = model.Households; + this.txtFloorHeight.EditValue = model.FloorHeight; + this.txtMaxWaterDemand.EditValue = model.MaxWaterDemand; + this.txtWaterPressure.EditValue = model.TerminalPressure; + this.comboBoxWaterSupply.EditValue = model.WaterSupply; + this.txtConstantP.EditValue = model.ConstantPressure; + this.textEditWaterModel.EditValue = model.SupplyMode; } //鑾峰彇鏂囨湰淇℃伅 @@ -102,27 +94,20 @@ { if (!Valid()) return null; - var model = new Vmo.FacilityVmo(); - model.Floor = int.Parse(txtFloor.Text); - model.Name = txtName.Text; - // BuildingID = buildid, - model.SupplyMode = HStation.PBS.eSupplyMode.WaterTank; - //TemplateID = templateID, - model.UseStatus = Yw.Vmo.eUseStatus.Disable; - model.FloorHeight = double.Parse(txtFloorHeight.Text); - model.Households = int.Parse(txtFloorHouseHolds.Text); - model.ConstantPressure = double.Parse(txtConstantP.Text); - // ModelConfig = mc, - model.MaxWaterDemand = Convert.ToDouble(txtMaxWaterDemand.EditValue); - model.TerminalPressure = Convert.ToDouble(txtWaterPressure.EditValue); - //CompletePlant = comboBoxCompletePlant.EditValue.ToString(), + _facilityVmo.Floor = int.Parse(txtFloor.Text); + _facilityVmo.Name = txtName.Text; + _facilityVmo.SupplyMode = HStation.PBS.eSupplyMode.WaterTank; + _facilityVmo.UseStatus = Yw.Vmo.eUseStatus.Enable; + _facilityVmo.FloorHeight = double.Parse(txtFloorHeight.Text); + _facilityVmo.Households = int.Parse(txtFloorHouseHolds.Text); + _facilityVmo.ConstantPressure = double.Parse(txtConstantP.Text); + _facilityVmo.MaxWaterDemand = Convert.ToDouble(txtMaxWaterDemand.EditValue); + _facilityVmo.TerminalPressure = Convert.ToDouble(txtWaterPressure.EditValue); if (comboBoxWaterSupply.EditValue != null) { - model.WaterSupply = (HStation.PBS.eWaterSupply)comboBoxWaterSupply.EditValue; + _facilityVmo.WaterSupply = (HStation.PBS.eWaterSupply)comboBoxWaterSupply.EditValue; } - return model; - //= Convert.ToDouble(textEdit11.EditValue), - // ModelType = imageComboBoxEdit11.EditValue.ToString(), + return _facilityVmo; } } } \ No newline at end of file diff --git a/WinFrmUI/PBS.WinFrmUI/02-facility/00-core/FacilityViewModel.cs b/WinFrmUI/PBS.WinFrmUI/02-facility/00-core/FacilityViewModel.cs index aa2e303..40e4e6d 100644 --- a/WinFrmUI/PBS.WinFrmUI/02-facility/00-core/FacilityViewModel.cs +++ b/WinFrmUI/PBS.WinFrmUI/02-facility/00-core/FacilityViewModel.cs @@ -1,6 +1,7 @@ 锘縰sing HStation.PBS; using System.ComponentModel; using System.Windows.Forms.VisualStyles; +using Yw.Untity; namespace PBS.WinFrmUI { @@ -24,12 +25,13 @@ this.MaxWaterDemand = rhs.MaxWaterDemand; this.ConstantPressure = rhs.ConstantPressure; this.TerminalPressure = rhs.TerminalPressure; - this.Paras = rhs.Paras == null ? null : new(rhs.Paras); - this.Flags = rhs.Flags?.ToList(); + this.Paras = rhs.Paras == null ? null : rhs.Paras; + this.Flags = FlagsHelper.ToString(rhs.Flags); this.TagName = rhs.TagName; this.UseStatus = rhs.UseStatus; this.SortCode = rhs.SortCode; this.Description = rhs.Description; + this.Vmo = rhs; } public void Resert(Vmo.FacilityVmo rhs) @@ -46,12 +48,13 @@ this.MaxWaterDemand = rhs.MaxWaterDemand; this.ConstantPressure = rhs.ConstantPressure; this.TerminalPressure = rhs.TerminalPressure; - this.Paras = rhs.Paras == null ? null : new(rhs.Paras); - this.Flags = rhs.Flags?.ToList(); + this.Paras = rhs.Paras == null ? null : rhs.Paras; + this.Flags = FlagsHelper.ToString(rhs.Flags); this.TagName = rhs.TagName; this.UseStatus = rhs.UseStatus; this.SortCode = rhs.SortCode; this.Description = rhs.Description; + this.Vmo = rhs; } /// <summary> @@ -152,7 +155,7 @@ ///</summary> [DisplayName("鏍囩")] [Browsable(true)] - public List<string> Flags { get; set; } + public string Flags { get; set; } /// <summary> /// 鏍囧織 @@ -181,5 +184,7 @@ [DisplayName("璇存槑")] [Browsable(true)] public string Description { get; set; } + + public Vmo.FacilityVmo Vmo { get; set; } } } \ No newline at end of file diff --git a/WinFrmUI/PBS.WinFrmUI/02-facility/AddPlaceDlg.Designer.cs b/WinFrmUI/PBS.WinFrmUI/02-facility/AddFacilityDlg.Designer.cs similarity index 90% rename from WinFrmUI/PBS.WinFrmUI/02-facility/AddPlaceDlg.Designer.cs rename to WinFrmUI/PBS.WinFrmUI/02-facility/AddFacilityDlg.Designer.cs index f66e5e4..7dc2bee 100644 --- a/WinFrmUI/PBS.WinFrmUI/02-facility/AddPlaceDlg.Designer.cs +++ b/WinFrmUI/PBS.WinFrmUI/02-facility/AddFacilityDlg.Designer.cs @@ -31,14 +31,14 @@ Root = new DevExpress.XtraLayout.LayoutControlGroup(); layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); generalOkAndCancelCtrl1 = new Yw.WinFrmUI.GeneralOkAndCancelCtrl(); - layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); - facilitiesCtrl = new FacilitiesCtrl(); layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + facilitiesCtrl = new FacilitiesCtrl(); + layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); ((System.ComponentModel.ISupportInitialize)Root).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem7).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem1).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControl1).BeginInit(); layoutControl1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem1).BeginInit(); SuspendLayout(); // // Root @@ -49,15 +49,15 @@ Root.GroupBordersVisible = false; Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem7, layoutControlItem1 }); Root.Name = "Root"; - Root.Size = new Size(779, 347); + Root.Size = new Size(753, 287); Root.TextVisible = false; // // layoutControlItem7 // layoutControlItem7.Control = generalOkAndCancelCtrl1; - layoutControlItem7.Location = new Point(0, 290); + layoutControlItem7.Location = new Point(0, 230); layoutControlItem7.Name = "layoutControlItem7"; - layoutControlItem7.Size = new Size(759, 37); + layoutControlItem7.Size = new Size(733, 37); layoutControlItem7.TextSize = new Size(0, 0); layoutControlItem7.TextVisible = false; // @@ -67,11 +67,28 @@ generalOkAndCancelCtrl1.ButtonCancelMinSize = new Size(114, 33); generalOkAndCancelCtrl1.ButtonOkMaxSize = new Size(131, 42); generalOkAndCancelCtrl1.ButtonOkMinSize = new Size(114, 33); - generalOkAndCancelCtrl1.Location = new Point(12, 302); + generalOkAndCancelCtrl1.Location = new Point(12, 242); generalOkAndCancelCtrl1.Margin = new Padding(3, 5, 3, 5); generalOkAndCancelCtrl1.Name = "generalOkAndCancelCtrl1"; - generalOkAndCancelCtrl1.Size = new Size(755, 33); + generalOkAndCancelCtrl1.Size = new Size(729, 33); generalOkAndCancelCtrl1.TabIndex = 0; + // + // layoutControlItem1 + // + layoutControlItem1.Control = facilitiesCtrl; + layoutControlItem1.Location = new Point(0, 0); + layoutControlItem1.Name = "layoutControlItem1"; + layoutControlItem1.Size = new Size(733, 230); + layoutControlItem1.TextSize = new Size(0, 0); + layoutControlItem1.TextVisible = false; + // + // facilitiesCtrl + // + facilitiesCtrl.Location = new Point(12, 12); + facilitiesCtrl.Margin = new Padding(2, 3, 2, 3); + facilitiesCtrl.Name = "facilitiesCtrl"; + facilitiesCtrl.Size = new Size(729, 226); + facilitiesCtrl.TabIndex = 4; // // layoutControl1 // @@ -83,32 +100,15 @@ layoutControl1.Name = "layoutControl1"; layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new Rectangle(826, 220, 650, 400); layoutControl1.Root = Root; - layoutControl1.Size = new Size(779, 347); + layoutControl1.Size = new Size(753, 287); layoutControl1.TabIndex = 2; layoutControl1.Text = "layoutControl1"; - // - // facilitiesWizardForm1 - // - facilitiesCtrl.Location = new Point(12, 12); - facilitiesCtrl.Margin = new Padding(2, 3, 2, 3); - facilitiesCtrl.Name = "facilitiesWizardForm1"; - facilitiesCtrl.Size = new Size(755, 286); - facilitiesCtrl.TabIndex = 4; - // - // layoutControlItem1 - // - layoutControlItem1.Control = facilitiesCtrl; - layoutControlItem1.Location = new Point(0, 0); - layoutControlItem1.Name = "layoutControlItem1"; - layoutControlItem1.Size = new Size(759, 290); - layoutControlItem1.TextSize = new Size(0, 0); - layoutControlItem1.TextVisible = false; // // AddFacilityDlg // AutoScaleDimensions = new SizeF(8F, 18F); AutoScaleMode = AutoScaleMode.Font; - ClientSize = new Size(779, 347); + ClientSize = new Size(753, 287); Controls.Add(layoutControl1); Margin = new Padding(3, 4, 3, 4); Name = "AddFacilityDlg"; @@ -116,9 +116,9 @@ Text = "鏂板"; ((System.ComponentModel.ISupportInitialize)Root).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem7).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem1).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControl1).EndInit(); layoutControl1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)layoutControlItem1).EndInit(); ResumeLayout(false); } diff --git a/WinFrmUI/PBS.WinFrmUI/02-facility/AddFacilityDlg.cs b/WinFrmUI/PBS.WinFrmUI/02-facility/AddFacilityDlg.cs new file mode 100644 index 0000000..23d6f90 --- /dev/null +++ b/WinFrmUI/PBS.WinFrmUI/02-facility/AddFacilityDlg.cs @@ -0,0 +1,39 @@ +锘縰sing DevExpress.XtraEditors; +using HStation.PBS; +using Yw.WinFrmUI; + +namespace PBS.WinFrmUI +{ + public partial class AddFacilityDlg : DevExpress.XtraEditors.XtraForm + { + public AddFacilityDlg() + { + InitializeComponent(); + this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; + this.generalOkAndCancelCtrl1.OkEvent += GeneralOkAndCancelCtrl1_OkEvent; + } + + + public event Func<Vmo.FacilityVmo, Task<bool>> ReloadDataEvent; + + + /// <summary> + /// 纭畾 + /// </summary> + private async void GeneralOkAndCancelCtrl1_OkEvent() + { + var vmo = this.facilitiesCtrl.GetData(); + if (vmo == null) + return; + if (await ReloadDataEvent.Invoke(vmo)) + { + TipFormHelper.ShowSucceed("鏂板鎴愬姛锛�"); + } + else + { + TipFormHelper.ShowError("鏂板澶辫触锛�"); + } + this.Close(); + } + } +} \ No newline at end of file diff --git a/WinFrmUI/PBS.WinFrmUI/02-facility/AddPlaceDlg.resx b/WinFrmUI/PBS.WinFrmUI/02-facility/AddFacilityDlg.resx similarity index 100% rename from WinFrmUI/PBS.WinFrmUI/02-facility/AddPlaceDlg.resx rename to WinFrmUI/PBS.WinFrmUI/02-facility/AddFacilityDlg.resx diff --git a/WinFrmUI/PBS.WinFrmUI/02-facility/AddPlaceDlg.cs b/WinFrmUI/PBS.WinFrmUI/02-facility/AddPlaceDlg.cs deleted file mode 100644 index 499df26..0000000 --- a/WinFrmUI/PBS.WinFrmUI/02-facility/AddPlaceDlg.cs +++ /dev/null @@ -1,51 +0,0 @@ -锘縰sing DevExpress.XtraEditors; -using HStation.PBS; -using Yw.WinFrmUI; - -namespace PBS.WinFrmUI -{ - public partial class AddFacilityDlg : DevExpress.XtraEditors.XtraForm - { - public AddFacilityDlg() - { - InitializeComponent(); - this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; - this.generalOkAndCancelCtrl1.OkEvent += GeneralOkAndCancelCtrl1_OkEvent; ; - } - - private Vmo.FacilityVmo _facilityVmo; - - public event Func<Vmo.FacilityVmo, Task<bool>> ReloadDataEvent; - - public async void SetBindingData(ePlaceType placeType) - { - _facilityVmo = new Vmo.FacilityVmo(); - /* if (list != null && list.Count > 0) - { - foreach (var item in list) - { - var vm = new DivisionViewModel(item); - _allBindingList.Add(vm); - } - } - this.divisionViewModelBindingSource.DataSource = _allBindingList;*/ - } - - /// <summary> - /// 纭畾 - /// </summary> - private async void GeneralOkAndCancelCtrl1_OkEvent() - { - var vmo= this.facilitiesCtrl.GetData(); - if (await ReloadDataEvent.Invoke(vmo)) - { - TipFormHelper.ShowSucceed("鏂板鎴愬姛锛�"); - } - else - { - TipFormHelper.ShowError("鏂板澶辫触锛�"); - } - this.Close(); - } - } -} \ No newline at end of file diff --git a/WinFrmUI/PBS.WinFrmUI/02-facility/AddPlaceDlg.Designer.cs b/WinFrmUI/PBS.WinFrmUI/02-facility/EditFacilityDlg.Designer.cs similarity index 88% copy from WinFrmUI/PBS.WinFrmUI/02-facility/AddPlaceDlg.Designer.cs copy to WinFrmUI/PBS.WinFrmUI/02-facility/EditFacilityDlg.Designer.cs index f66e5e4..316404b 100644 --- a/WinFrmUI/PBS.WinFrmUI/02-facility/AddPlaceDlg.Designer.cs +++ b/WinFrmUI/PBS.WinFrmUI/02-facility/EditFacilityDlg.Designer.cs @@ -1,6 +1,6 @@ 锘縩amespace PBS.WinFrmUI { - partial class AddFacilityDlg + partial class EditFacilityDlg { /// <summary> /// Required designer variable. @@ -31,14 +31,14 @@ Root = new DevExpress.XtraLayout.LayoutControlGroup(); layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); generalOkAndCancelCtrl1 = new Yw.WinFrmUI.GeneralOkAndCancelCtrl(); - layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); - facilitiesCtrl = new FacilitiesCtrl(); layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + facilitiesCtrl = new FacilitiesCtrl(); + layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); ((System.ComponentModel.ISupportInitialize)Root).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem7).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem1).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControl1).BeginInit(); layoutControl1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem1).BeginInit(); SuspendLayout(); // // Root @@ -49,15 +49,15 @@ Root.GroupBordersVisible = false; Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem7, layoutControlItem1 }); Root.Name = "Root"; - Root.Size = new Size(779, 347); + Root.Size = new Size(769, 292); Root.TextVisible = false; // // layoutControlItem7 // layoutControlItem7.Control = generalOkAndCancelCtrl1; - layoutControlItem7.Location = new Point(0, 290); + layoutControlItem7.Location = new Point(0, 235); layoutControlItem7.Name = "layoutControlItem7"; - layoutControlItem7.Size = new Size(759, 37); + layoutControlItem7.Size = new Size(749, 37); layoutControlItem7.TextSize = new Size(0, 0); layoutControlItem7.TextVisible = false; // @@ -67,11 +67,28 @@ generalOkAndCancelCtrl1.ButtonCancelMinSize = new Size(114, 33); generalOkAndCancelCtrl1.ButtonOkMaxSize = new Size(131, 42); generalOkAndCancelCtrl1.ButtonOkMinSize = new Size(114, 33); - generalOkAndCancelCtrl1.Location = new Point(12, 302); + generalOkAndCancelCtrl1.Location = new Point(12, 247); generalOkAndCancelCtrl1.Margin = new Padding(3, 5, 3, 5); generalOkAndCancelCtrl1.Name = "generalOkAndCancelCtrl1"; - generalOkAndCancelCtrl1.Size = new Size(755, 33); + generalOkAndCancelCtrl1.Size = new Size(745, 33); generalOkAndCancelCtrl1.TabIndex = 0; + // + // layoutControlItem1 + // + layoutControlItem1.Control = facilitiesCtrl; + layoutControlItem1.Location = new Point(0, 0); + layoutControlItem1.Name = "layoutControlItem1"; + layoutControlItem1.Size = new Size(749, 235); + layoutControlItem1.TextSize = new Size(0, 0); + layoutControlItem1.TextVisible = false; + // + // facilitiesCtrl + // + facilitiesCtrl.Location = new Point(12, 12); + facilitiesCtrl.Margin = new Padding(2, 3, 2, 3); + facilitiesCtrl.Name = "facilitiesCtrl"; + facilitiesCtrl.Size = new Size(745, 231); + facilitiesCtrl.TabIndex = 4; // // layoutControl1 // @@ -83,42 +100,25 @@ layoutControl1.Name = "layoutControl1"; layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new Rectangle(826, 220, 650, 400); layoutControl1.Root = Root; - layoutControl1.Size = new Size(779, 347); + layoutControl1.Size = new Size(769, 292); layoutControl1.TabIndex = 2; layoutControl1.Text = "layoutControl1"; // - // facilitiesWizardForm1 - // - facilitiesCtrl.Location = new Point(12, 12); - facilitiesCtrl.Margin = new Padding(2, 3, 2, 3); - facilitiesCtrl.Name = "facilitiesWizardForm1"; - facilitiesCtrl.Size = new Size(755, 286); - facilitiesCtrl.TabIndex = 4; - // - // layoutControlItem1 - // - layoutControlItem1.Control = facilitiesCtrl; - layoutControlItem1.Location = new Point(0, 0); - layoutControlItem1.Name = "layoutControlItem1"; - layoutControlItem1.Size = new Size(759, 290); - layoutControlItem1.TextSize = new Size(0, 0); - layoutControlItem1.TextVisible = false; - // - // AddFacilityDlg + // EditFacilityDlg // AutoScaleDimensions = new SizeF(8F, 18F); AutoScaleMode = AutoScaleMode.Font; - ClientSize = new Size(779, 347); + ClientSize = new Size(769, 292); Controls.Add(layoutControl1); Margin = new Padding(3, 4, 3, 4); - Name = "AddFacilityDlg"; + Name = "EditFacilityDlg"; StartPosition = FormStartPosition.CenterScreen; - Text = "鏂板"; + Text = "缂栬緫"; ((System.ComponentModel.ISupportInitialize)Root).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem7).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem1).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControl1).EndInit(); layoutControl1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)layoutControlItem1).EndInit(); ResumeLayout(false); } diff --git a/WinFrmUI/PBS.WinFrmUI/02-facility/EditFacilityDlg.cs b/WinFrmUI/PBS.WinFrmUI/02-facility/EditFacilityDlg.cs new file mode 100644 index 0000000..4660306 --- /dev/null +++ b/WinFrmUI/PBS.WinFrmUI/02-facility/EditFacilityDlg.cs @@ -0,0 +1,42 @@ +锘縰sing DevExpress.XtraEditors; +using HStation.PBS; +using Yw.WinFrmUI; + +namespace PBS.WinFrmUI +{ + public partial class EditFacilityDlg : DevExpress.XtraEditors.XtraForm + { + public EditFacilityDlg() + { + InitializeComponent(); + this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; + this.generalOkAndCancelCtrl1.OkEvent += GeneralOkAndCancelCtrl1_OkEvent; + } + + public event Func<Vmo.FacilityVmo, Task<bool>> ReloadDataEvent; + + public void SetBindingData(Vmo.FacilityVmo vmo) + { + this.facilitiesCtrl.SetData(vmo); + } + + /// <summary> + /// 纭畾 + /// </summary> + private async void GeneralOkAndCancelCtrl1_OkEvent() + { + var vmo = this.facilitiesCtrl.GetData(); + if (vmo == null) + return; + if (await ReloadDataEvent.Invoke(vmo)) + { + TipFormHelper.ShowSucceed("淇敼鎴愬姛锛�"); + } + else + { + TipFormHelper.ShowError("淇敼澶辫触锛�"); + } + this.Close(); + } + } +} \ No newline at end of file diff --git a/WinFrmUI/PBS.WinFrmUI/02-facility/AddPlaceDlg.resx b/WinFrmUI/PBS.WinFrmUI/02-facility/EditFacilityDlg.resx similarity index 100% copy from WinFrmUI/PBS.WinFrmUI/02-facility/AddPlaceDlg.resx copy to WinFrmUI/PBS.WinFrmUI/02-facility/EditFacilityDlg.resx diff --git a/WinFrmUI/PBS.WinFrmUI/02-facility/FacilityMgrPage.Designer.cs b/WinFrmUI/PBS.WinFrmUI/02-facility/FacilityMgrPage.Designer.cs index 85c2a61..4acf693 100644 --- a/WinFrmUI/PBS.WinFrmUI/02-facility/FacilityMgrPage.Designer.cs +++ b/WinFrmUI/PBS.WinFrmUI/02-facility/FacilityMgrPage.Designer.cs @@ -196,8 +196,6 @@ colParas.FieldName = "Paras"; colParas.MinWidth = 25; colParas.Name = "colParas"; - colParas.Visible = true; - colParas.VisibleIndex = 9; colParas.Width = 94; // // colTagName @@ -206,7 +204,7 @@ colTagName.MinWidth = 25; colTagName.Name = "colTagName"; colTagName.Visible = true; - colTagName.VisibleIndex = 10; + colTagName.VisibleIndex = 9; colTagName.Width = 94; // // colUseStatus @@ -215,7 +213,7 @@ colUseStatus.MinWidth = 25; colUseStatus.Name = "colUseStatus"; colUseStatus.Visible = true; - colUseStatus.VisibleIndex = 11; + colUseStatus.VisibleIndex = 10; colUseStatus.Width = 94; // // colSortCode @@ -231,7 +229,7 @@ colDescription.MinWidth = 25; colDescription.Name = "colDescription"; colDescription.Visible = true; - colDescription.VisibleIndex = 12; + colDescription.VisibleIndex = 11; colDescription.Width = 94; // // ribbonControl1 @@ -259,6 +257,7 @@ barBtnEdit.Id = 17; barBtnEdit.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnEdit.ImageOptions.SvgImage"); barBtnEdit.Name = "barBtnEdit"; + barBtnEdit.ItemClick += barBtnEdit_ItemClick; // // barBtnRefresh // diff --git a/WinFrmUI/PBS.WinFrmUI/02-facility/FacilityMgrPage.cs b/WinFrmUI/PBS.WinFrmUI/02-facility/FacilityMgrPage.cs index 1898c84..d26f019 100644 --- a/WinFrmUI/PBS.WinFrmUI/02-facility/FacilityMgrPage.cs +++ b/WinFrmUI/PBS.WinFrmUI/02-facility/FacilityMgrPage.cs @@ -10,6 +10,7 @@ public FacilityMgrPage() { InitializeComponent(); + this.gridView1.SetNormalView(30); } private List<FacilityViewModel> _allBindingList; @@ -55,6 +56,30 @@ dlg.ShowDialog(); } + //缂栬緫 + private void barBtnEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + var vm = this.gridView1.GetCurrentViewModel(_allBindingList); + if (vm == null) + { + TipFormHelper.ShowWarn("璇烽�夋嫨鏁版嵁琛�"); + } + var dlg = new EditFacilityDlg(); + dlg.SetBindingData(vm.Vmo); + dlg.ReloadDataEvent += async (vmo) => + { + var bol = await _facilityBll.Update(vmo); + if (bol) + { + vm.Resert(vmo); + this.facilityViewModelBindingSource.ResetBindings(false); + return true; + } + return false; + }; + dlg.ShowDialog(); + } + //鍒犻櫎 private async void barBtnDelete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { diff --git a/WinFrmUI/PBS.WinFrmUI/PBS.WinFrmUI.csproj b/WinFrmUI/PBS.WinFrmUI/PBS.WinFrmUI.csproj index 2131062..08bb629 100644 --- a/WinFrmUI/PBS.WinFrmUI/PBS.WinFrmUI.csproj +++ b/WinFrmUI/PBS.WinFrmUI/PBS.WinFrmUI.csproj @@ -40,7 +40,13 @@ </ItemGroup> <ItemGroup> - <Compile Update="02-facility\AddPlaceDlg.cs"> + <Compile Update="01-place\EditPlaceDlg.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Update="02-facility\EditFacilityDlg.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Update="02-facility\AddFacilityDlg.cs"> <SubType>Form</SubType> </Compile> <Compile Update="02-facility\FacilityMgrPage.cs"> diff --git a/WinFrmUI/Yw.WinFrmUI.Division.Core/01-division/DivisionMainPage.designer.cs b/WinFrmUI/Yw.WinFrmUI.Division.Core/01-division/DivisionMainPage.designer.cs index f18aa03..0893fe1 100644 --- a/WinFrmUI/Yw.WinFrmUI.Division.Core/01-division/DivisionMainPage.designer.cs +++ b/WinFrmUI/Yw.WinFrmUI.Division.Core/01-division/DivisionMainPage.designer.cs @@ -60,17 +60,20 @@ // ribbonControl1 // ribbonControl1.DrawGroupsBorderMode = DevExpress.Utils.DefaultBoolean.False; + ribbonControl1.EmptyAreaImageOptions.ImagePadding = new Padding(34, 39, 34, 39); ribbonControl1.ExpandCollapseItem.Id = 0; ribbonControl1.ItemPanelStyle = DevExpress.XtraBars.Ribbon.RibbonItemPanelStyle.Classic; ribbonControl1.Items.AddRange(new DevExpress.XtraBars.BarItem[] { ribbonControl1.ExpandCollapseItem, barBtnAdd, barBtnEdit, barBtnRefresh, barBtnDelete, barBtnUpdateSortCode, barBtnDetail, barBtnUpdateTagName, barCekSearch }); ribbonControl1.Location = new Point(0, 0); + ribbonControl1.Margin = new Padding(3, 4, 3, 4); ribbonControl1.MaxItemId = 28; ribbonControl1.Name = "ribbonControl1"; + ribbonControl1.OptionsMenuMinWidth = 377; ribbonControl1.Pages.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPage[] { ribbonPage }); ribbonControl1.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.False; ribbonControl1.ShowExpandCollapseButton = DevExpress.Utils.DefaultBoolean.False; ribbonControl1.ShowPageHeadersMode = DevExpress.XtraBars.Ribbon.ShowPageHeadersMode.Hide; - ribbonControl1.Size = new Size(818, 104); + ribbonControl1.Size = new Size(935, 128); ribbonControl1.ToolbarLocation = DevExpress.XtraBars.Ribbon.RibbonQuickAccessToolbarLocation.Hidden; // // barBtnAdd @@ -165,72 +168,86 @@ treeList1.Columns.AddRange(new DevExpress.XtraTreeList.Columns.TreeListColumn[] { colName, colType, colADCode, colTagName, colSortCode, colDescription }); treeList1.DataSource = divisionViewModelBindingSource; treeList1.Dock = DockStyle.Fill; - treeList1.Location = new Point(0, 104); + treeList1.Location = new Point(0, 128); + treeList1.Margin = new Padding(3, 4, 3, 4); treeList1.MenuManager = ribbonControl1; + treeList1.MinWidth = 23; treeList1.Name = "treeList1"; treeList1.OptionsView.ShowTreeLines = DevExpress.Utils.DefaultBoolean.True; - treeList1.Size = new Size(818, 577); + treeList1.Size = new Size(935, 748); treeList1.TabIndex = 24; + treeList1.TreeLevelWidth = 21; treeList1.ViewStyle = DevExpress.XtraTreeList.TreeListViewStyle.TreeList; // // colName // colName.Caption = "鍚嶇О"; colName.FieldName = "Name"; + colName.MinWidth = 23; colName.Name = "colName"; colName.Visible = true; colName.VisibleIndex = 0; + colName.Width = 86; // // colType // colType.Caption = "绫诲瀷"; colType.FieldName = "Type"; + colType.MinWidth = 23; colType.Name = "colType"; colType.Visible = true; colType.VisibleIndex = 1; + colType.Width = 86; // // colADCode // colADCode.Caption = "楂樺痉缂栫爜"; colADCode.FieldName = "ADCode"; + colADCode.MinWidth = 23; colADCode.Name = "colADCode"; colADCode.Visible = true; colADCode.VisibleIndex = 2; + colADCode.Width = 86; // // colTagName // colTagName.Caption = "鏍囩鍚嶇О"; colTagName.FieldName = "TagName"; + colTagName.MinWidth = 23; colTagName.Name = "colTagName"; colTagName.Visible = true; colTagName.VisibleIndex = 3; + colTagName.Width = 86; // // colSortCode // colSortCode.Caption = "鎺掑簭鐮�"; colSortCode.FieldName = "SortCode"; + colSortCode.MinWidth = 23; colSortCode.Name = "colSortCode"; - colSortCode.Visible = true; - colSortCode.VisibleIndex = 4; + colSortCode.Width = 86; // // colDescription // colDescription.Caption = "璇存槑"; colDescription.FieldName = "Description"; + colDescription.MinWidth = 23; colDescription.Name = "colDescription"; colDescription.Visible = true; - colDescription.VisibleIndex = 5; + colDescription.VisibleIndex = 4; + colDescription.Width = 86; // // DivisionMainPage // Appearance.BackColor = SystemColors.Control; Appearance.Options.UseBackColor = true; - AutoScaleDimensions = new SizeF(7F, 14F); + AutoScaleDimensions = new SizeF(8F, 18F); AutoScaleMode = AutoScaleMode.Font; Controls.Add(treeList1); Controls.Add(ribbonControl1); + Margin = new Padding(3, 5, 3, 5); Name = "DivisionMainPage"; - Size = new Size(818, 681); + Size = new Size(935, 876); ((ISupportInitialize)ribbonControl1).EndInit(); ((ISupportInitialize)divisionViewModelBindingSource).EndInit(); ((ISupportInitialize)treeList1).EndInit(); -- Gitblit v1.9.3