From 25d1bf4c50f43cf6690c5ac92824959865c9d78f Mon Sep 17 00:00:00 2001 From: ningshuxia <ningshuxia0927@outlook.com> Date: 星期四, 13 三月 2025 10:34:40 +0800 Subject: [PATCH] BoxViewModel --- Service/PBS.Service/00-core/eWaterSupply.cs | 24 WinFrmUI/PBS.WinFrmUI/02-facility/FacilityMgrPage.Designer.cs | 253 ++- WinFrmUI/Yw.WinFrmUI.Division.Core/01-division/AddDivisonDlg.cs | 60 WinFrmUI/Yw.WinFrmUI.Division.Core/01-division/AddDivisonDlg.designer.cs | 122 + WinFrmUI/PBS.WinFrmUI/02-facility/AddPlaceDlg.cs | 51 Service/PBS.Service/00-core/eAdaptingType.cs | 31 Service/Yw.Service.Division.Core/03-settings/00-core/DivisionFileHelper.cs | 10 WinFrmUI/PBS.WinFrmUI/02-facility/00-core/FacilitiesCtrl.cs | 128 + Dto/PBS.Dto/02-facility/UpdateFacilityInput.cs | 83 Desktop/PBS.Desktop/DbFirstHelper.cs | 4 Service/PBS.Service/02-model/01-place/Place.cs | 37 WinFrmUI/Yw.WinFrmUI.Division.Core/01-division/DivisionMainPage.cs | 11 Dto/PBS.Dto/01-place/PlaceDto.cs | 44 WinFrmUI/PBS.WinFrmUI/PBS.WinFrmUI.csproj | 5 Service/Yw.Service.Division.Core/05-service/00-core/03-helper/DivisionDbFirstHelper.cs | 4 WinFrmUI/PBS.WinFrmUI/01-place/00-core/SchoolWizardForm.Designer.cs | 190 -- WinFrmUI/PBS.WinFrmUI/Properties/DataSources/PBS.WinFrmUI.FacilityViewModel.datasource | 10 WinFrmUI/PBS.WinFrmUI/01-place/00-core/SchoolWizardForm.cs | 15 WinFrmUI/PBS.WinFrmUI/02-facility/00-core/FacilitiesCtrl.Designer.cs | 509 +++++++ Dto/PBS.Dto/02-facility/AddFacilityInput.cs | 49 Dto/PBS.Dto/02-facility/FacilityDto.cs | 64 WinFrmUI/PBS.WinFrmUI/02-facility/00-core/FacilitiesCtrl.resx | 123 + Dto/PBS.Dto/01-place/AddPlaceInput.cs | 30 Vmo/PBS.Vmo/01-place/PlaceVmo.cs | 44 WinFrmUI/Yw.WinFrmUI.Division.Core/01-division/EditDivisionDlg.cs | 10 Vmo/PBS.Vmo/02-facility/FacilityVmo.cs | 64 WinFrmUI/PBS.WinFrmUI/01-place/PlaceMgrPage.resx | 4 Dto/PBS.Dto/01-place/UpdatePlaceInput.cs | 52 WinFrmUI/PBS.WinFrmUI/02-facility/00-core/FacilityViewModel.cs | 27 WinFrmUI/PBS.WinFrmUI/01-place/PlaceMgrPage.Designer.cs | 81 WinFrmUI/PBS.WinFrmUI/01-place/PlaceMgrPage.cs | 13 Service/PBS.Service/01-entity/02-facility/Facility.cs | 51 WinFrmUI/PBS.WinFrmUI/01-place/00-core/PlaceViewModel.cs | 18 WinFrmUI/PBS.WinFrmUI/01-place/00-core/BuildWizardForm.cs | 88 WinFrmUI/PBS.WinFrmUI/02-facility/AddPlaceDlg.resx | 120 + Service/Yw.Service.Division.Core/03-settings/01-paras/00-core/DivisionParas.cs | 2 WinFrmUI/PBS.WinFrmUI/01-place/00-core/HospitalWizardForm.Designer.cs | 174 -- WinFrmUI/PBS.WinFrmUI/01-place/00-core/HospitalWizardForm.cs | 15 WinFrmUI/PBS.WinFrmUI/01-place/AddPlaceDlg.Designer.cs | 223 +- WinFrmUI/PBS.WinFrmUI/01-place/00-core/ShopWizardForm.cs | 15 WinFrmUI/Yw.WinFrmUI.Division.Core/01-division/EditDivisionDlg.resx | 4 Service/Yw.Service.Division.Core/01-entity/Division.cs | 4 Desktop/PBS.Desktop/MainForm.cs | 2 WinFrmUI/Yw.WinFrmUI.Division.Core/01-division/EditDivisionDlg.designer.cs | 122 + Service/PBS.Service/02-model/02-facility/Facility.cs | 58 Service/PBS.Service/00-core/eSupplyMode.cs | 24 WinFrmUI/PBS.WinFrmUI/01-place/AddPlaceDlg.cs | 61 WinFrmUI/PBS.WinFrmUI/PBS.WinFrmUI.csproj.user | 6 WinFrmUI/PBS.WinFrmUI/01-place/00-core/BuildWizardForm.Designer.cs | 356 +--- WinFrmUI/PBS.WinFrmUI/02-facility/AddPlaceDlg.Designer.cs | 134 ++ WinFrmUI/PBS.WinFrmUI/02-facility/FacilityMgrPage.cs | 105 - WinFrmUI/PBS.WinFrmUI/02-facility/FacilityMgrPage.resx | 46 WinFrmUI/PBS.WinFrmUI/01-place/00-core/ShopWizardForm.Designer.cs | 223 -- 53 files changed, 2,317 insertions(+), 1,686 deletions(-) diff --git a/Desktop/PBS.Desktop/DbFirstHelper.cs b/Desktop/PBS.Desktop/DbFirstHelper.cs index d4f11ca..927e1e2 100644 --- a/Desktop/PBS.Desktop/DbFirstHelper.cs +++ b/Desktop/PBS.Desktop/DbFirstHelper.cs @@ -10,8 +10,8 @@ /// </summary> public static async void Initial() { - //await new Yw.BLL.DivisionDbFirstHelper().Initial(); - //await new Yw.BLL.HydroDbFirstHelper().Initial(); + await new Yw.BLL.DivisionDbFirstHelper().Initial(); + await new Yw.BLL.HydroDbFirstHelper().Initial(); await new Yw.BLL.DictDbFirstHelper().Initial(); await new Yw.BLL.PhartDbFirstHelper().Initial(); await new Yw.BLL.UnitDbFirstHelper().Initial(); diff --git a/Desktop/PBS.Desktop/MainForm.cs b/Desktop/PBS.Desktop/MainForm.cs index ea5dfa8..690b075 100644 --- a/Desktop/PBS.Desktop/MainForm.cs +++ b/Desktop/PBS.Desktop/MainForm.cs @@ -681,7 +681,7 @@ { if (!IsExistPage(guid, true)) { - var page = new DocumentPage(); + var page = new FacilityMgrPage(); page.PageGuid = guid; page.PageTitle.Caption = caption; page.PageTitle.HeaderSvgImage = svg; diff --git a/Dto/PBS.Dto/01-place/AddPlaceInput.cs b/Dto/PBS.Dto/01-place/AddPlaceInput.cs index 48b35d3..c4d322a 100644 --- a/Dto/PBS.Dto/01-place/AddPlaceInput.cs +++ b/Dto/PBS.Dto/01-place/AddPlaceInput.cs @@ -1,60 +1,58 @@ -锘縰sing System.ComponentModel.DataAnnotations; +锘縰sing HStation.PBS; +using System.ComponentModel.DataAnnotations; namespace PBS.Dto { /// <summary> /// 鍦烘墍 - ///</summary> + ///</summary> public class AddPlaceInput { /// <summary> /// 琛屾斂鍖哄煙鏍囪瘑 - ///</summary> + ///</summary> [Required, Range(1, long.MaxValue, ErrorMessage = "RegionID 蹇呴』澶т簬0")] public long RegionID { get; set; } /// <summary> /// 鍚嶇О - ///</summary> + ///</summary> [Required] public string Name { get; set; } /// <summary> /// 鍦烘墍绫诲瀷 - ///</summary> - public int PlaceType { get; set; } + ///</summary> + public ePlaceType PlaceType { get; set; } /// <summary> /// 鍦烘墍淇℃伅 - ///</summary> + ///</summary> public string PlaceInfo { get; set; } /// <summary> /// 鍦板潃 - ///</summary> + ///</summary> public string Address { get; set; } /// <summary> /// 鍙傛暟 - ///</summary> + ///</summary> public Dictionary<string, string> Paras { get; set; } /// <summary> /// 鏍囩 - ///</summary> + ///</summary> public List<string> Flags { get; set; } /// <summary> /// 鏍囧織 - ///</summary> + ///</summary> public string TagName { get; set; } /// <summary> /// 璇存槑 - ///</summary> + ///</summary> public string Description { get; set; } - - } -} - +} \ No newline at end of file diff --git a/Dto/PBS.Dto/01-place/PlaceDto.cs b/Dto/PBS.Dto/01-place/PlaceDto.cs index 2b2afcc..2f7ed03 100644 --- a/Dto/PBS.Dto/01-place/PlaceDto.cs +++ b/Dto/PBS.Dto/01-place/PlaceDto.cs @@ -1,14 +1,17 @@ -锘縩amespace PBS.Dto +锘縰sing HStation.PBS; + +namespace PBS.Dto { /// <summary> /// 鍦烘墍 - ///</summary> + ///</summary> public class PlaceDto { /// <summary> /// /// </summary> - public PlaceDto() { } + public PlaceDto() + { } /// <summary> /// @@ -24,72 +27,69 @@ this.Paras = rhs.Paras == null ? null : new(rhs.Paras); this.Flags = rhs.Flags?.ToList(); this.TagName = rhs.TagName; - this.UseStatus = (int)rhs.UseStatus; + this.UseStatus = rhs.UseStatus; this.SortCode = rhs.SortCode; this.Description = rhs.Description; } /// <summary> /// 鍦烘墍 - ///</summary> + ///</summary> public long ID { get; set; } /// <summary> /// 琛屾斂鍖哄煙鏍囪瘑 - ///</summary> + ///</summary> public long RegionID { get; set; } /// <summary> /// 鍚嶇О - ///</summary> + ///</summary> public string Name { get; set; } /// <summary> /// 鍦烘墍绫诲瀷 - ///</summary> - public int PlaceType { get; set; } + ///</summary> + public ePlaceType PlaceType { get; set; } /// <summary> /// 鍦烘墍淇℃伅 - ///</summary> + ///</summary> public string PlaceInfo { get; set; } /// <summary> /// 鍦板潃 - ///</summary> + ///</summary> public string Address { get; set; } /// <summary> /// 鍙傛暟 - ///</summary> + ///</summary> public Dictionary<string, string> Paras { get; set; } /// <summary> /// 鏍囩 - ///</summary> + ///</summary> public List<string> Flags { get; set; } /// <summary> /// 鏍囧織 - ///</summary> + ///</summary> public string TagName { get; set; } /// <summary> /// 浣跨敤鐘舵�� - ///</summary> - public int UseStatus { get; set; } + ///</summary> + public Yw.Model.eUseStatus UseStatus { get; set; } /// <summary> /// 鎺掑簭鐮� - ///</summary> + ///</summary> public int SortCode { get; set; } /// <summary> /// 璇存槑 - ///</summary> + ///</summary> public string Description { get; set; } - - } -} - +} \ No newline at end of file diff --git a/Dto/PBS.Dto/01-place/UpdatePlaceInput.cs b/Dto/PBS.Dto/01-place/UpdatePlaceInput.cs index 661777c..95b0afd 100644 --- a/Dto/PBS.Dto/01-place/UpdatePlaceInput.cs +++ b/Dto/PBS.Dto/01-place/UpdatePlaceInput.cs @@ -1,66 +1,64 @@ -锘縰sing System.ComponentModel.DataAnnotations; +锘縰sing HStation.PBS; +using System.ComponentModel.DataAnnotations; namespace PBS.Dto { /// <summary> /// 鍦烘墍 - ///</summary> + ///</summary> public class UpdatePlaceInput { /// <summary> - /// 鍦烘墍 - ///</summary> + /// 鍦烘墍 + ///</summary> [Required, Range(1, long.MaxValue, ErrorMessage = "ID 蹇呴』澶т簬0")] public long ID { get; set; } /// <summary> - /// 琛屾斂鍖哄煙鏍囪瘑 - ///</summary> + /// 琛屾斂鍖哄煙鏍囪瘑 + ///</summary> [Required, Range(1, long.MaxValue, ErrorMessage = "RegionID 蹇呴』澶т簬0")] public long RegionID { get; set; } /// <summary> - /// 鍚嶇О - ///</summary> + /// 鍚嶇О + ///</summary> [Required] public string Name { get; set; } /// <summary> - /// 鍦烘墍绫诲瀷 - ///</summary> - public int PlaceType { get; set; } + /// 鍦烘墍绫诲瀷 + ///</summary> + public ePlaceType PlaceType { get; set; } /// <summary> - /// 鍦烘墍淇℃伅 - ///</summary> + /// 鍦烘墍淇℃伅 + ///</summary> public string PlaceInfo { get; set; } /// <summary> - /// 鍦板潃 - ///</summary> + /// 鍦板潃 + ///</summary> public string Address { get; set; } /// <summary> - /// 鍙傛暟 - ///</summary> + /// 鍙傛暟 + ///</summary> public Dictionary<string, string> Paras { get; set; } /// <summary> - /// 鏍囩 - ///</summary> + /// 鏍囩 + ///</summary> public List<string> Flags { get; set; } /// <summary> - /// 鏍囧織 - ///</summary> + /// 鏍囧織 + ///</summary> public string TagName { get; set; } /// <summary> - /// 璇存槑 - ///</summary> + /// 璇存槑 + ///</summary> public string Description { get; set; } - - } -} - +} \ No newline at end of file diff --git a/Dto/PBS.Dto/02-facility/AddFacilityInput.cs b/Dto/PBS.Dto/02-facility/AddFacilityInput.cs index b4608a5..c249ec5 100644 --- a/Dto/PBS.Dto/02-facility/AddFacilityInput.cs +++ b/Dto/PBS.Dto/02-facility/AddFacilityInput.cs @@ -1,96 +1,89 @@ -锘縰sing System.ComponentModel.DataAnnotations; +锘縰sing HStation.PBS; +using System.ComponentModel.DataAnnotations; namespace PBS.Dto { /// <summary> /// 璁炬柦 - ///</summary> + ///</summary> public class AddFacilityInput { /// <summary> /// 鍦烘墍鏍囪瘑 - ///</summary> + ///</summary> [Required, Range(1, long.MaxValue, ErrorMessage = "PlaceID 蹇呴』澶т簬0")] public long PlaceID { get; set; } /// <summary> /// 鎴愬璁惧鏍囪瘑 - ///</summary> + ///</summary> [Required, Range(1, long.MaxValue, ErrorMessage = "PackageID 蹇呴』澶т簬0")] public long PackageID { get; set; } /// <summary> /// 鍚嶇О - ///</summary> + ///</summary> [Required] public string Name { get; set; } /// <summary> /// 渚涙按鍗曞厓 - ///</summary> - public int WaterSupply { get; set; } + ///</summary> + public eWaterSupply WaterSupply { get; set; } /// <summary> /// 渚涙按妯″紡 - ///</summary> - public int SupplyMode { get; set; } + ///</summary> + public eSupplyMode SupplyMode { get; set; } /// <summary> /// 妤煎眰 - ///</summary> + ///</summary> public int Floor { get; set; } /// <summary> /// 灞傞珮 - ///</summary> + ///</summary> public double? FloorHeight { get; set; } /// <summary> /// 鎴锋暟 - ///</summary> + ///</summary> public int? Households { get; set; } /// <summary> /// 鏈�澶ч渶姘撮噺 - ///</summary> + ///</summary> public double? MaxWaterDemand { get; set; } /// <summary> - /// 鍏ユ埛绠¢暱 - ///</summary> - public double? ServicePipeLength { get; set; } - - /// <summary> /// 鎭掑畾鍘嬪姏 - ///</summary> + ///</summary> public double? ConstantPressure { get; set; } /// <summary> /// 鏈鍘嬪姏 - ///</summary> + ///</summary> public double? TerminalPressure { get; set; } /// <summary> /// 鍙傛暟 - ///</summary> + ///</summary> public Dictionary<string, string> Paras { get; set; } /// <summary> /// 鏍囩 - ///</summary> + ///</summary> public List<string> Flags { get; set; } /// <summary> /// 鏍囧織 - ///</summary> + ///</summary> public string TagName { get; set; } /// <summary> /// 璇存槑 - ///</summary> + ///</summary> public string Description { get; set; } - - } -} - +} \ No newline at end of file diff --git a/Dto/PBS.Dto/02-facility/FacilityDto.cs b/Dto/PBS.Dto/02-facility/FacilityDto.cs index b85d9ba..80c3f61 100644 --- a/Dto/PBS.Dto/02-facility/FacilityDto.cs +++ b/Dto/PBS.Dto/02-facility/FacilityDto.cs @@ -1,14 +1,17 @@ -锘縩amespace PBS.Dto +锘縰sing HStation.PBS; + +namespace PBS.Dto { /// <summary> /// 璁炬柦 - ///</summary> + ///</summary> public class FacilityDto { /// <summary> /// /// </summary> - public FacilityDto() { } + public FacilityDto() + { } /// <summary> /// @@ -25,113 +28,104 @@ this.FloorHeight = rhs.FloorHeight; this.Households = rhs.Households; this.MaxWaterDemand = rhs.MaxWaterDemand; - this.ServicePipeLength = rhs.ServicePipeLength; this.ConstantPressure = rhs.ConstantPressure; this.TerminalPressure = rhs.TerminalPressure; this.Paras = rhs.Paras == null ? null : new(rhs.Paras); this.Flags = rhs.Flags?.ToList(); this.TagName = rhs.TagName; - this.UseStatus = (int)rhs.UseStatus; + this.UseStatus = rhs.UseStatus; this.SortCode = rhs.SortCode; this.Description = rhs.Description; } /// <summary> /// 鏍囪瘑 - ///</summary> + ///</summary> public long ID { get; set; } /// <summary> /// 鍦烘墍鏍囪瘑 - ///</summary> + ///</summary> public long PlaceID { get; set; } /// <summary> /// 鎴愬璁惧鏍囪瘑 - ///</summary> + ///</summary> public long PackageID { get; set; } /// <summary> /// 鍚嶇О - ///</summary> + ///</summary> public string Name { get; set; } /// <summary> /// 渚涙按鍗曞厓 - ///</summary> - public int WaterSupply { get; set; } + ///</summary> + public eWaterSupply WaterSupply { get; set; } /// <summary> /// 渚涙按妯″紡 - ///</summary> - public int SupplyMode { get; set; } + ///</summary> + public eSupplyMode SupplyMode { get; set; } /// <summary> /// 妤煎眰 - ///</summary> + ///</summary> public int Floor { get; set; } /// <summary> /// 灞傞珮 - ///</summary> + ///</summary> public double? FloorHeight { get; set; } /// <summary> /// 鎴锋暟 - ///</summary> + ///</summary> public int? Households { get; set; } /// <summary> /// 鏈�澶ч渶姘撮噺 - ///</summary> + ///</summary> public double? MaxWaterDemand { get; set; } /// <summary> - /// 鍏ユ埛绠¢暱 - ///</summary> - public double? ServicePipeLength { get; set; } - - /// <summary> /// 鎭掑畾鍘嬪姏 - ///</summary> + ///</summary> public double? ConstantPressure { get; set; } /// <summary> /// 鏈鍘嬪姏 - ///</summary> + ///</summary> public double? TerminalPressure { get; set; } /// <summary> /// 鍙傛暟 - ///</summary> + ///</summary> public Dictionary<string, string> Paras { get; set; } /// <summary> /// 鏍囩 - ///</summary> + ///</summary> public List<string> Flags { get; set; } /// <summary> /// 鏍囧織 - ///</summary> + ///</summary> public string TagName { get; set; } /// <summary> /// 浣跨敤鐘舵�� - ///</summary> - public int UseStatus { get; set; } + ///</summary> + public Yw.Model.eUseStatus UseStatus { get; set; } /// <summary> /// 鎺掑簭鐮� - ///</summary> + ///</summary> public int SortCode { get; set; } /// <summary> /// 璇存槑 - ///</summary> + ///</summary> public string Description { get; set; } - - } -} - +} \ No newline at end of file diff --git a/Dto/PBS.Dto/02-facility/UpdateFacilityInput.cs b/Dto/PBS.Dto/02-facility/UpdateFacilityInput.cs index 2d93553..d22a472 100644 --- a/Dto/PBS.Dto/02-facility/UpdateFacilityInput.cs +++ b/Dto/PBS.Dto/02-facility/UpdateFacilityInput.cs @@ -1,102 +1,95 @@ -锘縰sing System.ComponentModel.DataAnnotations; +锘縰sing HStation.PBS; +using System.ComponentModel.DataAnnotations; namespace PBS.Dto { /// <summary> /// 璁炬柦 - ///</summary> + ///</summary> public class UpdateFacilityInput { /// <summary> - /// 鏍囪瘑 - ///</summary> + /// 鏍囪瘑 + ///</summary> [Required, Range(1, long.MaxValue, ErrorMessage = "ID 蹇呴』澶т簬0")] public long ID { get; set; } /// <summary> - /// 鍦烘墍鏍囪瘑 - ///</summary> + /// 鍦烘墍鏍囪瘑 + ///</summary> [Required, Range(1, long.MaxValue, ErrorMessage = "PlaceID 蹇呴』澶т簬0")] public long PlaceID { get; set; } /// <summary> - /// 鎴愬璁惧鏍囪瘑 - ///</summary> + /// 鎴愬璁惧鏍囪瘑 + ///</summary> [Required, Range(1, long.MaxValue, ErrorMessage = "PackageID 蹇呴』澶т簬0")] public long PackageID { get; set; } /// <summary> - /// 鍚嶇О - ///</summary> + /// 鍚嶇О + ///</summary> [Required] public string Name { get; set; } /// <summary> - /// 渚涙按鍗曞厓 - ///</summary> - public int WaterSupply { get; set; } + /// 渚涙按鍗曞厓 + ///</summary> + public eWaterSupply WaterSupply { get; set; } /// <summary> - /// 渚涙按妯″紡 - ///</summary> - public int SupplyMode { get; set; } + /// 渚涙按妯″紡 + ///</summary> + public eSupplyMode SupplyMode { get; set; } /// <summary> - /// 妤煎眰 - ///</summary> + /// 妤煎眰 + ///</summary> public int Floor { get; set; } /// <summary> - /// 灞傞珮 - ///</summary> + /// 灞傞珮 + ///</summary> public double? FloorHeight { get; set; } /// <summary> - /// 鎴锋暟 - ///</summary> + /// 鎴锋暟 + ///</summary> public int? Households { get; set; } /// <summary> - /// 鏈�澶ч渶姘撮噺 - ///</summary> + /// 鏈�澶ч渶姘撮噺 + ///</summary> public double? MaxWaterDemand { get; set; } /// <summary> - /// 鍏ユ埛绠¢暱 - ///</summary> - public double? ServicePipeLength { get; set; } - - /// <summary> - /// 鎭掑畾鍘嬪姏 - ///</summary> + /// 鎭掑畾鍘嬪姏 + ///</summary> public double? ConstantPressure { get; set; } /// <summary> - /// 鏈鍘嬪姏 - ///</summary> + /// 鏈鍘嬪姏 + ///</summary> public double? TerminalPressure { get; set; } /// <summary> - /// 鍙傛暟 - ///</summary> + /// 鍙傛暟 + ///</summary> public Dictionary<string, string> Paras { get; set; } /// <summary> - /// 鏍囩 - ///</summary> + /// 鏍囩 + ///</summary> public List<string> Flags { get; set; } /// <summary> - /// 鏍囧織 - ///</summary> + /// 鏍囧織 + ///</summary> public string TagName { get; set; } /// <summary> - /// 璇存槑 - ///</summary> + /// 璇存槑 + ///</summary> public string Description { get; set; } - - } -} - +} \ No newline at end of file diff --git a/Service/PBS.Service/00-core/eAdaptingType.cs b/Service/PBS.Service/00-core/eAdaptingType.cs new file mode 100644 index 0000000..d265974 --- /dev/null +++ b/Service/PBS.Service/00-core/eAdaptingType.cs @@ -0,0 +1,31 @@ +锘縰sing System.ComponentModel.DataAnnotations; + +namespace HStation.PBS +{ + public enum ePlaceType + { + /// <summary> + /// 灏忓尯 + /// </summary> + [Display(Name = "灏忓尯")] + Build = 0, + + /// <summary> + /// 鍖婚櫌 + /// </summary> + [Display(Name = "鍖婚櫌")] + Hospital = 1, + + /// <summary> + /// 鍟嗛摵 + /// </summary> + [Display(Name = "鍟嗛摵")] + Shop = 2, + + /// <summary> + /// 瀛︽牎 + /// </summary> + [Display(Name = "瀛︽牎")] + School = 3, + } +} \ No newline at end of file diff --git a/Service/PBS.Service/00-core/eSupplyMode.cs b/Service/PBS.Service/00-core/eSupplyMode.cs new file mode 100644 index 0000000..9f66d6c --- /dev/null +++ b/Service/PBS.Service/00-core/eSupplyMode.cs @@ -0,0 +1,24 @@ +锘縰sing System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HStation.PBS +{ + /// <summary> + /// 渚涙按妯″紡 + /// </summary> + public enum eSupplyMode + { + [Display(Name = "鍔犲帇渚涙按")] + Pressurized = 0, + + [Display(Name = "灞嬮《姘寸")] + WaterTank = 1, + + [Display(Name = "甯傛斂鐩翠緵")] + Municipal = 2 + } +} \ No newline at end of file diff --git a/Service/PBS.Service/00-core/eWaterSupply.cs b/Service/PBS.Service/00-core/eWaterSupply.cs new file mode 100644 index 0000000..9292f19 --- /dev/null +++ b/Service/PBS.Service/00-core/eWaterSupply.cs @@ -0,0 +1,24 @@ +锘縰sing System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HStation.PBS +{ + /// <summary> + /// 渚涙按鍗曞厓 + /// </summary> + public enum eWaterSupply + { + [Display(Name = "浣庡尯")] + Low = 0, + + [Display(Name = "涓尯")] + Middle = 1, + + [Display(Name = "楂樺尯")] + Height = 2 + } +} \ No newline at end of file diff --git a/Service/PBS.Service/01-entity/02-facility/Facility.cs b/Service/PBS.Service/01-entity/02-facility/Facility.cs index 12d6b7d..74db6e0 100644 --- a/Service/PBS.Service/01-entity/02-facility/Facility.cs +++ b/Service/PBS.Service/01-entity/02-facility/Facility.cs @@ -12,7 +12,8 @@ /// <summary> /// /// </summary> - public Facility() { } + public Facility() + { } /// <summary> /// @@ -28,7 +29,6 @@ this.FloorHeight = rhs.FloorHeight; this.Households = rhs.Households; this.MaxWaterDemand = rhs.MaxWaterDemand; - this.ServicePipeLength = rhs.ServicePipeLength; this.ConstantPressure = rhs.ConstantPressure; this.TerminalPressure = rhs.TerminalPressure; this.Paras = rhs.Paras; @@ -40,100 +40,94 @@ } /// <summary> - /// 鍦烘墍鏍囪瘑 + /// 鍦烘墍鏍囪瘑 ///</summary> public long PlaceID { get; set; } /// <summary> - /// 鎴愬璁惧鏍囪瘑 + /// 鎴愬璁惧鏍囪瘑 ///</summary> public long PackageID { get; set; } /// <summary> - /// 鍚嶇О + /// 鍚嶇О ///</summary> [SugarColumn(Length = 50, IsNullable = true)] public string Name { get; set; } /// <summary> - /// 渚涙按鍗曞厓 + /// 渚涙按鍗曞厓 ///</summary> public int WaterSupply { get; set; } /// <summary> - /// 渚涙按妯″紡 + /// 渚涙按妯″紡 ///</summary> public int SupplyMode { get; set; } /// <summary> - /// 妤煎眰 + /// 妤煎眰 ///</summary> public int Floor { get; set; } /// <summary> - /// 灞傞珮 + /// 灞傞珮 ///</summary> public double FloorHeight { get; set; } /// <summary> - /// 鎴锋暟 + /// 鎴锋暟 ///</summary> public int Households { get; set; } /// <summary> - /// 鏈�澶ч渶姘撮噺 + /// 鏈�澶ч渶姘撮噺 ///</summary> public double MaxWaterDemand { get; set; } /// <summary> - /// 鍏ユ埛绠¢暱 - ///</summary> - public double ServicePipeLength { get; set; } - - /// <summary> - /// 鎭掑畾鍘嬪姏 + /// 鎭掑畾鍘嬪姏 ///</summary> public double ConstantPressure { get; set; } /// <summary> - /// 鏈鍘嬪姏 + /// 鏈鍘嬪姏 ///</summary> public double TerminalPressure { get; set; } /// <summary> - /// 鍙傛暟 + /// 鍙傛暟 ///</summary> [SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = true)] public string Paras { get; set; } /// <summary> - /// 鏍囩 + /// 鏍囩 ///</summary> [SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = true)] public string Flags { get; set; } /// <summary> - /// 鏍囧織 + /// 鏍囧織 ///</summary> [SugarColumn(Length = 500, IsNullable = true)] public string TagName { get; set; } /// <summary> - /// 浣跨敤鐘舵�� + /// 浣跨敤鐘舵�� ///</summary> public int UseStatus { get; set; } /// <summary> - /// 鎺掑簭鐮� + /// 鎺掑簭鐮� ///</summary> public int SortCode { get; set; } /// <summary> - /// 璇存槑 + /// 璇存槑 ///</summary> [SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = true)] public string Description { get; set; } - /// <summary> /// @@ -147,10 +141,5 @@ { return this.MemberwiseClone(); } - } -} - - - - +} \ No newline at end of file diff --git a/Service/PBS.Service/02-model/01-place/Place.cs b/Service/PBS.Service/02-model/01-place/Place.cs index e59a0ea..d3a68a9 100644 --- a/Service/PBS.Service/02-model/01-place/Place.cs +++ b/Service/PBS.Service/02-model/01-place/Place.cs @@ -1,4 +1,5 @@ 锘縰sing Yw.Model; + namespace PBS.Model { /// <summary> @@ -10,7 +11,8 @@ /// <summary> /// /// </summary> - public Place() { } + public Place() + { } /// <summary> /// @@ -49,62 +51,60 @@ this.Description = rhs.Description; } - /// <summary> - /// 琛屾斂鍖哄煙鏍囪瘑 + /// 琛屾斂鍖哄煙鏍囪瘑 ///</summary> public long RegionID { get; set; } /// <summary> - /// 鍚嶇О + /// 鍚嶇О ///</summary> public string Name { get; set; } /// <summary> - /// 鍦烘墍绫诲瀷 + /// 鍦烘墍绫诲瀷 ///</summary> - public int PlaceType { get; set; } + public ePlaceType PlaceType { get; set; } /// <summary> - /// 鍦烘墍淇℃伅 + /// 鍦烘墍淇℃伅 ///</summary> public string PlaceInfo { get; set; } /// <summary> - /// 鍦板潃 + /// 鍦板潃 ///</summary> public string Address { get; set; } /// <summary> - /// 鍙傛暟 + /// 鍙傛暟 ///</summary> public Dictionary<string, string> Paras { get; set; } /// <summary> - /// 鏍囩 + /// 鏍囩 ///</summary> public List<string> Flags { get; set; } /// <summary> - /// 鏍囧織 + /// 鏍囧織 ///</summary> public string TagName { get; set; } /// <summary> - /// 浣跨敤鐘舵�� + /// 浣跨敤鐘舵�� ///</summary> public eUseStatus UseStatus { get; set; } /// <summary> - /// 鎺掑簭鐮� + /// 鎺掑簭鐮� ///</summary> public int SortCode { get; set; } /// <summary> - /// 璇存槑 + /// 璇存槑 ///</summary> public string Description { get; set; } - /// <summary> /// @@ -118,10 +118,5 @@ { return this.MemberwiseClone(); } - } -} - - - - +} \ No newline at end of file diff --git a/Service/PBS.Service/02-model/02-facility/Facility.cs b/Service/PBS.Service/02-model/02-facility/Facility.cs index f55a018..89c8101 100644 --- a/Service/PBS.Service/02-model/02-facility/Facility.cs +++ b/Service/PBS.Service/02-model/02-facility/Facility.cs @@ -1,4 +1,5 @@ 锘縰sing Yw.Model; + namespace PBS.Model { /// <summary> @@ -10,7 +11,8 @@ /// <summary> /// /// </summary> - public Facility() { } + public Facility() + { } /// <summary> /// @@ -26,7 +28,6 @@ this.FloorHeight = rhs.FloorHeight; this.Households = rhs.Households; this.MaxWaterDemand = rhs.MaxWaterDemand; - this.ServicePipeLength = rhs.ServicePipeLength; this.ConstantPressure = rhs.ConstantPressure; this.TerminalPressure = rhs.TerminalPressure; this.Paras = rhs.Paras == null ? null : new(rhs.Paras); @@ -52,7 +53,6 @@ this.FloorHeight = rhs.FloorHeight; this.Households = rhs.Households; this.MaxWaterDemand = rhs.MaxWaterDemand; - this.ServicePipeLength = rhs.ServicePipeLength; this.ConstantPressure = rhs.ConstantPressure; this.TerminalPressure = rhs.TerminalPressure; this.Paras = rhs.Paras == null ? null : new(rhs.Paras); @@ -63,97 +63,90 @@ this.Description = rhs.Description; } - /// <summary> - /// 鍦烘墍鏍囪瘑 + /// 鍦烘墍鏍囪瘑 ///</summary> public long PlaceID { get; set; } /// <summary> - /// 鎴愬璁惧鏍囪瘑 + /// 鎴愬璁惧鏍囪瘑 ///</summary> public long PackageID { get; set; } /// <summary> - /// 鍚嶇О + /// 鍚嶇О ///</summary> public string Name { get; set; } /// <summary> - /// 渚涙按鍗曞厓 + /// 渚涙按鍗曞厓 ///</summary> - public int WaterSupply { get; set; } + public eWaterSupply WaterSupply { get; set; } /// <summary> - /// 渚涙按妯″紡 + /// 渚涙按妯″紡 ///</summary> - public int SupplyMode { get; set; } + public eSupplyMode SupplyMode { get; set; } /// <summary> - /// 妤煎眰 + /// 妤煎眰 ///</summary> public int Floor { get; set; } /// <summary> - /// 灞傞珮 + /// 灞傞珮 ///</summary> public double? FloorHeight { get; set; } /// <summary> - /// 鎴锋暟 + /// 鎴锋暟 ///</summary> public int? Households { get; set; } /// <summary> - /// 鏈�澶ч渶姘撮噺 + /// 鏈�澶ч渶姘撮噺 ///</summary> public double? MaxWaterDemand { get; set; } /// <summary> - /// 鍏ユ埛绠¢暱 - ///</summary> - public double? ServicePipeLength { get; set; } - - /// <summary> - /// 鎭掑畾鍘嬪姏 + /// 鎭掑畾鍘嬪姏 ///</summary> public double? ConstantPressure { get; set; } /// <summary> - /// 鏈鍘嬪姏 + /// 鏈鍘嬪姏 ///</summary> public double? TerminalPressure { get; set; } /// <summary> - /// 鍙傛暟 + /// 鍙傛暟 ///</summary> public Dictionary<string, string> Paras { get; set; } /// <summary> - /// 鏍囩 + /// 鏍囩 ///</summary> public List<string> Flags { get; set; } /// <summary> - /// 鏍囧織 + /// 鏍囧織 ///</summary> public string TagName { get; set; } /// <summary> - /// 浣跨敤鐘舵�� + /// 浣跨敤鐘舵�� ///</summary> public eUseStatus UseStatus { get; set; } /// <summary> - /// 鎺掑簭鐮� + /// 鎺掑簭鐮� ///</summary> public int SortCode { get; set; } /// <summary> - /// 璇存槑 + /// 璇存槑 ///</summary> public string Description { get; set; } - /// <summary> /// @@ -167,10 +160,5 @@ { return this.MemberwiseClone(); } - } -} - - - - +} \ No newline at end of file diff --git a/Service/Yw.Service.Division.Core/01-entity/Division.cs b/Service/Yw.Service.Division.Core/01-entity/Division.cs index daef8b8..0283fe3 100644 --- a/Service/Yw.Service.Division.Core/01-entity/Division.cs +++ b/Service/Yw.Service.Division.Core/01-entity/Division.cs @@ -3,8 +3,8 @@ /// <summary> /// 琛屾斂鍖哄煙 /// </summary> - [SysType("assets_basic_division")] - [SugarTable("assets_basic_division")] + [SysType("yw_division")] + [SugarTable("yw_division")] public class Division : BaseEntity, ISorter, IFlags, ITagName, ITreeSorter, System.ICloneable { /// <summary> diff --git a/Service/Yw.Service.Division.Core/03-settings/00-core/DivisionFileHelper.cs b/Service/Yw.Service.Division.Core/03-settings/00-core/DivisionFileHelper.cs index b02c736..fba1f1e 100644 --- a/Service/Yw.Service.Division.Core/03-settings/00-core/DivisionFileHelper.cs +++ b/Service/Yw.Service.Division.Core/03-settings/00-core/DivisionFileHelper.cs @@ -14,7 +14,7 @@ { if (string.IsNullOrEmpty(_jsonFileName)) { - _jsonFileName = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "paras_xhs_settings.json"); + _jsonFileName = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "paras_divison_settings.json"); } return _jsonFileName; } @@ -25,7 +25,7 @@ /// <summary> /// 鑾峰彇 /// </summary> - internal static XhsParas Get() + internal static DivisionParas Get() { if (_appparas == null) { @@ -34,10 +34,10 @@ if (_appparas == null) { var json = File.ReadAllText(JsonFileName, Encoding.UTF8); - _appparas = JsonHelper.Json2Object<XhsParas>(json); + _appparas = JsonHelper.Json2Object<DivisionParas>(json); if (_appparas == null) { - _appparas = new XhsParas(); + _appparas = new DivisionParas(); } } } @@ -45,7 +45,7 @@ return _appparas; } - private static XhsParas _appparas = null; + private static DivisionParas _appparas = null; private static readonly object _locker = new object(); /// <summary> diff --git a/Service/Yw.Service.Division.Core/03-settings/01-paras/00-core/XhsParas.cs b/Service/Yw.Service.Division.Core/03-settings/01-paras/00-core/DivisionParas.cs similarity index 85% rename from Service/Yw.Service.Division.Core/03-settings/01-paras/00-core/XhsParas.cs rename to Service/Yw.Service.Division.Core/03-settings/01-paras/00-core/DivisionParas.cs index 2246303..335c033 100644 --- a/Service/Yw.Service.Division.Core/03-settings/01-paras/00-core/XhsParas.cs +++ b/Service/Yw.Service.Division.Core/03-settings/01-paras/00-core/DivisionParas.cs @@ -3,7 +3,7 @@ /// <summary> /// /// </summary> - internal class XhsParas + internal class DivisionParas { /// <summary> /// diff --git a/Service/Yw.Service.Division.Core/05-service/00-core/03-helper/DivisionDbFirstHelper.cs b/Service/Yw.Service.Division.Core/05-service/00-core/03-helper/DivisionDbFirstHelper.cs index abc2270..df1b6e2 100644 --- a/Service/Yw.Service.Division.Core/05-service/00-core/03-helper/DivisionDbFirstHelper.cs +++ b/Service/Yw.Service.Division.Core/05-service/00-core/03-helper/DivisionDbFirstHelper.cs @@ -42,8 +42,8 @@ var typeList = new List<Type>() { typeof(Entity.Division), - typeof(Entity.Part), - typeof(Entity.BuildingType) + // typeof(Entity.Part), + // typeof(Entity.BuildingType) }; using (var db = new SqlSugarClient(connectConfig)) diff --git a/Vmo/PBS.Vmo/01-place/PlaceVmo.cs b/Vmo/PBS.Vmo/01-place/PlaceVmo.cs index 4325112..f4cc1c0 100644 --- a/Vmo/PBS.Vmo/01-place/PlaceVmo.cs +++ b/Vmo/PBS.Vmo/01-place/PlaceVmo.cs @@ -1,14 +1,17 @@ -锘縩amespace PBS.Vmo +锘縰sing HStation.PBS; + +namespace PBS.Vmo { /// <summary> /// 鍦烘墍 - ///</summary> + ///</summary> public class PlaceVmo { /// <summary> /// /// </summary> - public PlaceVmo() { } + public PlaceVmo() + { } /// <summary> /// @@ -24,72 +27,69 @@ this.Paras = rhs.Paras == null ? null : new(rhs.Paras); this.Flags = rhs.Flags?.ToList(); this.TagName = rhs.TagName; - this.UseStatus = rhs.UseStatus; + this.UseStatus = (Yw.Vmo.eUseStatus)(int)rhs.UseStatus; this.SortCode = rhs.SortCode; this.Description = rhs.Description; } /// <summary> /// 鍦烘墍 - ///</summary> + ///</summary> public long ID { get; set; } /// <summary> /// 琛屾斂鍖哄煙鏍囪瘑 - ///</summary> + ///</summary> public long RegionID { get; set; } /// <summary> /// 鍚嶇О - ///</summary> + ///</summary> public string Name { get; set; } /// <summary> /// 鍦烘墍绫诲瀷 - ///</summary> - public int PlaceType { get; set; } + ///</summary> + public ePlaceType PlaceType { get; set; } /// <summary> /// 鍦烘墍淇℃伅 - ///</summary> + ///</summary> public string PlaceInfo { get; set; } /// <summary> /// 鍦板潃 - ///</summary> + ///</summary> public string Address { get; set; } /// <summary> /// 鍙傛暟 - ///</summary> + ///</summary> public Dictionary<string, string> Paras { get; set; } /// <summary> /// 鏍囩 - ///</summary> + ///</summary> public List<string> Flags { get; set; } /// <summary> /// 鏍囧織 - ///</summary> + ///</summary> public string TagName { get; set; } /// <summary> /// 浣跨敤鐘舵�� - ///</summary> - public int UseStatus { get; set; } + ///</summary> + public Yw.Vmo.eUseStatus UseStatus { get; set; } /// <summary> /// 鎺掑簭鐮� - ///</summary> + ///</summary> public int SortCode { get; set; } /// <summary> /// 璇存槑 - ///</summary> + ///</summary> public string Description { get; set; } - - } -} - +} \ No newline at end of file diff --git a/Vmo/PBS.Vmo/02-facility/FacilityVmo.cs b/Vmo/PBS.Vmo/02-facility/FacilityVmo.cs index 8b818c8..5a7d857 100644 --- a/Vmo/PBS.Vmo/02-facility/FacilityVmo.cs +++ b/Vmo/PBS.Vmo/02-facility/FacilityVmo.cs @@ -1,14 +1,17 @@ -锘縩amespace PBS.Vmo +锘縰sing HStation.PBS; + +namespace PBS.Vmo { /// <summary> /// 璁炬柦 - ///</summary> + ///</summary> public class FacilityVmo { /// <summary> /// /// </summary> - public FacilityVmo() { } + public FacilityVmo() + { } /// <summary> /// @@ -25,113 +28,104 @@ this.FloorHeight = rhs.FloorHeight; this.Households = rhs.Households; this.MaxWaterDemand = rhs.MaxWaterDemand; - this.ServicePipeLength = rhs.ServicePipeLength; this.ConstantPressure = rhs.ConstantPressure; this.TerminalPressure = rhs.TerminalPressure; this.Paras = rhs.Paras == null ? null : new(rhs.Paras); this.Flags = rhs.Flags?.ToList(); this.TagName = rhs.TagName; - this.UseStatus = rhs.UseStatus; + this.UseStatus = (Yw.Vmo.eUseStatus)(int)rhs.UseStatus; this.SortCode = rhs.SortCode; this.Description = rhs.Description; } /// <summary> /// 鏍囪瘑 - ///</summary> + ///</summary> public long ID { get; set; } /// <summary> /// 鍦烘墍鏍囪瘑 - ///</summary> + ///</summary> public long PlaceID { get; set; } /// <summary> /// 鎴愬璁惧鏍囪瘑 - ///</summary> + ///</summary> public long PackageID { get; set; } /// <summary> /// 鍚嶇О - ///</summary> + ///</summary> public string Name { get; set; } /// <summary> /// 渚涙按鍗曞厓 - ///</summary> - public int WaterSupply { get; set; } + ///</summary> + public eWaterSupply WaterSupply { get; set; } /// <summary> /// 渚涙按妯″紡 - ///</summary> - public int SupplyMode { get; set; } + ///</summary> + public eSupplyMode SupplyMode { get; set; } /// <summary> /// 妤煎眰 - ///</summary> + ///</summary> public int Floor { get; set; } /// <summary> /// 灞傞珮 - ///</summary> + ///</summary> public double? FloorHeight { get; set; } /// <summary> /// 鎴锋暟 - ///</summary> + ///</summary> public int? Households { get; set; } /// <summary> /// 鏈�澶ч渶姘撮噺 - ///</summary> + ///</summary> public double? MaxWaterDemand { get; set; } /// <summary> - /// 鍏ユ埛绠¢暱 - ///</summary> - public double? ServicePipeLength { get; set; } - - /// <summary> /// 鎭掑畾鍘嬪姏 - ///</summary> + ///</summary> public double? ConstantPressure { get; set; } /// <summary> /// 鏈鍘嬪姏 - ///</summary> + ///</summary> public double? TerminalPressure { get; set; } /// <summary> /// 鍙傛暟 - ///</summary> + ///</summary> public Dictionary<string, string> Paras { get; set; } /// <summary> /// 鏍囩 - ///</summary> + ///</summary> public List<string> Flags { get; set; } /// <summary> /// 鏍囧織 - ///</summary> + ///</summary> public string TagName { get; set; } /// <summary> /// 浣跨敤鐘舵�� - ///</summary> - public int UseStatus { get; set; } + ///</summary> + public Yw.Vmo.eUseStatus UseStatus { get; set; } /// <summary> /// 鎺掑簭鐮� - ///</summary> + ///</summary> public int SortCode { get; set; } /// <summary> /// 璇存槑 - ///</summary> + ///</summary> public string Description { get; set; } - - } -} - +} \ No newline at end of file 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 cbd28bd..a13743a 100644 --- a/WinFrmUI/PBS.WinFrmUI/01-place/00-core/BuildWizardForm.Designer.cs +++ b/WinFrmUI/PBS.WinFrmUI/01-place/00-core/BuildWizardForm.Designer.cs @@ -31,218 +31,155 @@ components = new System.ComponentModel.Container(); layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); cbPropertyType = new DevExpress.XtraEditors.ComboBoxEdit(); - txtName = new DevExpress.XtraEditors.TextEdit(); txtCompletionTime = new DevExpress.XtraEditors.TextEdit(); txtProperTyYears = new DevExpress.XtraEditors.TextEdit(); txtTotalHouseHolds = new DevExpress.XtraEditors.TextEdit(); txtAreaSquare = new DevExpress.XtraEditors.TextEdit(); txtPlotRatio = new DevExpress.XtraEditors.TextEdit(); txtDeveloper = new DevExpress.XtraEditors.TextEdit(); - cbArea = new DevExpress.XtraEditors.ImageComboBoxEdit(); - cbDist = new DevExpress.XtraEditors.ImageComboBoxEdit(); - cbCity = new DevExpress.XtraEditors.ImageComboBoxEdit(); + textGreeningRate = new DevExpress.XtraEditors.TextEdit(); Root = new DevExpress.XtraLayout.LayoutControlGroup(); - layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); - layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem13 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem17 = new DevExpress.XtraLayout.LayoutControlItem(); - r = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); - layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); - layoutControlItem11 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem15 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem19 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem23 = new DevExpress.XtraLayout.LayoutControlItem(); - emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem(); - layoutControlItem10 = new DevExpress.XtraLayout.LayoutControlItem(); - dxErrorProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(components); - txtAddress = new DevExpress.XtraEditors.TextEdit(); - layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); - textGreeningRate = new DevExpress.XtraEditors.TextEdit(); layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); + emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem(); + layoutControlItem11 = new DevExpress.XtraLayout.LayoutControlItem(); + dxErrorProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(components); ((System.ComponentModel.ISupportInitialize)layoutControl1).BeginInit(); layoutControl1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)cbPropertyType.Properties).BeginInit(); - ((System.ComponentModel.ISupportInitialize)txtName.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)txtCompletionTime.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)txtProperTyYears.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)txtTotalHouseHolds.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)txtAreaSquare.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)txtPlotRatio.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)txtDeveloper.Properties).BeginInit(); - ((System.ComponentModel.ISupportInitialize)cbArea.Properties).BeginInit(); - ((System.ComponentModel.ISupportInitialize)cbDist.Properties).BeginInit(); - ((System.ComponentModel.ISupportInitialize)cbCity.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)textGreeningRate.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)Root).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem1).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem7).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem13).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem17).BeginInit(); - ((System.ComponentModel.ISupportInitialize)r).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem8).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem3).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem11).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem15).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem19).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem23).BeginInit(); - ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem10).BeginInit(); - ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).BeginInit(); - ((System.ComponentModel.ISupportInitialize)txtAddress.Properties).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem2).BeginInit(); - ((System.ComponentModel.ISupportInitialize)textGreeningRate.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem4).BeginInit(); + ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem11).BeginInit(); + ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).BeginInit(); SuspendLayout(); // // layoutControl1 // layoutControl1.Controls.Add(cbPropertyType); - layoutControl1.Controls.Add(txtName); layoutControl1.Controls.Add(txtCompletionTime); layoutControl1.Controls.Add(txtProperTyYears); layoutControl1.Controls.Add(txtTotalHouseHolds); layoutControl1.Controls.Add(txtAreaSquare); layoutControl1.Controls.Add(txtPlotRatio); layoutControl1.Controls.Add(txtDeveloper); - layoutControl1.Controls.Add(cbArea); - layoutControl1.Controls.Add(cbDist); - layoutControl1.Controls.Add(cbCity); - layoutControl1.Controls.Add(txtAddress); layoutControl1.Controls.Add(textGreeningRate); 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(872, 229, 685, 516); layoutControl1.Root = Root; - layoutControl1.Size = new Size(809, 250); + layoutControl1.Size = new Size(925, 321); layoutControl1.TabIndex = 91; layoutControl1.Text = "layoutControl1"; // // cbPropertyType // - cbPropertyType.Location = new Point(496, 76); - cbPropertyType.Margin = new Padding(2); - cbPropertyType.MinimumSize = new Size(0, 28); + cbPropertyType.Location = new Point(121, 52); + cbPropertyType.Margin = new Padding(2, 3, 2, 3); + cbPropertyType.MinimumSize = new Size(0, 36); cbPropertyType.Name = "cbPropertyType"; cbPropertyType.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); cbPropertyType.Properties.Items.AddRange(new object[] { "鍏瘬浣忓畢" }); cbPropertyType.Properties.NullText = "璇烽�夋嫨"; cbPropertyType.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor; - cbPropertyType.Size = new Size(301, 28); + cbPropertyType.Size = new Size(339, 36); cbPropertyType.StyleController = layoutControl1; cbPropertyType.TabIndex = 6; // - // txtName - // - txtName.Location = new Point(102, 76); - txtName.Margin = new Padding(2); - txtName.MinimumSize = new Size(0, 28); - txtName.Name = "txtName"; - txtName.Size = new Size(300, 28); - txtName.StyleController = layoutControl1; - txtName.TabIndex = 5; - // // txtCompletionTime // - txtCompletionTime.Location = new Point(496, 108); - txtCompletionTime.Margin = new Padding(2); - txtCompletionTime.MinimumSize = new Size(0, 28); + txtCompletionTime.Location = new Point(573, 52); + txtCompletionTime.Margin = new Padding(2, 3, 2, 3); + txtCompletionTime.MinimumSize = new Size(0, 36); txtCompletionTime.Name = "txtCompletionTime"; txtCompletionTime.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager)); - txtCompletionTime.Size = new Size(301, 28); + txtCompletionTime.Size = new Size(340, 36); txtCompletionTime.StyleController = layoutControl1; txtCompletionTime.TabIndex = 8; // // txtProperTyYears // - txtProperTyYears.Location = new Point(102, 44); - txtProperTyYears.Margin = new Padding(2); - txtProperTyYears.MinimumSize = new Size(0, 28); + txtProperTyYears.Location = new Point(121, 12); + txtProperTyYears.Margin = new Padding(2, 3, 2, 3); + txtProperTyYears.MinimumSize = new Size(0, 36); txtProperTyYears.Name = "txtProperTyYears"; txtProperTyYears.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager)); - txtProperTyYears.Size = new Size(300, 28); + txtProperTyYears.Size = new Size(339, 36); txtProperTyYears.StyleController = layoutControl1; txtProperTyYears.TabIndex = 3; // // txtTotalHouseHolds // - txtTotalHouseHolds.Location = new Point(102, 140); - txtTotalHouseHolds.Margin = new Padding(2); - txtTotalHouseHolds.MinimumSize = new Size(0, 28); + txtTotalHouseHolds.Location = new Point(121, 92); + txtTotalHouseHolds.Margin = new Padding(2, 3, 2, 3); + txtTotalHouseHolds.MinimumSize = new Size(0, 36); txtTotalHouseHolds.Name = "txtTotalHouseHolds"; txtTotalHouseHolds.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager)); - txtTotalHouseHolds.Size = new Size(300, 28); + txtTotalHouseHolds.Size = new Size(339, 36); txtTotalHouseHolds.StyleController = layoutControl1; txtTotalHouseHolds.TabIndex = 9; // // txtAreaSquare // - txtAreaSquare.Location = new Point(496, 44); - txtAreaSquare.Margin = new Padding(2); - txtAreaSquare.MinimumSize = new Size(0, 28); + txtAreaSquare.Location = new Point(573, 12); + txtAreaSquare.Margin = new Padding(2, 3, 2, 3); + txtAreaSquare.MinimumSize = new Size(0, 36); txtAreaSquare.Name = "txtAreaSquare"; txtAreaSquare.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager)); - txtAreaSquare.Size = new Size(301, 28); + txtAreaSquare.Size = new Size(340, 36); txtAreaSquare.StyleController = layoutControl1; txtAreaSquare.TabIndex = 4; // // txtPlotRatio // - txtPlotRatio.Location = new Point(496, 140); - txtPlotRatio.Margin = new Padding(2); - txtPlotRatio.MinimumSize = new Size(0, 28); + txtPlotRatio.Location = new Point(573, 92); + txtPlotRatio.Margin = new Padding(2, 3, 2, 3); + txtPlotRatio.MinimumSize = new Size(0, 36); txtPlotRatio.Name = "txtPlotRatio"; txtPlotRatio.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager)); - txtPlotRatio.Size = new Size(301, 28); + txtPlotRatio.Size = new Size(340, 36); txtPlotRatio.StyleController = layoutControl1; txtPlotRatio.TabIndex = 10; // // txtDeveloper // - txtDeveloper.Location = new Point(102, 172); - txtDeveloper.Margin = new Padding(2); - txtDeveloper.MinimumSize = new Size(0, 28); + txtDeveloper.Location = new Point(121, 132); + txtDeveloper.Margin = new Padding(2, 3, 2, 3); + txtDeveloper.MinimumSize = new Size(0, 36); txtDeveloper.Name = "txtDeveloper"; - txtDeveloper.Size = new Size(300, 28); + txtDeveloper.Size = new Size(339, 36); txtDeveloper.StyleController = layoutControl1; txtDeveloper.TabIndex = 11; // - // cbArea + // textGreeningRate // - cbArea.Location = new Point(102, 108); - cbArea.Margin = new Padding(2); - cbArea.MinimumSize = new Size(0, 28); - cbArea.Name = "cbArea"; - cbArea.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); - cbArea.Properties.NullText = "璇烽�夋嫨"; - cbArea.Size = new Size(300, 28); - cbArea.StyleController = layoutControl1; - cbArea.TabIndex = 7; - cbArea.SelectedIndexChanged += cbArea_SelectedIndexChanged; - // - // cbDist - // - cbDist.Location = new Point(496, 12); - cbDist.Margin = new Padding(2); - cbDist.MinimumSize = new Size(0, 28); - cbDist.Name = "cbDist"; - cbDist.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); - cbDist.Properties.NullText = "璇烽�夋嫨"; - cbDist.Size = new Size(301, 28); - cbDist.StyleController = layoutControl1; - cbDist.TabIndex = 2; - // - // cbCity - // - cbCity.Location = new Point(102, 12); - cbCity.Margin = new Padding(2); - cbCity.MinimumSize = new Size(0, 28); - cbCity.Name = "cbCity"; - cbCity.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); - cbCity.Properties.NullText = "璇烽�夋嫨"; - cbCity.Size = new Size(300, 28); - cbCity.StyleController = layoutControl1; - cbCity.TabIndex = 0; + textGreeningRate.Location = new Point(573, 132); + textGreeningRate.Margin = new Padding(2, 3, 2, 3); + textGreeningRate.MinimumSize = new Size(0, 36); + textGreeningRate.Name = "textGreeningRate"; + textGreeningRate.Size = new Size(340, 36); + textGreeningRate.StyleController = layoutControl1; + textGreeningRate.TabIndex = 12; // // Root // @@ -250,240 +187,147 @@ Root.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; Root.GroupBordersVisible = false; - Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem1, layoutControlItem7, layoutControlItem13, layoutControlItem17, r, layoutControlItem8, layoutControlItem3, layoutControlItem11, layoutControlItem15, layoutControlItem19, layoutControlItem23, layoutControlItem2, layoutControlItem4, emptySpaceItem1 }); + Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem13, layoutControlItem17, layoutControlItem8, layoutControlItem15, layoutControlItem19, layoutControlItem23, layoutControlItem4, emptySpaceItem1, layoutControlItem11 }); Root.Name = "Root"; - Root.Size = new Size(809, 250); + Root.Size = new Size(925, 321); Root.TextVisible = false; - // - // layoutControlItem1 - // - layoutControlItem1.AllowHtmlStringInCaption = true; - layoutControlItem1.Control = cbCity; - layoutControlItem1.Location = new Point(0, 0); - layoutControlItem1.Name = "layoutControlItem1"; - layoutControlItem1.Size = new Size(394, 32); - layoutControlItem1.Text = "<color=red>*</color>鎵�灞炲煄甯�:"; - layoutControlItem1.TextSize = new Size(78, 14); - // - // layoutControlItem7 - // - layoutControlItem7.AllowHtmlStringInCaption = true; - layoutControlItem7.Control = cbDist; - layoutControlItem7.Location = new Point(394, 0); - layoutControlItem7.Name = "layoutControlItem7"; - layoutControlItem7.OptionsTableLayoutItem.ColumnIndex = 1; - layoutControlItem7.Size = new Size(395, 32); - layoutControlItem7.Text = "<color=red>*</color>鎵�灞炲尯鍘�:"; - layoutControlItem7.TextSize = new Size(78, 14); // // layoutControlItem13 // layoutControlItem13.AllowHtmlStringInCaption = true; layoutControlItem13.Control = txtProperTyYears; - layoutControlItem13.Location = new Point(0, 32); + layoutControlItem13.Location = new Point(0, 0); layoutControlItem13.Name = "layoutControlItem13"; layoutControlItem13.OptionsTableLayoutItem.RowIndex = 1; - layoutControlItem13.Size = new Size(394, 32); + layoutControlItem13.Size = new Size(452, 40); layoutControlItem13.Text = "浜ф潈骞撮檺(骞�):"; - layoutControlItem13.TextSize = new Size(78, 14); + layoutControlItem13.TextSize = new Size(97, 18); // // layoutControlItem17 // layoutControlItem17.Control = txtAreaSquare; - layoutControlItem17.Location = new Point(394, 32); + layoutControlItem17.Location = new Point(452, 0); layoutControlItem17.Name = "layoutControlItem17"; layoutControlItem17.OptionsTableLayoutItem.ColumnIndex = 1; layoutControlItem17.OptionsTableLayoutItem.RowIndex = 1; - layoutControlItem17.Size = new Size(395, 32); + layoutControlItem17.Size = new Size(453, 40); layoutControlItem17.Text = "鎬诲缓闈㈢Н(m鲁):"; - layoutControlItem17.TextSize = new Size(78, 14); - // - // r - // - r.AllowHtmlStringInCaption = true; - r.Control = txtName; - r.Location = new Point(0, 64); - r.Name = "layoutControlItem10"; - r.OptionsTableLayoutItem.RowIndex = 2; - r.Size = new Size(394, 32); - r.Text = "<color=red>*</color>灏忓尯鍚嶇О:"; - r.TextSize = new Size(78, 14); + layoutControlItem17.TextSize = new Size(97, 18); // // layoutControlItem8 // layoutControlItem8.Control = cbPropertyType; - layoutControlItem8.Location = new Point(394, 64); + layoutControlItem8.Location = new Point(0, 40); layoutControlItem8.Name = "layoutControlItem8"; layoutControlItem8.OptionsTableLayoutItem.ColumnIndex = 1; layoutControlItem8.OptionsTableLayoutItem.RowIndex = 2; - layoutControlItem8.Size = new Size(395, 32); + layoutControlItem8.Size = new Size(452, 40); layoutControlItem8.Text = "鐗╀笟绫诲瀷:"; - layoutControlItem8.TextSize = new Size(78, 14); - // - // layoutControlItem3 - // - layoutControlItem3.AllowHtmlStringInCaption = true; - layoutControlItem3.Control = cbArea; - layoutControlItem3.Location = new Point(0, 96); - layoutControlItem3.Name = "layoutControlItem3"; - layoutControlItem3.OptionsTableLayoutItem.RowIndex = 3; - layoutControlItem3.Size = new Size(394, 32); - layoutControlItem3.Text = "<color=red>*</color>鎵�灞炵渷浠�:"; - layoutControlItem3.TextSize = new Size(78, 14); - // - // layoutControlItem11 - // - layoutControlItem11.Control = txtCompletionTime; - layoutControlItem11.Location = new Point(394, 96); - layoutControlItem11.Name = "layoutControlItem11"; - layoutControlItem11.OptionsTableLayoutItem.ColumnIndex = 1; - layoutControlItem11.OptionsTableLayoutItem.RowIndex = 3; - layoutControlItem11.Size = new Size(395, 32); - layoutControlItem11.Text = "绔e伐鏃堕棿(骞�):"; - layoutControlItem11.TextSize = new Size(78, 14); + layoutControlItem8.TextSize = new Size(97, 18); // // layoutControlItem15 // layoutControlItem15.Control = txtTotalHouseHolds; - layoutControlItem15.Location = new Point(0, 128); + layoutControlItem15.Location = new Point(0, 80); layoutControlItem15.Name = "layoutControlItem15"; layoutControlItem15.OptionsTableLayoutItem.RowIndex = 4; - layoutControlItem15.Size = new Size(394, 32); + layoutControlItem15.Size = new Size(452, 40); layoutControlItem15.Text = "鎬绘埛鏁�:"; - layoutControlItem15.TextSize = new Size(78, 14); + layoutControlItem15.TextSize = new Size(97, 18); // // layoutControlItem19 // layoutControlItem19.Control = txtPlotRatio; - layoutControlItem19.Location = new Point(394, 128); + layoutControlItem19.Location = new Point(452, 80); layoutControlItem19.Name = "layoutControlItem19"; layoutControlItem19.OptionsTableLayoutItem.ColumnIndex = 1; layoutControlItem19.OptionsTableLayoutItem.RowIndex = 4; - layoutControlItem19.Size = new Size(395, 32); + layoutControlItem19.Size = new Size(453, 40); layoutControlItem19.Text = "瀹圭Н鐜�(锛�):"; - layoutControlItem19.TextSize = new Size(78, 14); + layoutControlItem19.TextSize = new Size(97, 18); // // layoutControlItem23 // layoutControlItem23.Control = txtDeveloper; - layoutControlItem23.Location = new Point(0, 160); + layoutControlItem23.Location = new Point(0, 120); layoutControlItem23.Name = "layoutControlItem23"; layoutControlItem23.OptionsTableLayoutItem.RowIndex = 5; - layoutControlItem23.Size = new Size(394, 32); + layoutControlItem23.Size = new Size(452, 40); layoutControlItem23.Text = "寮�鍙戝晢:"; - layoutControlItem23.TextSize = new Size(78, 14); + layoutControlItem23.TextSize = new Size(97, 18); + // + // layoutControlItem4 + // + layoutControlItem4.Control = textGreeningRate; + layoutControlItem4.Location = new Point(452, 120); + layoutControlItem4.Name = "layoutControlItem4"; + layoutControlItem4.OptionsTableLayoutItem.ColumnIndex = 1; + layoutControlItem4.OptionsTableLayoutItem.RowIndex = 6; + layoutControlItem4.Size = new Size(453, 40); + layoutControlItem4.Text = "缁垮寲鐜�(锛�):"; + layoutControlItem4.TextSize = new Size(97, 18); // // emptySpaceItem1 // emptySpaceItem1.AllowHotTrack = false; - emptySpaceItem1.Location = new Point(0, 216); + emptySpaceItem1.Location = new Point(0, 160); emptySpaceItem1.Name = "emptySpaceItem1"; emptySpaceItem1.OptionsTableLayoutItem.ColumnIndex = 1; emptySpaceItem1.OptionsTableLayoutItem.RowIndex = 5; - emptySpaceItem1.Size = new Size(789, 14); + emptySpaceItem1.Size = new Size(905, 141); emptySpaceItem1.TextSize = new Size(0, 0); // - // layoutControlItem10 + // layoutControlItem11 // - layoutControlItem10.AllowHtmlStringInCaption = true; - layoutControlItem10.Control = txtName; - layoutControlItem10.Location = new Point(0, 0); - layoutControlItem10.Name = "layoutControlItem10"; - layoutControlItem10.Size = new Size(319, 24); - layoutControlItem10.Text = "<color=red>*</color>灏忓尯鍚嶇О:"; - layoutControlItem10.TextSize = new Size(59, 14); + layoutControlItem11.Control = txtCompletionTime; + layoutControlItem11.Location = new Point(452, 40); + layoutControlItem11.Name = "layoutControlItem11"; + layoutControlItem11.OptionsTableLayoutItem.ColumnIndex = 1; + layoutControlItem11.OptionsTableLayoutItem.RowIndex = 3; + layoutControlItem11.Size = new Size(453, 40); + layoutControlItem11.Text = "绔e伐鏃堕棿(骞�):"; + layoutControlItem11.TextSize = new Size(97, 18); // // dxErrorProvider1 // dxErrorProvider1.ContainerControl = this; // - // txtAddress - // - txtAddress.Location = new Point(102, 204); - txtAddress.Name = "txtAddress"; - txtAddress.Size = new Size(695, 20); - txtAddress.StyleController = layoutControl1; - txtAddress.TabIndex = 13; - // - // layoutControlItem2 - // - layoutControlItem2.Control = txtAddress; - layoutControlItem2.Location = new Point(0, 192); - layoutControlItem2.Name = "layoutControlItem2"; - layoutControlItem2.OptionsTableLayoutItem.RowIndex = 6; - layoutControlItem2.Size = new Size(789, 24); - layoutControlItem2.Text = "璇︾粏鍦板潃锛�"; - layoutControlItem2.TextSize = new Size(78, 14); - // - // textGreeningRate - // - textGreeningRate.Location = new Point(496, 172); - textGreeningRate.Margin = new Padding(2); - textGreeningRate.MinimumSize = new Size(0, 28); - textGreeningRate.Name = "textGreeningRate"; - textGreeningRate.Size = new Size(301, 28); - textGreeningRate.StyleController = layoutControl1; - textGreeningRate.TabIndex = 12; - // - // layoutControlItem4 - // - layoutControlItem4.Control = textGreeningRate; - layoutControlItem4.Location = new Point(394, 160); - layoutControlItem4.Name = "layoutControlItem4"; - layoutControlItem4.OptionsTableLayoutItem.ColumnIndex = 1; - layoutControlItem4.OptionsTableLayoutItem.RowIndex = 6; - layoutControlItem4.Size = new Size(395, 32); - layoutControlItem4.Text = "缁垮寲鐜�(锛�):"; - layoutControlItem4.TextSize = new Size(78, 14); - // // BuildWizardForm // - AutoScaleDimensions = new SizeF(7F, 14F); + AutoScaleDimensions = new SizeF(8F, 18F); AutoScaleMode = AutoScaleMode.Font; Controls.Add(layoutControl1); - Margin = new Padding(2); + Margin = new Padding(2, 3, 2, 3); Name = "BuildWizardForm"; - Size = new Size(809, 250); + Size = new Size(925, 321); Load += BuildWizardForm_Load; ((System.ComponentModel.ISupportInitialize)layoutControl1).EndInit(); layoutControl1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)cbPropertyType.Properties).EndInit(); - ((System.ComponentModel.ISupportInitialize)txtName.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)txtCompletionTime.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)txtProperTyYears.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)txtTotalHouseHolds.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)txtAreaSquare.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)txtPlotRatio.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)txtDeveloper.Properties).EndInit(); - ((System.ComponentModel.ISupportInitialize)cbArea.Properties).EndInit(); - ((System.ComponentModel.ISupportInitialize)cbDist.Properties).EndInit(); - ((System.ComponentModel.ISupportInitialize)cbCity.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)textGreeningRate.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)Root).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem1).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem7).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem13).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem17).EndInit(); - ((System.ComponentModel.ISupportInitialize)r).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem8).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem3).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem11).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem15).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem19).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem23).EndInit(); - ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem10).EndInit(); - ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).EndInit(); - ((System.ComponentModel.ISupportInitialize)txtAddress.Properties).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem2).EndInit(); - ((System.ComponentModel.ISupportInitialize)textGreeningRate.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem4).EndInit(); + ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem11).EndInit(); + ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).EndInit(); ResumeLayout(false); } #endregion private DevExpress.XtraLayout.LayoutControl layoutControl1; private DevExpress.XtraEditors.ComboBoxEdit cbPropertyType; - public DevExpress.XtraEditors.TextEdit txtName; private DevExpress.XtraEditors.TextEdit txtCompletionTime; private DevExpress.XtraEditors.TextEdit txtProperTyYears; private DevExpress.XtraEditors.TextEdit txtTotalHouseHolds; @@ -491,11 +335,7 @@ private DevExpress.XtraEditors.TextEdit txtPlotRatio; private DevExpress.XtraEditors.TextEdit txtDeveloper; private DevExpress.XtraLayout.LayoutControlGroup Root; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem10; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem11; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem13; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem15; @@ -504,12 +344,6 @@ private DevExpress.XtraLayout.LayoutControlItem layoutControlItem23; private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1; private DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider dxErrorProvider1; - private DevExpress.XtraLayout.LayoutControlItem r; - private DevExpress.XtraEditors.ImageComboBoxEdit cbArea; - private DevExpress.XtraEditors.ImageComboBoxEdit cbDist; - private DevExpress.XtraEditors.ImageComboBoxEdit cbCity; - private DevExpress.XtraEditors.TextEdit txtAddress; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; private DevExpress.XtraEditors.TextEdit textGreeningRate; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; } diff --git a/WinFrmUI/PBS.WinFrmUI/01-place/00-core/BuildWizardForm.cs b/WinFrmUI/PBS.WinFrmUI/01-place/00-core/BuildWizardForm.cs index abac8dd..55d08ba 100644 --- a/WinFrmUI/PBS.WinFrmUI/01-place/00-core/BuildWizardForm.cs +++ b/WinFrmUI/PBS.WinFrmUI/01-place/00-core/BuildWizardForm.cs @@ -16,26 +16,6 @@ { bool isExist = true; this.dxErrorProvider1.ClearErrors(); - if (this.cbArea.Text == "璇烽�夋嫨") - { - this.dxErrorProvider1.SetError(this.cbArea, "蹇呭~椤�"); - isExist = false; - } - if (this.cbCity.Text == "璇烽�夋嫨") - { - this.dxErrorProvider1.SetError(this.cbCity, "蹇呭~椤�"); - isExist = false; - } - if (this.cbDist.Text == "璇烽�夋嫨") - { - this.dxErrorProvider1.SetError(this.cbDist, "蹇呭~椤�"); - isExist = false; - } - if (string.IsNullOrEmpty(this.txtName.Text.Trim())) - { - this.dxErrorProvider1.SetError(this.txtName, "蹇呭~椤�"); - isExist = false; - } return isExist; } @@ -45,7 +25,7 @@ { return null; } - var m = new PlaceBuildParasInfo() + /*var m = new PlaceBuildParasInfo() { // Address = txtAddress.Text, // Area = (long?)this.cbArea.EditValue, @@ -60,8 +40,67 @@ PropertyType = 1, ProperTyYears = string.IsNullOrEmpty(txtProperTyYears.Text) ? 0 : int.Parse(txtProperTyYears.Text), TotalHouseHolds = string.IsNullOrEmpty(txtTotalHouseHolds.Text) ? 0 : int.Parse(txtTotalHouseHolds.Text) - }; + };*/ + var m = new PlaceBuildParasInfo(); + // 澶勭悊 AreaSquare + if (string.IsNullOrEmpty(txtAreaSquare.Text) || !decimal.TryParse(txtAreaSquare.Text, out decimal areaSquare)) + { + m.AreaSquare = decimal.Zero; + } + else + { + m.AreaSquare = areaSquare; + } + + // 澶勭悊 CompletionTime + m.CompletionTime = txtCompletionTime.Text; + + // 澶勭悊 Developer + m.Developer = txtDeveloper.Text; + + // 澶勭悊 GreeningRate + if (string.IsNullOrEmpty(textGreeningRate.Text) || !decimal.TryParse(textGreeningRate.Text, out decimal greeningRate)) + { + m.GreeningRate = decimal.Zero; + } + else + { + m.GreeningRate = greeningRate; + } + + // 澶勭悊 PlotRatio + if (string.IsNullOrEmpty(txtPlotRatio.Text) || !decimal.TryParse(txtPlotRatio.Text, out decimal plotRatio)) + { + m.PlotRatio = decimal.Zero; + } + else + { + m.PlotRatio = plotRatio; + } + + // 澶勭悊 PropertyType + m.PropertyType = 1; + + // 澶勭悊 ProperTyYears + if (string.IsNullOrEmpty(txtProperTyYears.Text) || !int.TryParse(txtProperTyYears.Text, out int properTyYears)) + { + m.ProperTyYears = 0; + } + else + { + m.ProperTyYears = properTyYears; + } + + // 澶勭悊 TotalHouseHolds + if (string.IsNullOrEmpty(txtTotalHouseHolds.Text) || !int.TryParse(txtTotalHouseHolds.Text, out int totalHouseHolds)) + { + m.TotalHouseHolds = 0; + } + else + { + m.TotalHouseHolds = totalHouseHolds; + } return m; } @@ -80,11 +119,6 @@ // cbArea.EditValue = model.Area; // cbCity.EditValue = model.City; // cbDist.EditValue = model.Dist; - } - - public string getText() - { - return "a"; } private void BuildWizardForm_Load(object sender, EventArgs e) diff --git a/WinFrmUI/PBS.WinFrmUI/01-place/00-core/HospitalWizardForm.Designer.cs b/WinFrmUI/PBS.WinFrmUI/01-place/00-core/HospitalWizardForm.Designer.cs index 4a4d504..5793030 100644 --- a/WinFrmUI/PBS.WinFrmUI/01-place/00-core/HospitalWizardForm.Designer.cs +++ b/WinFrmUI/PBS.WinFrmUI/01-place/00-core/HospitalWizardForm.Designer.cs @@ -32,35 +32,19 @@ layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); cbLevel = new DevExpress.XtraEditors.ComboBoxEdit(); cbHospitalType = new DevExpress.XtraEditors.ComboBoxEdit(); - txtAddress = new DevExpress.XtraEditors.TextEdit(); - cbArea = new DevExpress.XtraEditors.ImageComboBoxEdit(); - cbDist = new DevExpress.XtraEditors.ImageComboBoxEdit(); - cbCity = new DevExpress.XtraEditors.ImageComboBoxEdit(); Root = new DevExpress.XtraLayout.LayoutControlGroup(); - layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); - layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); - layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem11 = new DevExpress.XtraLayout.LayoutControlItem(); emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem(); - layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); dxErrorProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(components); ((System.ComponentModel.ISupportInitialize)layoutControl1).BeginInit(); layoutControl1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)cbLevel.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)cbHospitalType.Properties).BeginInit(); - ((System.ComponentModel.ISupportInitialize)txtAddress.Properties).BeginInit(); - ((System.ComponentModel.ISupportInitialize)cbArea.Properties).BeginInit(); - ((System.ComponentModel.ISupportInitialize)cbDist.Properties).BeginInit(); - ((System.ComponentModel.ISupportInitialize)cbCity.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)Root).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem5).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem9).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem3).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem7).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem11).BeginInit(); ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem2).BeginInit(); ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).BeginInit(); SuspendLayout(); // @@ -68,92 +52,43 @@ // layoutControl1.Controls.Add(cbLevel); layoutControl1.Controls.Add(cbHospitalType); - layoutControl1.Controls.Add(txtAddress); - layoutControl1.Controls.Add(cbArea); - layoutControl1.Controls.Add(cbDist); - layoutControl1.Controls.Add(cbCity); 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(821, 270, 650, 400); layoutControl1.Root = Root; - layoutControl1.Size = new Size(636, 123); + layoutControl1.Size = new Size(727, 158); layoutControl1.TabIndex = 132; layoutControl1.Text = "layoutControl1"; // // cbLevel // - cbLevel.Location = new Point(400, 12); - cbLevel.Margin = new Padding(2); - cbLevel.MinimumSize = new Size(0, 28); + cbLevel.Location = new Point(453, 12); + cbLevel.Margin = new Padding(2, 3, 2, 3); + cbLevel.MinimumSize = new Size(0, 36); cbLevel.Name = "cbLevel"; cbLevel.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); cbLevel.Properties.Items.AddRange(new object[] { "涓�绾х敳绛�", "涓�绾т箼绛�", "涓�绾т笝绛�", "浜岀骇鐢茬瓑", "浜岀骇涔欑瓑", "浜岀骇涓欑瓑", "涓夌骇鐢茬瓑", "涓夌骇涔欑瓑", "涓夌骇涓欑瓑" }); cbLevel.Properties.NullText = "璇烽�夋嫨"; cbLevel.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor; - cbLevel.Size = new Size(224, 28); + cbLevel.Size = new Size(262, 36); cbLevel.StyleController = layoutControl1; - cbLevel.TabIndex = 143; + cbLevel.TabIndex = 2; // // cbHospitalType // - cbHospitalType.Location = new Point(400, 76); - cbHospitalType.Margin = new Padding(2); - cbHospitalType.MinimumSize = new Size(0, 28); + cbHospitalType.Location = new Point(89, 12); + cbHospitalType.Margin = new Padding(2, 3, 2, 3); + cbHospitalType.MinimumSize = new Size(0, 36); cbHospitalType.Name = "cbHospitalType"; cbHospitalType.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); cbHospitalType.Properties.Items.AddRange(new object[] { "鍏姙", "绉佸姙" }); cbHospitalType.Properties.NullText = "璇烽�夋嫨"; cbHospitalType.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor; - cbHospitalType.Size = new Size(224, 28); + cbHospitalType.Size = new Size(283, 36); cbHospitalType.StyleController = layoutControl1; - cbHospitalType.TabIndex = 135; - // - // txtAddress - // - txtAddress.Location = new Point(83, 76); - txtAddress.MinimumSize = new Size(0, 28); - txtAddress.Name = "txtAddress"; - txtAddress.Size = new Size(167, 28); - txtAddress.StyleController = layoutControl1; - txtAddress.TabIndex = 147; - // - // cbArea - // - cbArea.Location = new Point(83, 12); - cbArea.Margin = new Padding(2); - cbArea.MinimumSize = new Size(0, 28); - cbArea.Name = "cbArea"; - cbArea.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); - cbArea.Properties.NullText = "璇烽�夋嫨"; - cbArea.Size = new Size(167, 28); - cbArea.StyleController = layoutControl1; - cbArea.TabIndex = 141; - // - // cbDist - // - cbDist.Location = new Point(83, 44); - cbDist.Margin = new Padding(2); - cbDist.MinimumSize = new Size(0, 28); - cbDist.Name = "cbDist"; - cbDist.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); - cbDist.Properties.NullText = "璇烽�夋嫨"; - cbDist.Size = new Size(167, 28); - cbDist.StyleController = layoutControl1; - cbDist.TabIndex = 137; - cbDist.SelectedIndexChanged += cbDist_SelectedIndexChanged; - // - // cbCity - // - cbCity.Location = new Point(400, 44); - cbCity.Margin = new Padding(2); - cbCity.MinimumSize = new Size(0, 28); - cbCity.Name = "cbCity"; - cbCity.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); - cbCity.Properties.NullText = "璇烽�夋嫨"; - cbCity.Size = new Size(224, 28); - cbCity.StyleController = layoutControl1; - cbCity.TabIndex = 139; + cbHospitalType.TabIndex = 0; // // Root // @@ -161,79 +96,36 @@ Root.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; Root.GroupBordersVisible = false; - Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem5, layoutControlItem9, layoutControlItem3, layoutControlItem7, layoutControlItem11, emptySpaceItem1, layoutControlItem2 }); + Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem3, emptySpaceItem1, layoutControlItem11 }); Root.Name = "Root"; - Root.Size = new Size(636, 123); + Root.Size = new Size(727, 158); Root.TextVisible = false; - // - // layoutControlItem5 - // - layoutControlItem5.AllowHtmlStringInCaption = true; - layoutControlItem5.Control = cbArea; - layoutControlItem5.Location = new Point(0, 0); - layoutControlItem5.Name = "layoutControlItem5"; - layoutControlItem5.Size = new Size(242, 32); - layoutControlItem5.Text = "<color=red>*</color>鎵�灞炵渷浠�:"; - layoutControlItem5.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.AutoSize; - layoutControlItem5.TextSize = new Size(59, 14); - layoutControlItem5.TextToControlDistance = 12; - // - // layoutControlItem9 - // - layoutControlItem9.AllowHtmlStringInCaption = true; - layoutControlItem9.Control = cbDist; - layoutControlItem9.Location = new Point(0, 32); - layoutControlItem9.Name = "layoutControlItem9"; - layoutControlItem9.Size = new Size(242, 32); - layoutControlItem9.Text = "<color=red>*</color>鎵�灞炲尯鍘�:"; - layoutControlItem9.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.AutoSize; - layoutControlItem9.TextSize = new Size(59, 14); - layoutControlItem9.TextToControlDistance = 12; // // layoutControlItem3 // layoutControlItem3.Control = cbLevel; - layoutControlItem3.Location = new Point(317, 0); + layoutControlItem3.Location = new Point(364, 0); layoutControlItem3.Name = "layoutControlItem3"; - layoutControlItem3.Size = new Size(299, 32); + layoutControlItem3.Size = new Size(343, 138); layoutControlItem3.Text = "鍖婚櫌绛夌骇:"; - layoutControlItem3.TextSize = new Size(59, 14); - // - // layoutControlItem7 - // - layoutControlItem7.AllowHtmlStringInCaption = true; - layoutControlItem7.Control = cbCity; - layoutControlItem7.Location = new Point(317, 32); - layoutControlItem7.Name = "layoutControlItem7"; - layoutControlItem7.Size = new Size(299, 32); - layoutControlItem7.Text = "<color=red>*</color>鎵�灞炲煄甯�:"; - layoutControlItem7.TextSize = new Size(59, 14); + layoutControlItem3.TextSize = new Size(65, 18); // // layoutControlItem11 // layoutControlItem11.Control = cbHospitalType; - layoutControlItem11.Location = new Point(317, 64); + layoutControlItem11.Location = new Point(0, 0); layoutControlItem11.Name = "layoutControlItem11"; - layoutControlItem11.Size = new Size(299, 39); + layoutControlItem11.Size = new Size(364, 40); layoutControlItem11.Text = "鍖婚櫌鎬ц川:"; - layoutControlItem11.TextSize = new Size(59, 14); + layoutControlItem11.TextSize = new Size(65, 18); // // emptySpaceItem1 // emptySpaceItem1.AllowHotTrack = false; - emptySpaceItem1.Location = new Point(242, 0); + emptySpaceItem1.Location = new Point(0, 40); emptySpaceItem1.Name = "emptySpaceItem1"; - emptySpaceItem1.Size = new Size(75, 103); + emptySpaceItem1.Size = new Size(364, 98); emptySpaceItem1.TextSize = new Size(0, 0); - // - // layoutControlItem2 - // - layoutControlItem2.Control = txtAddress; - layoutControlItem2.Location = new Point(0, 64); - layoutControlItem2.Name = "layoutControlItem2"; - layoutControlItem2.Size = new Size(242, 39); - layoutControlItem2.Text = "璇︾粏鍦板潃:"; - layoutControlItem2.TextSize = new Size(59, 14); // // dxErrorProvider1 // @@ -241,29 +133,21 @@ // // HospitalWizardForm // - AutoScaleDimensions = new SizeF(7F, 14F); + AutoScaleDimensions = new SizeF(8F, 18F); AutoScaleMode = AutoScaleMode.Font; Controls.Add(layoutControl1); - Margin = new Padding(2); + Margin = new Padding(2, 3, 2, 3); Name = "HospitalWizardForm"; - Size = new Size(636, 123); + Size = new Size(727, 158); Load += HospitalWizardForm_Load; ((System.ComponentModel.ISupportInitialize)layoutControl1).EndInit(); layoutControl1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)cbLevel.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)cbHospitalType.Properties).EndInit(); - ((System.ComponentModel.ISupportInitialize)txtAddress.Properties).EndInit(); - ((System.ComponentModel.ISupportInitialize)cbArea.Properties).EndInit(); - ((System.ComponentModel.ISupportInitialize)cbDist.Properties).EndInit(); - ((System.ComponentModel.ISupportInitialize)cbCity.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)Root).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem5).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem9).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem3).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem7).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem11).EndInit(); ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem2).EndInit(); ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).EndInit(); ResumeLayout(false); } @@ -274,17 +158,9 @@ private DevExpress.XtraEditors.ComboBoxEdit cbLevel; private DevExpress.XtraEditors.ComboBoxEdit cbHospitalType; private DevExpress.XtraLayout.LayoutControlGroup Root; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem9; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem11; private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1; private DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider dxErrorProvider1; - public DevExpress.XtraEditors.TextEdit txtAddress; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; - private DevExpress.XtraEditors.ImageComboBoxEdit cbArea; - private DevExpress.XtraEditors.ImageComboBoxEdit cbDist; - private DevExpress.XtraEditors.ImageComboBoxEdit cbCity; } } diff --git a/WinFrmUI/PBS.WinFrmUI/01-place/00-core/HospitalWizardForm.cs b/WinFrmUI/PBS.WinFrmUI/01-place/00-core/HospitalWizardForm.cs index 4141ac1..e4ce119 100644 --- a/WinFrmUI/PBS.WinFrmUI/01-place/00-core/HospitalWizardForm.cs +++ b/WinFrmUI/PBS.WinFrmUI/01-place/00-core/HospitalWizardForm.cs @@ -14,21 +14,6 @@ { bool isExist = true; this.dxErrorProvider1.ClearErrors(); - if (this.cbCity.Text == "璇烽�夋嫨") - { - this.dxErrorProvider1.SetError(this.cbCity, "蹇呭~椤�"); - isExist = false; - } - if (this.cbArea.Text == "璇烽�夋嫨") - { - this.dxErrorProvider1.SetError(this.cbArea, "蹇呭~椤�"); - isExist = false; - } - if (this.cbDist.Text == "璇烽�夋嫨") - { - this.dxErrorProvider1.SetError(this.cbDist, "蹇呭~椤�"); - isExist = false; - } return isExist; } diff --git a/WinFrmUI/PBS.WinFrmUI/01-place/00-core/PlaceViewModel.cs b/WinFrmUI/PBS.WinFrmUI/01-place/00-core/PlaceViewModel.cs index 54c72d6..293fa0c 100644 --- a/WinFrmUI/PBS.WinFrmUI/01-place/00-core/PlaceViewModel.cs +++ b/WinFrmUI/PBS.WinFrmUI/01-place/00-core/PlaceViewModel.cs @@ -1,4 +1,6 @@ -锘縰sing System.ComponentModel; +锘縰sing HStation.PBS; +using System.ComponentModel; +using Yw.Untity; namespace PBS.WinFrmUI { @@ -16,7 +18,10 @@ this.PlaceType = rhs.PlaceType; this.PlaceInfo = rhs.PlaceInfo; this.Address = rhs.Address; - this.Flags = rhs.Flags?.ToString(); + this.UseStatus = rhs.UseStatus; + this.SortCode = rhs.SortCode; + this.Description = rhs.Description; + this.Flags = FlagsHelper.ToString(rhs.Flags); } public void Resert(Vmo.PlaceVmo rhs) @@ -27,7 +32,10 @@ this.PlaceType = rhs.PlaceType; this.PlaceInfo = rhs.PlaceInfo; this.Address = rhs.Address; - this.Flags = rhs.Flags?.ToString(); + this.UseStatus = rhs.UseStatus; + this.SortCode = rhs.SortCode; + this.Description = rhs.Description; + this.Flags = FlagsHelper.ToString(rhs.Flags); } /// <summary> @@ -56,7 +64,7 @@ ///</summary> [DisplayName("鍦烘墍绫诲瀷")] [Browsable(true)] - public int PlaceType { get; set; } + public ePlaceType PlaceType { get; set; } /// <summary> /// 鍦烘墍淇℃伅 @@ -98,7 +106,7 @@ ///</summary> [DisplayName("浣跨敤鐘舵��")] [Browsable(true)] - public int UseStatus { get; set; } + public Yw.Vmo.eUseStatus UseStatus { get; set; } /// <summary> /// 鎺掑簭鐮� diff --git a/WinFrmUI/PBS.WinFrmUI/01-place/00-core/SchoolWizardForm.Designer.cs b/WinFrmUI/PBS.WinFrmUI/01-place/00-core/SchoolWizardForm.Designer.cs index 7738f30..3e84fc3 100644 --- a/WinFrmUI/PBS.WinFrmUI/01-place/00-core/SchoolWizardForm.Designer.cs +++ b/WinFrmUI/PBS.WinFrmUI/01-place/00-core/SchoolWizardForm.Designer.cs @@ -32,35 +32,19 @@ layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); cbLevel = new DevExpress.XtraEditors.ComboBoxEdit(); cbSchoolType = new DevExpress.XtraEditors.ComboBoxEdit(); - txtAddress = new DevExpress.XtraEditors.TextEdit(); - cbArea = new DevExpress.XtraEditors.ImageComboBoxEdit(); - cbCity = new DevExpress.XtraEditors.ImageComboBoxEdit(); - cbDist = new DevExpress.XtraEditors.ImageComboBoxEdit(); Root = new DevExpress.XtraLayout.LayoutControlGroup(); - layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); - layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); - layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem(); - layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); - layoutControlItem11 = new DevExpress.XtraLayout.LayoutControlItem(); emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem(); + layoutControlItem11 = new DevExpress.XtraLayout.LayoutControlItem(); dxErrorProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(components); ((System.ComponentModel.ISupportInitialize)layoutControl1).BeginInit(); layoutControl1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)cbLevel.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)cbSchoolType.Properties).BeginInit(); - ((System.ComponentModel.ISupportInitialize)txtAddress.Properties).BeginInit(); - ((System.ComponentModel.ISupportInitialize)cbArea.Properties).BeginInit(); - ((System.ComponentModel.ISupportInitialize)cbCity.Properties).BeginInit(); - ((System.ComponentModel.ISupportInitialize)cbDist.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)Root).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem5).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem3).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem7).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem9).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem2).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem11).BeginInit(); ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem11).BeginInit(); ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).BeginInit(); SuspendLayout(); // @@ -68,91 +52,42 @@ // layoutControl1.Controls.Add(cbLevel); layoutControl1.Controls.Add(cbSchoolType); - layoutControl1.Controls.Add(txtAddress); - layoutControl1.Controls.Add(cbArea); - layoutControl1.Controls.Add(cbCity); - layoutControl1.Controls.Add(cbDist); layoutControl1.Dock = DockStyle.Fill; layoutControl1.Location = new Point(0, 0); + layoutControl1.Margin = new Padding(3, 4, 3, 4); layoutControl1.Name = "layoutControl1"; layoutControl1.Root = Root; - layoutControl1.Size = new Size(734, 123); + layoutControl1.Size = new Size(839, 158); layoutControl1.TabIndex = 118; layoutControl1.Text = "layoutControl1"; // // cbLevel // - cbLevel.Location = new Point(445, 12); - cbLevel.Margin = new Padding(2); - cbLevel.MinimumSize = new Size(0, 28); + cbLevel.Location = new Point(512, 12); + cbLevel.Margin = new Padding(2, 3, 2, 3); + cbLevel.MinimumSize = new Size(0, 36); cbLevel.Name = "cbLevel"; cbLevel.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); cbLevel.Properties.Items.AddRange(new object[] { "骞煎効鍥�", "灏忓", "涓", "楂樺", "澶у" }); cbLevel.Properties.NullText = "璇烽�夋嫨"; cbLevel.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor; - cbLevel.Size = new Size(277, 28); + cbLevel.Size = new Size(315, 36); cbLevel.StyleController = layoutControl1; cbLevel.TabIndex = 129; // // cbSchoolType // - cbSchoolType.Location = new Point(445, 76); - cbSchoolType.Margin = new Padding(2); - cbSchoolType.MinimumSize = new Size(0, 28); + cbSchoolType.Location = new Point(89, 12); + cbSchoolType.Margin = new Padding(2, 3, 2, 3); + cbSchoolType.MinimumSize = new Size(0, 36); cbSchoolType.Name = "cbSchoolType"; cbSchoolType.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); cbSchoolType.Properties.Items.AddRange(new object[] { "鍔炲叕", "绉佸姙" }); cbSchoolType.Properties.NullText = "璇烽�夋嫨"; cbSchoolType.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor; - cbSchoolType.Size = new Size(277, 28); + cbSchoolType.Size = new Size(251, 36); cbSchoolType.StyleController = layoutControl1; cbSchoolType.TabIndex = 121; - // - // txtAddress - // - txtAddress.Location = new Point(76, 76); - txtAddress.MinimumSize = new Size(0, 28); - txtAddress.Name = "txtAddress"; - txtAddress.Size = new Size(221, 28); - txtAddress.StyleController = layoutControl1; - txtAddress.TabIndex = 132; - // - // cbArea - // - cbArea.Location = new Point(76, 12); - cbArea.Margin = new Padding(2); - cbArea.MinimumSize = new Size(0, 28); - cbArea.Name = "cbArea"; - cbArea.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); - cbArea.Properties.NullText = "璇烽�夋嫨"; - cbArea.Size = new Size(221, 28); - cbArea.StyleController = layoutControl1; - cbArea.TabIndex = 127; - // - // cbCity - // - cbCity.Location = new Point(445, 44); - cbCity.Margin = new Padding(2); - cbCity.MinimumSize = new Size(0, 28); - cbCity.Name = "cbCity"; - cbCity.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); - cbCity.Properties.NullText = "璇烽�夋嫨"; - cbCity.Size = new Size(277, 28); - cbCity.StyleController = layoutControl1; - cbCity.TabIndex = 125; - // - // cbDist - // - cbDist.Location = new Point(76, 44); - cbDist.Margin = new Padding(2); - cbDist.MinimumSize = new Size(0, 28); - cbDist.Name = "cbDist"; - cbDist.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); - cbDist.Properties.NullText = "璇烽�夋嫨"; - cbDist.Size = new Size(221, 28); - cbDist.StyleController = layoutControl1; - cbDist.TabIndex = 123; - cbDist.SelectedIndexChanged += cbDist_SelectedIndexChanged; // // Root // @@ -160,82 +95,37 @@ Root.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; Root.GroupBordersVisible = false; - Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem5, layoutControlItem3, layoutControlItem7, layoutControlItem9, layoutControlItem11, emptySpaceItem1, layoutControlItem2 }); + Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem3, emptySpaceItem1, layoutControlItem11 }); Root.Name = "Root"; - Root.Size = new Size(734, 123); + Root.Size = new Size(839, 158); Root.TextVisible = false; - // - // layoutControlItem5 - // - layoutControlItem5.AllowHtmlStringInCaption = true; - layoutControlItem5.Control = cbArea; - layoutControlItem5.Location = new Point(0, 0); - layoutControlItem5.Name = "layoutControlItem5"; - layoutControlItem5.Size = new Size(289, 32); - layoutControlItem5.Text = "<color=red>*</color>鎵�灞炵渷浠�:"; - layoutControlItem5.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.AutoSize; - layoutControlItem5.TextSize = new Size(59, 14); - layoutControlItem5.TextToControlDistance = 5; // // layoutControlItem3 // layoutControlItem3.Control = cbLevel; layoutControlItem3.CustomizationFormText = "灞傛:"; - layoutControlItem3.Location = new Point(369, 0); + layoutControlItem3.Location = new Point(423, 0); layoutControlItem3.Name = "layoutControlItem3"; - layoutControlItem3.Size = new Size(345, 32); + layoutControlItem3.Size = new Size(396, 138); layoutControlItem3.Text = "瀛︽牎灞傛:"; - layoutControlItem3.TextSize = new Size(52, 14); - // - // layoutControlItem7 - // - layoutControlItem7.AllowHtmlStringInCaption = true; - layoutControlItem7.Control = cbCity; - layoutControlItem7.Location = new Point(369, 32); - layoutControlItem7.Name = "layoutControlItem7"; - layoutControlItem7.Size = new Size(345, 32); - layoutControlItem7.Text = "<color=red>*</color>鎵�灞炲煄甯�:"; - layoutControlItem7.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.AutoSize; - layoutControlItem7.TextSize = new Size(59, 14); - layoutControlItem7.TextToControlDistance = 5; - // - // layoutControlItem9 - // - layoutControlItem9.AllowHtmlStringInCaption = true; - layoutControlItem9.Control = cbDist; - layoutControlItem9.Location = new Point(0, 32); - layoutControlItem9.Name = "layoutControlItem9"; - layoutControlItem9.Size = new Size(289, 32); - layoutControlItem9.Text = "<color=red>*</color>鎵�灞炲尯鍘�:"; - layoutControlItem9.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.AutoSize; - layoutControlItem9.TextSize = new Size(59, 14); - layoutControlItem9.TextToControlDistance = 5; - // - // layoutControlItem2 - // - layoutControlItem2.Control = txtAddress; - layoutControlItem2.Location = new Point(0, 64); - layoutControlItem2.Name = "layoutControlItem2"; - layoutControlItem2.Size = new Size(289, 39); - layoutControlItem2.Text = "璇︾粏鍦板潃:"; - layoutControlItem2.TextSize = new Size(52, 14); - // - // layoutControlItem11 - // - layoutControlItem11.Control = cbSchoolType; - layoutControlItem11.Location = new Point(369, 64); - layoutControlItem11.Name = "layoutControlItem11"; - layoutControlItem11.Size = new Size(345, 39); - layoutControlItem11.Text = "瀛︽牎绫诲瀷:"; - layoutControlItem11.TextSize = new Size(52, 14); + layoutControlItem3.TextSize = new Size(65, 18); // // emptySpaceItem1 // emptySpaceItem1.AllowHotTrack = false; - emptySpaceItem1.Location = new Point(289, 0); + emptySpaceItem1.Location = new Point(332, 0); emptySpaceItem1.Name = "emptySpaceItem1"; - emptySpaceItem1.Size = new Size(80, 103); + emptySpaceItem1.Size = new Size(91, 138); emptySpaceItem1.TextSize = new Size(0, 0); + // + // layoutControlItem11 + // + layoutControlItem11.Control = cbSchoolType; + layoutControlItem11.Location = new Point(0, 0); + layoutControlItem11.Name = "layoutControlItem11"; + layoutControlItem11.Size = new Size(332, 138); + layoutControlItem11.Text = "瀛︽牎绫诲瀷:"; + layoutControlItem11.TextSize = new Size(65, 18); // // dxErrorProvider1 // @@ -243,29 +133,21 @@ // // SchoolWizardForm // - AutoScaleDimensions = new SizeF(7F, 14F); + AutoScaleDimensions = new SizeF(8F, 18F); AutoScaleMode = AutoScaleMode.Font; Controls.Add(layoutControl1); - Margin = new Padding(2); + Margin = new Padding(2, 3, 2, 3); Name = "SchoolWizardForm"; - Size = new Size(734, 123); + Size = new Size(839, 158); Load += SchoolWizardForm_Load; ((System.ComponentModel.ISupportInitialize)layoutControl1).EndInit(); layoutControl1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)cbLevel.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)cbSchoolType.Properties).EndInit(); - ((System.ComponentModel.ISupportInitialize)txtAddress.Properties).EndInit(); - ((System.ComponentModel.ISupportInitialize)cbArea.Properties).EndInit(); - ((System.ComponentModel.ISupportInitialize)cbCity.Properties).EndInit(); - ((System.ComponentModel.ISupportInitialize)cbDist.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)Root).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem5).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem3).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem7).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem9).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem2).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem11).EndInit(); ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem11).EndInit(); ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).EndInit(); ResumeLayout(false); } @@ -276,16 +158,8 @@ private DevExpress.XtraEditors.ComboBoxEdit cbSchoolType; private DevExpress.XtraLayout.LayoutControlGroup Root; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem9; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem11; - public DevExpress.XtraEditors.TextEdit txtAddress; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1; private DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider dxErrorProvider1; - private DevExpress.XtraEditors.ImageComboBoxEdit cbArea; - private DevExpress.XtraEditors.ImageComboBoxEdit cbCity; - private DevExpress.XtraEditors.ImageComboBoxEdit cbDist; } } diff --git a/WinFrmUI/PBS.WinFrmUI/01-place/00-core/SchoolWizardForm.cs b/WinFrmUI/PBS.WinFrmUI/01-place/00-core/SchoolWizardForm.cs index 1a2b4b7..90b63e7 100644 --- a/WinFrmUI/PBS.WinFrmUI/01-place/00-core/SchoolWizardForm.cs +++ b/WinFrmUI/PBS.WinFrmUI/01-place/00-core/SchoolWizardForm.cs @@ -25,21 +25,6 @@ { bool isExist = true; this.dxErrorProvider1.ClearErrors(); - if (this.cbArea.Text == "璇烽�夋嫨") - { - this.dxErrorProvider1.SetError(this.cbArea, "蹇呭~椤�"); - isExist = false; - } - if (this.cbCity.Text == "璇烽�夋嫨") - { - this.dxErrorProvider1.SetError(this.cbCity, "蹇呭~椤�"); - isExist = false; - } - if (this.cbDist.Text == "璇烽�夋嫨") - { - this.dxErrorProvider1.SetError(this.cbDist, "蹇呭~椤�"); - isExist = false; - } return isExist; } diff --git a/WinFrmUI/PBS.WinFrmUI/01-place/00-core/ShopWizardForm.Designer.cs b/WinFrmUI/PBS.WinFrmUI/01-place/00-core/ShopWizardForm.Designer.cs index c02916e..9d29043 100644 --- a/WinFrmUI/PBS.WinFrmUI/01-place/00-core/ShopWizardForm.Designer.cs +++ b/WinFrmUI/PBS.WinFrmUI/01-place/00-core/ShopWizardForm.Designer.cs @@ -36,22 +36,14 @@ txtPropertyRight = new DevExpress.XtraEditors.TextEdit(); txtPropertyCompany = new DevExpress.XtraEditors.TextEdit(); cbBusinessType = new DevExpress.XtraEditors.ComboBoxEdit(); - txtAddress = new DevExpress.XtraEditors.TextEdit(); - cbArea = new DevExpress.XtraEditors.ImageComboBoxEdit(); - cbDist = new DevExpress.XtraEditors.ImageComboBoxEdit(); - cbCity = new DevExpress.XtraEditors.ImageComboBoxEdit(); Root = new DevExpress.XtraLayout.LayoutControlGroup(); layoutControlItem18 = new DevExpress.XtraLayout.LayoutControlItem(); - layoutControlItem21 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem16 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem19 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem12 = new DevExpress.XtraLayout.LayoutControlItem(); - layoutControlItem14 = new DevExpress.XtraLayout.LayoutControlItem(); emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem(); layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); - layoutControlItem10 = new DevExpress.XtraLayout.LayoutControlItem(); - layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); dxErrorProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(components); ((System.ComponentModel.ISupportInitialize)layoutControl1).BeginInit(); layoutControl1.SuspendLayout(); @@ -61,22 +53,14 @@ ((System.ComponentModel.ISupportInitialize)txtPropertyRight.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)txtPropertyCompany.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)cbBusinessType.Properties).BeginInit(); - ((System.ComponentModel.ISupportInitialize)txtAddress.Properties).BeginInit(); - ((System.ComponentModel.ISupportInitialize)cbArea.Properties).BeginInit(); - ((System.ComponentModel.ISupportInitialize)cbDist.Properties).BeginInit(); - ((System.ComponentModel.ISupportInitialize)cbCity.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)Root).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem18).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem21).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem16).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem19).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem8).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem12).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem14).BeginInit(); ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem4).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem10).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem6).BeginInit(); ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).BeginInit(); SuspendLayout(); // @@ -88,135 +72,85 @@ layoutControl1.Controls.Add(txtPropertyRight); layoutControl1.Controls.Add(txtPropertyCompany); layoutControl1.Controls.Add(cbBusinessType); - layoutControl1.Controls.Add(txtAddress); - layoutControl1.Controls.Add(cbArea); - layoutControl1.Controls.Add(cbDist); - layoutControl1.Controls.Add(cbCity); 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(880, 221, 650, 400); layoutControl1.Root = Root; - layoutControl1.Size = new Size(757, 185); + layoutControl1.Size = new Size(865, 238); layoutControl1.TabIndex = 133; layoutControl1.Text = "layoutControl1"; // // txtAreaSquare // - txtAreaSquare.Location = new Point(83, 76); - txtAreaSquare.Margin = new Padding(2); - txtAreaSquare.MinimumSize = new Size(0, 28); + txtAreaSquare.Location = new Point(91, 52); + txtAreaSquare.Margin = new Padding(2, 3, 2, 3); + txtAreaSquare.MinimumSize = new Size(0, 36); txtAreaSquare.Name = "txtAreaSquare"; txtAreaSquare.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager)); - txtAreaSquare.Size = new Size(238, 28); + txtAreaSquare.Size = new Size(276, 36); txtAreaSquare.StyleController = layoutControl1; txtAreaSquare.TabIndex = 152; // // txtFloor // - txtFloor.Location = new Point(83, 44); - txtFloor.Margin = new Padding(2); - txtFloor.MinimumSize = new Size(0, 28); + txtFloor.Location = new Point(91, 12); + 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(238, 28); + txtFloor.Size = new Size(276, 36); txtFloor.StyleController = layoutControl1; txtFloor.TabIndex = 148; // // cbNature // - cbNature.Location = new Point(465, 12); - cbNature.Margin = new Padding(2); - cbNature.MinimumSize = new Size(0, 28); + cbNature.Location = new Point(529, 12); + cbNature.Margin = new Padding(2, 3, 2, 3); + cbNature.MinimumSize = new Size(0, 36); cbNature.Name = "cbNature"; cbNature.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); cbNature.Properties.Items.AddRange(new object[] { "浜屾墜鍟嗛摵", "鏂板缓鍟嗛摵" }); cbNature.Properties.NullText = "璇烽�夋嫨"; cbNature.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor; - cbNature.Size = new Size(280, 28); + cbNature.Size = new Size(324, 36); cbNature.StyleController = layoutControl1; cbNature.TabIndex = 144; // // txtPropertyRight // - txtPropertyRight.Location = new Point(465, 108); - txtPropertyRight.Margin = new Padding(2); - txtPropertyRight.MinimumSize = new Size(0, 28); + txtPropertyRight.Location = new Point(529, 52); + txtPropertyRight.Margin = new Padding(2, 3, 2, 3); + txtPropertyRight.MinimumSize = new Size(0, 36); txtPropertyRight.Name = "txtPropertyRight"; - txtPropertyRight.Size = new Size(280, 28); + txtPropertyRight.Size = new Size(324, 36); txtPropertyRight.StyleController = layoutControl1; txtPropertyRight.TabIndex = 140; // // txtPropertyCompany // - txtPropertyCompany.Location = new Point(83, 108); - txtPropertyCompany.Margin = new Padding(2); - txtPropertyCompany.MinimumSize = new Size(0, 28); + txtPropertyCompany.Location = new Point(91, 92); + txtPropertyCompany.Margin = new Padding(2, 3, 2, 3); + txtPropertyCompany.MinimumSize = new Size(0, 36); txtPropertyCompany.Name = "txtPropertyCompany"; - txtPropertyCompany.Size = new Size(238, 28); + txtPropertyCompany.Size = new Size(276, 36); txtPropertyCompany.StyleController = layoutControl1; txtPropertyCompany.TabIndex = 138; // // cbBusinessType // - cbBusinessType.Location = new Point(465, 140); - cbBusinessType.Margin = new Padding(2); - cbBusinessType.MinimumSize = new Size(0, 28); + cbBusinessType.Location = new Point(529, 92); + cbBusinessType.Margin = new Padding(2, 3, 2, 3); + cbBusinessType.MinimumSize = new Size(0, 36); cbBusinessType.Name = "cbBusinessType"; cbBusinessType.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); cbBusinessType.Properties.Items.AddRange(new object[] { "椁愰ギ", "鏂囧叿", "鏈嶉グ", "姹戒慨" }); cbBusinessType.Properties.NullText = "璇烽�夋嫨"; cbBusinessType.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor; - cbBusinessType.Size = new Size(280, 28); + cbBusinessType.Size = new Size(324, 36); cbBusinessType.StyleController = layoutControl1; cbBusinessType.TabIndex = 137; - // - // txtAddress - // - txtAddress.Location = new Point(83, 140); - txtAddress.Margin = new Padding(2); - txtAddress.MinimumSize = new Size(0, 28); - txtAddress.Name = "txtAddress"; - txtAddress.Size = new Size(238, 28); - txtAddress.StyleController = layoutControl1; - txtAddress.TabIndex = 135; - // - // cbArea - // - cbArea.Location = new Point(83, 12); - cbArea.Margin = new Padding(2); - cbArea.MinimumSize = new Size(0, 28); - cbArea.Name = "cbArea"; - cbArea.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); - cbArea.Properties.NullText = "璇烽�夋嫨"; - cbArea.Size = new Size(238, 28); - cbArea.StyleController = layoutControl1; - cbArea.TabIndex = 146; - // - // cbDist - // - cbDist.Location = new Point(465, 44); - cbDist.Margin = new Padding(2); - cbDist.MinimumSize = new Size(0, 28); - cbDist.Name = "cbDist"; - cbDist.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); - cbDist.Properties.NullText = "璇烽�夋嫨"; - cbDist.Size = new Size(280, 28); - cbDist.StyleController = layoutControl1; - cbDist.TabIndex = 150; - cbDist.SelectedIndexChanged += cbDist_SelectedIndexChanged; - // - // cbCity - // - cbCity.Location = new Point(465, 76); - cbCity.Margin = new Padding(2); - cbCity.MinimumSize = new Size(0, 28); - cbCity.Name = "cbCity"; - cbCity.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); - cbCity.Properties.NullText = "璇烽�夋嫨"; - cbCity.Size = new Size(280, 28); - cbCity.StyleController = layoutControl1; - cbCity.TabIndex = 142; // // Root // @@ -224,113 +158,74 @@ Root.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; Root.GroupBordersVisible = false; - Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem18, layoutControlItem16, layoutControlItem19, layoutControlItem8, layoutControlItem12, layoutControlItem14, emptySpaceItem1, layoutControlItem4, layoutControlItem10, layoutControlItem6, layoutControlItem21 }); + Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem18, layoutControlItem16, layoutControlItem19, layoutControlItem8, layoutControlItem12, emptySpaceItem1, layoutControlItem4 }); Root.Name = "Root"; - Root.Size = new Size(757, 185); + Root.Size = new Size(865, 238); Root.TextVisible = false; // // layoutControlItem18 // layoutControlItem18.Control = txtPropertyCompany; - layoutControlItem18.Location = new Point(0, 96); + layoutControlItem18.Location = new Point(0, 80); layoutControlItem18.Name = "layoutControlItem18"; - layoutControlItem18.Size = new Size(313, 32); + layoutControlItem18.Size = new Size(359, 138); layoutControlItem18.Text = "鐗╀笟:"; - layoutControlItem18.TextSize = new Size(59, 14); - // - // layoutControlItem21 - // - layoutControlItem21.Control = txtAddress; - layoutControlItem21.Location = new Point(0, 128); - layoutControlItem21.Name = "layoutControlItem21"; - layoutControlItem21.Size = new Size(313, 37); - layoutControlItem21.Text = "璇︾粏鍦板潃:"; - layoutControlItem21.TextSize = new Size(59, 14); + layoutControlItem18.TextSize = new Size(67, 18); // // layoutControlItem16 // layoutControlItem16.Control = txtPropertyRight; - layoutControlItem16.Location = new Point(382, 96); + layoutControlItem16.Location = new Point(438, 40); layoutControlItem16.Name = "layoutControlItem16"; - layoutControlItem16.Size = new Size(355, 32); + layoutControlItem16.Size = new Size(407, 40); layoutControlItem16.Text = "鍟嗛摵浜ф潈:"; - layoutControlItem16.TextSize = new Size(59, 14); + layoutControlItem16.TextSize = new Size(67, 18); // // layoutControlItem19 // layoutControlItem19.Control = cbBusinessType; - layoutControlItem19.Location = new Point(382, 128); + layoutControlItem19.Location = new Point(438, 80); layoutControlItem19.Name = "layoutControlItem19"; - layoutControlItem19.Size = new Size(355, 37); + layoutControlItem19.Size = new Size(407, 138); layoutControlItem19.Text = "缁忚惀绫诲瀷:"; - layoutControlItem19.TextSize = new Size(59, 14); + layoutControlItem19.TextSize = new Size(67, 18); // // layoutControlItem8 // layoutControlItem8.Control = txtFloor; layoutControlItem8.CustomizationFormText = "妤煎眰:"; - layoutControlItem8.Location = new Point(0, 32); + layoutControlItem8.Location = new Point(0, 0); layoutControlItem8.Name = "layoutControlItem8"; - layoutControlItem8.Size = new Size(313, 32); + layoutControlItem8.Size = new Size(359, 40); layoutControlItem8.Text = "妤煎眰:"; - layoutControlItem8.TextSize = new Size(59, 14); + layoutControlItem8.TextSize = new Size(67, 18); // // layoutControlItem12 // layoutControlItem12.Control = cbNature; - layoutControlItem12.Location = new Point(382, 0); + layoutControlItem12.Location = new Point(438, 0); layoutControlItem12.Name = "layoutControlItem12"; - layoutControlItem12.Size = new Size(355, 32); + layoutControlItem12.Size = new Size(407, 40); layoutControlItem12.Text = "鍟嗛摵鎬ц川:"; - layoutControlItem12.TextSize = new Size(59, 14); - // - // layoutControlItem14 - // - layoutControlItem14.AllowHtmlStringInCaption = true; - layoutControlItem14.Control = cbCity; - layoutControlItem14.Location = new Point(382, 64); - layoutControlItem14.Name = "layoutControlItem14"; - layoutControlItem14.Size = new Size(355, 32); - layoutControlItem14.Text = "<color=red>*</color>鎵�灞炲煄甯�:"; - layoutControlItem14.TextSize = new Size(59, 14); + layoutControlItem12.TextSize = new Size(67, 18); // // emptySpaceItem1 // emptySpaceItem1.AllowHotTrack = false; - emptySpaceItem1.Location = new Point(313, 0); + emptySpaceItem1.Location = new Point(359, 0); emptySpaceItem1.Name = "emptySpaceItem1"; - emptySpaceItem1.Size = new Size(69, 165); + emptySpaceItem1.Size = new Size(79, 218); emptySpaceItem1.TextSize = new Size(0, 0); // // layoutControlItem4 // layoutControlItem4.Control = txtAreaSquare; layoutControlItem4.CustomizationFormText = "闈㈢Н:"; - layoutControlItem4.Location = new Point(0, 64); + layoutControlItem4.Location = new Point(0, 40); layoutControlItem4.Name = "layoutControlItem4"; - layoutControlItem4.Size = new Size(313, 32); + layoutControlItem4.Size = new Size(359, 40); layoutControlItem4.Text = "闈㈢Н(m鲁):"; - layoutControlItem4.TextSize = new Size(59, 14); - // - // layoutControlItem10 - // - layoutControlItem10.AllowHtmlStringInCaption = true; - layoutControlItem10.Control = cbArea; - layoutControlItem10.Location = new Point(0, 0); - layoutControlItem10.Name = "layoutControlItem10"; - layoutControlItem10.Size = new Size(313, 32); - layoutControlItem10.Text = "<color=red>*</color>鎵�灞炵渷浠�:"; - layoutControlItem10.TextSize = new Size(59, 14); - // - // layoutControlItem6 - // - layoutControlItem6.AllowHtmlStringInCaption = true; - layoutControlItem6.Control = cbDist; - layoutControlItem6.Location = new Point(382, 32); - layoutControlItem6.Name = "layoutControlItem6"; - layoutControlItem6.Size = new Size(355, 32); - layoutControlItem6.Text = "<color=red>*</color>鎵�灞炲尯鍘�:"; - layoutControlItem6.TextSize = new Size(59, 14); + layoutControlItem4.TextSize = new Size(67, 18); // // dxErrorProvider1 // @@ -338,12 +233,12 @@ // // ShopWizardForm // - AutoScaleDimensions = new SizeF(7F, 14F); + AutoScaleDimensions = new SizeF(8F, 18F); AutoScaleMode = AutoScaleMode.Font; Controls.Add(layoutControl1); - Margin = new Padding(2); + Margin = new Padding(2, 3, 2, 3); Name = "ShopWizardForm"; - Size = new Size(757, 185); + Size = new Size(865, 238); Load += ShopWizardForm_Load; ((System.ComponentModel.ISupportInitialize)layoutControl1).EndInit(); layoutControl1.ResumeLayout(false); @@ -353,22 +248,14 @@ ((System.ComponentModel.ISupportInitialize)txtPropertyRight.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)txtPropertyCompany.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)cbBusinessType.Properties).EndInit(); - ((System.ComponentModel.ISupportInitialize)txtAddress.Properties).EndInit(); - ((System.ComponentModel.ISupportInitialize)cbArea.Properties).EndInit(); - ((System.ComponentModel.ISupportInitialize)cbDist.Properties).EndInit(); - ((System.ComponentModel.ISupportInitialize)cbCity.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)Root).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem18).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem21).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem16).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem19).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem8).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem12).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem14).EndInit(); ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem4).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem10).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem6).EndInit(); ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).EndInit(); ResumeLayout(false); } @@ -381,22 +268,14 @@ private DevExpress.XtraEditors.TextEdit txtPropertyRight; private DevExpress.XtraEditors.TextEdit txtPropertyCompany; private DevExpress.XtraEditors.ComboBoxEdit cbBusinessType; - public DevExpress.XtraEditors.TextEdit txtAddress; private DevExpress.XtraLayout.LayoutControlGroup Root; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem10; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem12; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem14; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem16; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem18; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem19; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem21; private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1; private DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider dxErrorProvider1; - private DevExpress.XtraEditors.ImageComboBoxEdit cbArea; - private DevExpress.XtraEditors.ImageComboBoxEdit cbDist; - private DevExpress.XtraEditors.ImageComboBoxEdit cbCity; } } diff --git a/WinFrmUI/PBS.WinFrmUI/01-place/00-core/ShopWizardForm.cs b/WinFrmUI/PBS.WinFrmUI/01-place/00-core/ShopWizardForm.cs index cb765d4..8023198 100644 --- a/WinFrmUI/PBS.WinFrmUI/01-place/00-core/ShopWizardForm.cs +++ b/WinFrmUI/PBS.WinFrmUI/01-place/00-core/ShopWizardForm.cs @@ -14,21 +14,6 @@ { bool isExist = true; this.dxErrorProvider1.ClearErrors(); - if (this.cbArea.Text == "璇烽�夋嫨") - { - this.dxErrorProvider1.SetError(this.cbArea, "蹇呭~椤�"); - isExist = false; - } - if (this.cbCity.Text == "璇烽�夋嫨") - { - this.dxErrorProvider1.SetError(this.cbCity, "蹇呭~椤�"); - isExist = false; - } - if (this.cbDist.Text == "璇烽�夋嫨") - { - this.dxErrorProvider1.SetError(this.cbDist, "蹇呭~椤�"); - isExist = false; - } return isExist; } diff --git a/WinFrmUI/PBS.WinFrmUI/01-place/AddPlaceDlg.Designer.cs b/WinFrmUI/PBS.WinFrmUI/01-place/AddPlaceDlg.Designer.cs index 7875836..4b2c704 100644 --- a/WinFrmUI/PBS.WinFrmUI/01-place/AddPlaceDlg.Designer.cs +++ b/WinFrmUI/PBS.WinFrmUI/01-place/AddPlaceDlg.Designer.cs @@ -35,17 +35,18 @@ txtEditName = new DevExpress.XtraEditors.TextEdit(); layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); panelControl1 = new DevExpress.XtraEditors.PanelControl(); - textEdit1 = new DevExpress.XtraEditors.TextEdit(); - layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); textEditAddress = new DevExpress.XtraEditors.TextEdit(); - layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); memoEdit1 = new DevExpress.XtraEditors.MemoEdit(); - layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); - layoutControlGroup2 = new DevExpress.XtraLayout.LayoutControlGroup(); - layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); - layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup(); + 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(); ((System.ComponentModel.ISupportInitialize)Root).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem7).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem8).BeginInit(); @@ -53,17 +54,18 @@ ((System.ComponentModel.ISupportInitialize)layoutControl1).BeginInit(); layoutControl1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)panelControl1).BeginInit(); - ((System.ComponentModel.ISupportInitialize)textEdit1.Properties).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem1).BeginInit(); ((System.ComponentModel.ISupportInitialize)textEditAddress.Properties).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem3).BeginInit(); ((System.ComponentModel.ISupportInitialize)memoEdit1.Properties).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem4).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlGroup2).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem2).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlGroup1).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(); SuspendLayout(); // // Root @@ -74,27 +76,28 @@ Root.GroupBordersVisible = false; Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem7, layoutControlItem8, layoutControlItem1, tabbedControlGroup1, layoutControlItem3 }); Root.Name = "Root"; - Root.Size = new Size(710, 419); + Root.Size = new Size(811, 539); Root.TextVisible = false; // // layoutControlItem7 // layoutControlItem7.Control = generalOkAndCancelCtrl1; - layoutControlItem7.Location = new Point(0, 369); + layoutControlItem7.Location = new Point(0, 482); layoutControlItem7.Name = "layoutControlItem7"; - layoutControlItem7.Size = new Size(690, 30); + layoutControlItem7.Size = new Size(791, 37); layoutControlItem7.TextSize = new Size(0, 0); layoutControlItem7.TextVisible = false; // // generalOkAndCancelCtrl1 // - generalOkAndCancelCtrl1.ButtonCancelMaxSize = new Size(100, 26); - generalOkAndCancelCtrl1.ButtonCancelMinSize = new Size(100, 26); - generalOkAndCancelCtrl1.ButtonOkMaxSize = new Size(100, 26); - generalOkAndCancelCtrl1.ButtonOkMinSize = new Size(100, 26); - generalOkAndCancelCtrl1.Location = new Point(12, 381); + 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(686, 26); + generalOkAndCancelCtrl1.Size = new Size(787, 33); generalOkAndCancelCtrl1.TabIndex = 6; // // layoutControlItem8 @@ -103,15 +106,16 @@ layoutControlItem8.Control = txtEditName; layoutControlItem8.Location = new Point(0, 0); layoutControlItem8.Name = "layoutControlItem8"; - layoutControlItem8.Size = new Size(690, 24); + layoutControlItem8.Size = new Size(791, 28); layoutControlItem8.Text = "<color=red>*</color>鍚嶇О:"; - layoutControlItem8.TextSize = new Size(52, 14); + layoutControlItem8.TextSize = new Size(65, 18); // // txtEditName // - txtEditName.Location = new Point(76, 12); + txtEditName.Location = new Point(89, 12); + txtEditName.Margin = new Padding(3, 4, 3, 4); txtEditName.Name = "txtEditName"; - txtEditName.Size = new Size(622, 20); + txtEditName.Size = new Size(710, 24); txtEditName.StyleController = layoutControl1; txtEditName.TabIndex = 0; // @@ -120,123 +124,142 @@ layoutControl1.Controls.Add(panelControl1); layoutControl1.Controls.Add(generalOkAndCancelCtrl1); layoutControl1.Controls.Add(txtEditName); - layoutControl1.Controls.Add(textEdit1); 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(710, 419); + layoutControl1.Size = new Size(811, 539); layoutControl1.TabIndex = 2; layoutControl1.Text = "layoutControl1"; // // panelControl1 // - panelControl1.Location = new Point(15, 111); + panelControl1.Location = new Point(15, 129); + panelControl1.Margin = new Padding(3, 4, 3, 4); panelControl1.Name = "panelControl1"; - panelControl1.Size = new Size(680, 263); + panelControl1.Size = new Size(781, 358); panelControl1.TabIndex = 1; - // - // textEdit1 - // - textEdit1.Location = new Point(76, 36); - textEdit1.Name = "textEdit1"; - textEdit1.Size = new Size(622, 20); - textEdit1.StyleController = layoutControl1; - textEdit1.TabIndex = 2; - // - // layoutControlItem1 - // - layoutControlItem1.Control = textEdit1; - layoutControlItem1.Location = new Point(0, 24); - layoutControlItem1.Name = "layoutControlItem1"; - layoutControlItem1.Size = new Size(690, 24); - layoutControlItem1.Text = "鐪�:"; - layoutControlItem1.TextSize = new Size(52, 14); // // textEditAddress // - textEditAddress.Location = new Point(76, 60); + textEditAddress.Location = new Point(89, 68); + textEditAddress.Margin = new Padding(3, 4, 3, 4); textEditAddress.Name = "textEditAddress"; - textEditAddress.Size = new Size(622, 20); + textEditAddress.Size = new Size(710, 24); textEditAddress.StyleController = layoutControl1; textEditAddress.TabIndex = 3; // - // layoutControlItem3 - // - layoutControlItem3.Control = textEditAddress; - layoutControlItem3.Location = new Point(0, 48); - layoutControlItem3.Name = "layoutControlItem3"; - layoutControlItem3.Size = new Size(690, 24); - layoutControlItem3.Text = "璇︾粏鍦板潃:"; - layoutControlItem3.TextSize = new Size(52, 14); - // // memoEdit1 // - memoEdit1.Location = new Point(79, 111); + memoEdit1.Location = new Point(92, 129); + memoEdit1.Margin = new Padding(3, 4, 3, 4); memoEdit1.Name = "memoEdit1"; - memoEdit1.Size = new Size(616, 263); + memoEdit1.Size = new Size(704, 358); memoEdit1.StyleController = layoutControl1; memoEdit1.TabIndex = 5; // - // layoutControlItem4 + // txtEditRegion // - layoutControlItem4.Control = memoEdit1; - layoutControlItem4.Location = new Point(0, 0); - layoutControlItem4.Name = "layoutControlItem4"; - layoutControlItem4.Size = new Size(684, 267); - layoutControlItem4.Text = "璇存槑"; - layoutControlItem4.TextSize = new Size(52, 14); + 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; // - // layoutControlGroup2 + // treeListLookUpEdit1TreeList // - layoutControlGroup2.Location = new Point(0, 0); - layoutControlGroup2.Name = "layoutControlGroup2"; - layoutControlGroup2.Size = new Size(684, 267); - layoutControlGroup2.Text = "鍦板浘"; + treeListLookUpEdit1TreeList.Location = new Point(0, 0); + treeListLookUpEdit1TreeList.Name = "treeListLookUpEdit1TreeList"; + treeListLookUpEdit1TreeList.OptionsView.ShowIndentAsRowStyle = true; + treeListLookUpEdit1TreeList.Size = new Size(400, 200); + treeListLookUpEdit1TreeList.TabIndex = 0; // - // layoutControlItem2 + // layoutControlItem1 // - layoutControlItem2.Control = panelControl1; - layoutControlItem2.Location = new Point(0, 0); - layoutControlItem2.Name = "layoutControlItem2"; - layoutControlItem2.Size = new Size(684, 267); - layoutControlItem2.TextSize = new Size(0, 0); - layoutControlItem2.TextVisible = false; + 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(684, 267); + layoutControlGroup1.Size = new Size(785, 362); layoutControlGroup1.Text = "灞炴��"; // - // tabbedControlGroup1 + // layoutControlItem2 // - tabbedControlGroup1.Location = new Point(0, 72); - tabbedControlGroup1.Name = "tabbedControlGroup1"; - tabbedControlGroup1.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); - tabbedControlGroup1.SelectedTabPage = layoutControlGroup1; - tabbedControlGroup1.Size = new Size(690, 297); - tabbedControlGroup1.TabPages.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlGroup1, layoutControlGroup2, layoutControlGroup3 }); + 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(684, 267); + 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); // // AddPlaceDlg // - AutoScaleDimensions = new SizeF(7F, 14F); + AutoScaleDimensions = new SizeF(8F, 18F); AutoScaleMode = AutoScaleMode.Font; - ClientSize = new Size(710, 419); + ClientSize = new Size(811, 539); Controls.Add(layoutControl1); + Margin = new Padding(3, 4, 3, 4); Name = "AddPlaceDlg"; StartPosition = FormStartPosition.CenterScreen; Text = "鏂板"; @@ -247,17 +270,18 @@ ((System.ComponentModel.ISupportInitialize)layoutControl1).EndInit(); layoutControl1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)panelControl1).EndInit(); - ((System.ComponentModel.ISupportInitialize)textEdit1.Properties).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem1).EndInit(); ((System.ComponentModel.ISupportInitialize)textEditAddress.Properties).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem3).EndInit(); ((System.ComponentModel.ISupportInitialize)memoEdit1.Properties).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem4).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlGroup2).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem2).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlGroup1).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(); ResumeLayout(false); } @@ -271,7 +295,6 @@ private DevExpress.XtraEditors.TextEdit txtEditName; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; private DevExpress.XtraEditors.PanelControl panelControl1; - private DevExpress.XtraEditors.TextEdit textEdit1; private DevExpress.XtraEditors.TextEdit textEditAddress; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; private DevExpress.XtraEditors.MemoEdit memoEdit1; @@ -281,5 +304,7 @@ 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; } } \ 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 f81aba6..585ff5d 100644 --- a/WinFrmUI/PBS.WinFrmUI/01-place/AddPlaceDlg.cs +++ b/WinFrmUI/PBS.WinFrmUI/01-place/AddPlaceDlg.cs @@ -1,4 +1,5 @@ 锘縰sing DevExpress.XtraEditors; +using HStation.PBS; using Yw.WinFrmUI; namespace PBS.WinFrmUI @@ -12,7 +13,9 @@ this.generalOkAndCancelCtrl1.OkEvent += GeneralOkAndCancelCtrl1_OkEvent; ; } - private string _sign; + private Vmo.PlaceVmo _placeVmo; + + private ePlaceType _sign; private BuildWizardForm _buildWizard; private HospitalWizardForm _hospitalWizard; @@ -21,38 +24,48 @@ public event Func<Vmo.PlaceVmo, Task<bool>> ReloadDataEvent; - public void SetBindingData(string placeType) + public async void SetBindingData(ePlaceType placeType) { + _placeVmo = new Vmo.PlaceVmo(); + _placeVmo.PlaceType = placeType; + _sign = placeType; switch (placeType) { - case "Build": - _sign = "Build"; + case ePlaceType.Build: _buildWizard = new BuildWizardForm(); _buildWizard.Dock = DockStyle.Fill; this.panelControl1.Controls.Add(_buildWizard); break; - case "Hospital": - _sign = "Hospital"; + case ePlaceType.Hospital: _hospitalWizard = new HospitalWizardForm(); _hospitalWizard.Dock = DockStyle.Fill; this.panelControl1.Controls.Add(_hospitalWizard); break; - case "Shop": - _sign = "Shop"; + case ePlaceType.Shop: _shopWizard = new ShopWizardForm(); _shopWizard.Dock = DockStyle.Fill; this.panelControl1.Controls.Add(_shopWizard); break; - case "School": - _sign = "School"; + case ePlaceType.School: _schoolWizard = new SchoolWizardForm(); _schoolWizard.Dock = DockStyle.Fill; this.panelControl1.Controls.Add(_schoolWizard); break; } + var list = await new Yw.BLL.Division().GetAll(); + this.treeListLookUpEdit1TreeList.DataSource = list; + /* if (list != null && list.Count > 0) + { + foreach (var item in list) + { + var vm = new DivisionViewModel(item); + _allBindingList.Add(vm); + } + } + this.divisionViewModelBindingSource.DataSource = _allBindingList;*/ } /// <summary> @@ -60,28 +73,32 @@ /// </summary> private async void GeneralOkAndCancelCtrl1_OkEvent() { - var vmo = new Vmo.PlaceVmo(); switch (_sign) { - case "Build": - vmo.PlaceInfo = _buildWizard.GetData().ToString(); + case ePlaceType.Build: + _placeVmo.PlaceInfo = Yw.JsonHelper.Object2Json(_buildWizard.GetData()); break; - case "Shop": - vmo.PlaceInfo = _shopWizard.GetData().ToString(); + case ePlaceType.Shop: + _placeVmo.PlaceInfo = Yw.JsonHelper.Object2Json(_shopWizard.GetData()); break; - case "Hospital": - vmo.PlaceInfo = _hospitalWizard.GetData().ToString(); + case ePlaceType.Hospital: + _placeVmo.PlaceInfo = Yw.JsonHelper.Object2Json(_hospitalWizard.GetData()); break; - case "School": - vmo.PlaceInfo = _schoolWizard.GetData().ToString(); + case ePlaceType.School: + _placeVmo.PlaceInfo = Yw.JsonHelper.Object2Json(_schoolWizard.GetData()); break; } - vmo.Name = txtEditName.Text.Trim(); - vmo.Address = textEditAddress.Text.Trim(); - if (await ReloadDataEvent.Invoke(vmo)) + _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("鏂板鎴愬姛锛�"); } diff --git a/WinFrmUI/PBS.WinFrmUI/01-place/PlaceMgrPage.Designer.cs b/WinFrmUI/PBS.WinFrmUI/01-place/PlaceMgrPage.Designer.cs index 6712f31..6a82036 100644 --- a/WinFrmUI/PBS.WinFrmUI/01-place/PlaceMgrPage.Designer.cs +++ b/WinFrmUI/PBS.WinFrmUI/01-place/PlaceMgrPage.Designer.cs @@ -40,8 +40,6 @@ gridControl1 = new DevExpress.XtraGrid.GridControl(); placeViewModelBindingSource = new BindingSource(components); gridView1 = new GridView(); - colID = new DevExpress.XtraGrid.Columns.GridColumn(); - colRegionID = new DevExpress.XtraGrid.Columns.GridColumn(); colName = new DevExpress.XtraGrid.Columns.GridColumn(); colPlaceType = new DevExpress.XtraGrid.Columns.GridColumn(); colPlaceInfo = new DevExpress.XtraGrid.Columns.GridColumn(); @@ -84,10 +82,12 @@ // gridControl1.DataSource = placeViewModelBindingSource; gridControl1.Dock = DockStyle.Fill; - gridControl1.Location = new Point(0, 104); + 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(818, 577); + gridControl1.Size = new Size(935, 748); gridControl1.TabIndex = 18; gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { gridView1 }); // @@ -98,109 +98,117 @@ // gridView1 // behaviorManager1.SetBehaviors(gridView1, new DevExpress.Utils.Behaviors.Behavior[] { DevExpress.Utils.DragDrop.DragDropBehavior.Create(typeof(DevExpress.XtraGrid.Extensions.ColumnViewDragDropSource), true, true, true, true, dragDropEvents1) }); - gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { colID, colRegionID, colName, colPlaceType, colPlaceInfo, colAddress, colParas, colFlags, colTagName, colUseStatus, colSortCode, colDescription }); + gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { colName, colPlaceType, colPlaceInfo, colAddress, colParas, colFlags, colTagName, colUseStatus, colSortCode, colDescription }); + gridView1.DetailHeight = 450; gridView1.GridControl = gridControl1; gridView1.Name = "gridView1"; gridView1.OptionsDetail.EnableMasterViewMode = false; - // - // colID - // - colID.FieldName = "ID"; - colID.Name = "colID"; - colID.Visible = true; - colID.VisibleIndex = 0; - // - // colRegionID - // - colRegionID.FieldName = "RegionID"; - colRegionID.Name = "colRegionID"; - colRegionID.Visible = true; - colRegionID.VisibleIndex = 1; + gridView1.OptionsEditForm.PopupEditFormWidth = 914; + gridView1.OptionsView.ShowGroupPanel = false; // // colName // colName.FieldName = "Name"; + colName.MinWidth = 23; colName.Name = "colName"; colName.Visible = true; - colName.VisibleIndex = 2; + colName.VisibleIndex = 0; + colName.Width = 86; // // colPlaceType // colPlaceType.FieldName = "PlaceType"; + colPlaceType.MinWidth = 23; colPlaceType.Name = "colPlaceType"; colPlaceType.Visible = true; - colPlaceType.VisibleIndex = 3; + colPlaceType.VisibleIndex = 1; + colPlaceType.Width = 86; // // colPlaceInfo // colPlaceInfo.FieldName = "PlaceInfo"; + colPlaceInfo.MinWidth = 23; colPlaceInfo.Name = "colPlaceInfo"; - colPlaceInfo.Visible = true; - colPlaceInfo.VisibleIndex = 4; + colPlaceInfo.Width = 86; // // colAddress // colAddress.FieldName = "Address"; + colAddress.MinWidth = 23; colAddress.Name = "colAddress"; colAddress.Visible = true; - colAddress.VisibleIndex = 5; + colAddress.VisibleIndex = 2; + colAddress.Width = 86; // // colParas // colParas.FieldName = "Paras"; + colParas.MinWidth = 23; colParas.Name = "colParas"; colParas.Visible = true; - colParas.VisibleIndex = 6; + colParas.VisibleIndex = 3; + colParas.Width = 86; // // colFlags // colFlags.FieldName = "Flags"; + colFlags.MinWidth = 23; colFlags.Name = "colFlags"; colFlags.Visible = true; - colFlags.VisibleIndex = 7; + colFlags.VisibleIndex = 4; + colFlags.Width = 86; // // colTagName // colTagName.FieldName = "TagName"; + colTagName.MinWidth = 23; colTagName.Name = "colTagName"; colTagName.Visible = true; - colTagName.VisibleIndex = 8; + colTagName.VisibleIndex = 5; + colTagName.Width = 86; // // colUseStatus // colUseStatus.FieldName = "UseStatus"; + colUseStatus.MinWidth = 23; colUseStatus.Name = "colUseStatus"; colUseStatus.Visible = true; - colUseStatus.VisibleIndex = 9; + colUseStatus.VisibleIndex = 6; + colUseStatus.Width = 86; // // colSortCode // colSortCode.FieldName = "SortCode"; + colSortCode.MinWidth = 23; colSortCode.Name = "colSortCode"; - colSortCode.Visible = true; - colSortCode.VisibleIndex = 10; + colSortCode.Width = 86; // // colDescription // colDescription.FieldName = "Description"; + colDescription.MinWidth = 23; colDescription.Name = "colDescription"; colDescription.Visible = true; - colDescription.VisibleIndex = 11; + colDescription.VisibleIndex = 7; + colDescription.Width = 86; // // ribbonControl1 // ribbonControl1.DrawGroupsBorderMode = 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, barBtnEdit, barBtnRefresh, barBtnDelete, barBtnDetail, barBtnUpdateTagName, barBtnUpdateUseStatus, barCekSearch, barSubItem1, btnAddBuilding, btnAddschool, btnAddHospital, btnAddShop, barCkDrag, barBtnUp, barBtnDown }); ribbonControl1.Location = new Point(0, 0); + ribbonControl1.Margin = new Padding(3, 4, 3, 4); ribbonControl1.MaxItemId = 39; ribbonControl1.Name = "ribbonControl1"; + ribbonControl1.OptionsMenuMinWidth = 377; ribbonControl1.Pages.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPage[] { ribbonPage }); ribbonControl1.ShowApplicationButton = DefaultBoolean.False; ribbonControl1.ShowExpandCollapseButton = 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; // // barBtnEdit @@ -303,7 +311,7 @@ // barBtnUp.Caption = "涓婄Щ"; barBtnUp.Id = 37; - barBtnUp.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barButtonItem1.ImageOptions.SvgImage"); + barBtnUp.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnUp.ImageOptions.SvgImage"); barBtnUp.Name = "barBtnUp"; barBtnUp.RibbonStyle = DevExpress.XtraBars.Ribbon.RibbonItemStyles.SmallWithText; barBtnUp.ItemClick += barButtonItem1_ItemClick; @@ -312,7 +320,7 @@ // barBtnDown.Caption = "涓嬬Щ"; barBtnDown.Id = 38; - barBtnDown.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barButtonItem2.ImageOptions.SvgImage"); + barBtnDown.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnDown.ImageOptions.SvgImage"); barBtnDown.Name = "barBtnDown"; barBtnDown.RibbonStyle = DevExpress.XtraBars.Ribbon.RibbonItemStyles.SmallWithText; barBtnDown.ItemClick += barBtnDown_ItemClick; @@ -352,12 +360,13 @@ // 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(ribbonControl1); + Margin = new Padding(3, 5, 3, 5); Name = "PlaceMgrPage"; - Size = new Size(818, 681); + Size = new Size(935, 876); ((ISupportInitialize)gridControl1).EndInit(); ((ISupportInitialize)placeViewModelBindingSource).EndInit(); ((ISupportInitialize)gridView1).EndInit(); diff --git a/WinFrmUI/PBS.WinFrmUI/01-place/PlaceMgrPage.cs b/WinFrmUI/PBS.WinFrmUI/01-place/PlaceMgrPage.cs index e9600e1..672decd 100644 --- a/WinFrmUI/PBS.WinFrmUI/01-place/PlaceMgrPage.cs +++ b/WinFrmUI/PBS.WinFrmUI/01-place/PlaceMgrPage.cs @@ -10,6 +10,7 @@ public PlaceMgrPage() { InitializeComponent(); + this.gridView1.SetNormalView(30); } private List<PlaceViewModel> _allBindingList; @@ -40,12 +41,13 @@ private void btnAddBuilding_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { var dlg = new AddPlaceDlg(); - dlg.SetBindingData("Build"); + dlg.SetBindingData(HStation.PBS.ePlaceType.Build); dlg.ReloadDataEvent += async (Vmo) => { var id = await _placeBll.Insert(Vmo); if (id > 0) { + Vmo.ID = id; _allBindingList.Add(new PlaceViewModel(Vmo)); this.placeViewModelBindingSource.ResetBindings(false); return true; @@ -59,12 +61,13 @@ private void btnAddschool_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { var dlg = new AddPlaceDlg(); - dlg.SetBindingData("School"); + dlg.SetBindingData(HStation.PBS.ePlaceType.School); dlg.ReloadDataEvent += async (Vmo) => { var id = await _placeBll.Insert(Vmo); if (id > 0) { + Vmo.ID = id; _allBindingList.Add(new PlaceViewModel(Vmo)); this.placeViewModelBindingSource.ResetBindings(false); return true; @@ -78,12 +81,13 @@ private void btnAddHospital_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { var dlg = new AddPlaceDlg(); - dlg.SetBindingData("Hospital"); + dlg.SetBindingData(HStation.PBS.ePlaceType.Hospital); dlg.ReloadDataEvent += async (Vmo) => { var id = await _placeBll.Insert(Vmo); if (id > 0) { + Vmo.ID = id; _allBindingList.Add(new PlaceViewModel(Vmo)); this.placeViewModelBindingSource.ResetBindings(false); return true; @@ -97,12 +101,13 @@ private void btnAddShop_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { var dlg = new AddPlaceDlg(); - dlg.SetBindingData("Shop"); + dlg.SetBindingData(HStation.PBS.ePlaceType.Shop); dlg.ReloadDataEvent += async (Vmo) => { var id = await _placeBll.Insert(Vmo); if (id > 0) { + Vmo.ID = id; _allBindingList.Add(new PlaceViewModel(Vmo)); this.placeViewModelBindingSource.ResetBindings(false); return true; diff --git a/WinFrmUI/PBS.WinFrmUI/01-place/PlaceMgrPage.resx b/WinFrmUI/PBS.WinFrmUI/01-place/PlaceMgrPage.resx index 098a114..5fc5081 100644 --- a/WinFrmUI/PBS.WinFrmUI/01-place/PlaceMgrPage.resx +++ b/WinFrmUI/PBS.WinFrmUI/01-place/PlaceMgrPage.resx @@ -333,7 +333,7 @@ IDEyLDEyIDE2LDEyICAiIGNsYXNzPSJCbGFjayIgLz4NCiAgPC9nPg0KPC9zdmc+Cw== </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="barBtnUp.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value> AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl @@ -347,7 +347,7 @@ MjAsMTQgIiBjbGFzcz0iQmx1ZSIgLz4NCjwvc3ZnPgs= </value> </data> - <data name="barButtonItem2.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <data name="barBtnDown.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/02-facility/00-core/FacilitiesCtrl.Designer.cs b/WinFrmUI/PBS.WinFrmUI/02-facility/00-core/FacilitiesCtrl.Designer.cs new file mode 100644 index 0000000..90a3a1b --- /dev/null +++ b/WinFrmUI/PBS.WinFrmUI/02-facility/00-core/FacilitiesCtrl.Designer.cs @@ -0,0 +1,509 @@ +锘縩amespace PBS.WinFrmUI +{ + partial class FacilitiesCtrl + { + /// <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 Component 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(); + FacilitiesWizardFormlayoutControl1ConvertedLayout = new DevExpress.XtraLayout.LayoutControl(); + txtFloorHeight = new DevExpress.XtraEditors.TextEdit(); + txtFloor = new DevExpress.XtraEditors.TextEdit(); + 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(); + dxErrorProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(components); + ((System.ComponentModel.ISupportInitialize)FacilitiesWizardFormlayoutControl1ConvertedLayout).BeginInit(); + FacilitiesWizardFormlayoutControl1ConvertedLayout.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)txtFloorHeight.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)txtFloor.Properties).BeginInit(); + ((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)dxErrorProvider1).BeginInit(); + SuspendLayout(); + // + // FacilitiesWizardFormlayoutControl1ConvertedLayout + // + FacilitiesWizardFormlayoutControl1ConvertedLayout.Controls.Add(txtFloorHeight); + FacilitiesWizardFormlayoutControl1ConvertedLayout.Controls.Add(txtFloor); + 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); + FacilitiesWizardFormlayoutControl1ConvertedLayout.Margin = new Padding(3, 4, 3, 4); + FacilitiesWizardFormlayoutControl1ConvertedLayout.Name = "FacilitiesWizardFormlayoutControl1ConvertedLayout"; + FacilitiesWizardFormlayoutControl1ConvertedLayout.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new Rectangle(586, 265, 755, 663); + FacilitiesWizardFormlayoutControl1ConvertedLayout.Root = layoutControlGroup1; + FacilitiesWizardFormlayoutControl1ConvertedLayout.Size = new Size(889, 396); + FacilitiesWizardFormlayoutControl1ConvertedLayout.TabIndex = 146; + // + // txtFloorHeight + // + txtFloorHeight.Location = new Point(158, 160); + 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.StyleController = FacilitiesWizardFormlayoutControl1ConvertedLayout; + txtFloorHeight.TabIndex = 9; + // + // txtFloor + // + txtFloor.Location = new Point(158, 120); + 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.StyleController = FacilitiesWizardFormlayoutControl1ConvertedLayout; + txtFloor.TabIndex = 7; + // + // txtName + // + txtName.Location = new Point(158, 12); + txtName.Margin = new Padding(2, 3, 2, 3); + txtName.MinimumSize = new Size(0, 36); + txtName.Name = "txtName"; + txtName.Size = new Size(244, 36); + txtName.StyleController = FacilitiesWizardFormlayoutControl1ConvertedLayout; + txtName.TabIndex = 0; + // + // txtWaterPressure + // + txtWaterPressure.Location = new Point(552, 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.StyleController = FacilitiesWizardFormlayoutControl1ConvertedLayout; + txtWaterPressure.TabIndex = 2; + // + // txtMaxWaterDemand + // + txtMaxWaterDemand.Location = new Point(552, 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.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.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.StyleController = FacilitiesWizardFormlayoutControl1ConvertedLayout; + comboBoxWaterSupply.TabIndex = 4; + // + // comboBoxCompletePlant + // + comboBoxCompletePlant.Location = new Point(158, 200); + 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.StyleController = FacilitiesWizardFormlayoutControl1ConvertedLayout; + comboBoxCompletePlant.TabIndex = 10; + // + // txtFloorHouseHolds + // + txtFloorHouseHolds.Location = new Point(158, 92); + txtFloorHouseHolds.Name = "txtFloorHouseHolds"; + txtFloorHouseHolds.Size = new Size(244, 24); + txtFloorHouseHolds.StyleController = FacilitiesWizardFormlayoutControl1ConvertedLayout; + txtFloorHouseHolds.TabIndex = 5; + // + // txtConstantP + // + txtConstantP.Location = new Point(552, 200); + txtConstantP.Name = "txtConstantP"; + txtConstantP.Size = new Size(325, 24); + 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.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.StyleController = FacilitiesWizardFormlayoutControl1ConvertedLayout; + textEditWaterModel.TabIndex = 14; + // + // layoutControlGroup1 + // + layoutControlGroup1.AppearanceItemCaption.Options.UseTextOptions = true; + 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.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.Name = "txtFlooritem"; + txtFlooritem.Size = new Size(394, 40); + txtFlooritem.Text = "<color=red>*</color>妤煎眰锛�"; + txtFlooritem.TextLocation = DevExpress.Utils.Locations.Left; + txtFlooritem.TextSize = new Size(134, 18); + // + // comboBoxCompletePlantitem + // + comboBoxCompletePlantitem.AllowHtmlStringInCaption = true; + comboBoxCompletePlantitem.Control = comboBoxCompletePlant; + comboBoxCompletePlantitem.Location = new Point(0, 188); + comboBoxCompletePlantitem.Name = "comboBoxCompletePlantitem"; + comboBoxCompletePlantitem.Size = new Size(394, 40); + comboBoxCompletePlantitem.Text = "<color=red>*</color>鎴愬璁惧锛�"; + comboBoxCompletePlantitem.TextLocation = DevExpress.Utils.Locations.Left; + comboBoxCompletePlantitem.TextSize = new Size(134, 18); + // + // txtNameitem + // + txtNameitem.AllowHtmlStringInCaption = true; + txtNameitem.Control = txtName; + txtNameitem.Location = new Point(0, 0); + txtNameitem.Name = "txtNameitem"; + txtNameitem.Size = new Size(394, 40); + txtNameitem.StartNewLine = true; + txtNameitem.Text = "<color=red>*</color>璁炬柦鍚嶇О锛�"; + txtNameitem.TextLocation = DevExpress.Utils.Locations.Left; + txtNameitem.TextSize = new Size(134, 18); + // + // comboBoxWaterSupplyitem + // + comboBoxWaterSupplyitem.AllowHtmlStringInCaption = true; + comboBoxWaterSupplyitem.Control = comboBoxWaterSupply; + comboBoxWaterSupplyitem.Location = new Point(394, 40); + comboBoxWaterSupplyitem.Name = "comboBoxWaterSupplyitem"; + comboBoxWaterSupplyitem.Size = new Size(475, 40); + comboBoxWaterSupplyitem.Text = "<color=red>*</color>渚涙按鍗曞厓锛�"; + comboBoxWaterSupplyitem.TextLocation = DevExpress.Utils.Locations.Left; + comboBoxWaterSupplyitem.TextSize = new Size(134, 18); + // + // txtWaterPressureitem + // + txtWaterPressureitem.AllowHtmlStringInCaption = true; + txtWaterPressureitem.Control = txtWaterPressure; + txtWaterPressureitem.Location = new Point(394, 0); + txtWaterPressureitem.Name = "txtWaterPressureitem"; + txtWaterPressureitem.Size = new Size(475, 40); + txtWaterPressureitem.Text = "<color=red>*</color>鏈鍘嬪姏(m):"; + txtWaterPressureitem.TextLocation = DevExpress.Utils.Locations.Left; + txtWaterPressureitem.TextSize = new Size(134, 18); + // + // layoutControlItem3 + // + 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); + // + // layoutControlItem1 + // + 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; + // + // layoutControlItem6 + // + layoutControlItem6.AllowHtmlStringInCaption = true; + layoutControlItem6.Control = txtConstantP; + layoutControlItem6.Location = new Point(394, 188); + layoutControlItem6.Name = "layoutControlItem6"; + layoutControlItem6.Size = new Size(475, 40); + 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.Name = "layoutControlItem5"; + layoutControlItem5.Size = new Size(394, 28); + 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 + // + dxErrorProvider1.ContainerControl = this; + // + // FacilitiesCtrl + // + AutoScaleDimensions = new SizeF(8F, 18F); + AutoScaleMode = AutoScaleMode.Font; + Controls.Add(FacilitiesWizardFormlayoutControl1ConvertedLayout); + Margin = new Padding(2, 3, 2, 3); + Name = "FacilitiesCtrl"; + Size = new Size(889, 396); + ((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)dxErrorProvider1).EndInit(); + ResumeLayout(false); + } + + #endregion + public DevExpress.XtraEditors.TextEdit txtName; + public DevExpress.XtraEditors.TextEdit txtWaterPressure; + public DevExpress.XtraEditors.TextEdit txtMaxWaterDemand; + public DevExpress.XtraEditors.TextEdit txtFloorHeight; + public DevExpress.XtraEditors.TextEdit txtFloor; + private DevExpress.XtraLayout.LayoutControl FacilitiesWizardFormlayoutControl1ConvertedLayout; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1; + private DevExpress.XtraLayout.LayoutControlItem comboBoxWaterSupplyitem; + private DevExpress.XtraLayout.LayoutControlItem txtFloorHeightitem; + private DevExpress.XtraLayout.LayoutControlItem txtFlooritem; + private DevExpress.XtraLayout.LayoutControlItem comboBoxCompletePlantitem; + private DevExpress.XtraLayout.LayoutControlItem txtNameitem; + private DevExpress.XtraLayout.LayoutControlItem txtWaterPressureitem; + private DevExpress.XtraLayout.LayoutControlItem txtWaterHeightitem; + private DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider dxErrorProvider1; + 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; + private DevExpress.XtraEditors.TextEdit textEdit2; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8; + private DevExpress.XtraEditors.ImageComboBoxEdit textEditWaterModel; + } +} diff --git a/WinFrmUI/PBS.WinFrmUI/02-facility/00-core/FacilitiesCtrl.cs b/WinFrmUI/PBS.WinFrmUI/02-facility/00-core/FacilitiesCtrl.cs new file mode 100644 index 0000000..41b2a47 --- /dev/null +++ b/WinFrmUI/PBS.WinFrmUI/02-facility/00-core/FacilitiesCtrl.cs @@ -0,0 +1,128 @@ +锘縩amespace PBS.WinFrmUI +{ + public partial class FacilitiesCtrl : DevExpress.XtraEditors.XtraUserControl + { + public FacilitiesCtrl() + { + InitializeComponent(); + this.Load += FacilitiesCtrl_Load; + } + + private void FacilitiesCtrl_Load(object sender, EventArgs e) + { + SetBindingData(); + } + + //鍩虹楠岃瘉 + public bool Valid() + { + bool isExist = true; + this.dxErrorProvider1.ClearErrors(); + if (string.IsNullOrEmpty(this.txtName.Text.Trim())) + { + this.dxErrorProvider1.SetError(this.txtName, "蹇呭~椤�"); + isExist = false; + } + if (string.IsNullOrEmpty(this.txtFloor.Text.Trim())) + { + this.dxErrorProvider1.SetError(this.txtFloor, "蹇呭~椤�"); + isExist = false; + } + if (string.IsNullOrEmpty(this.txtFloorHeight.Text.Trim())) + { + this.dxErrorProvider1.SetError(this.txtFloorHeight, "蹇呭~椤�"); + isExist = false; + } + if (string.IsNullOrEmpty(this.txtFloorHouseHolds.Text.Trim())) + { + this.dxErrorProvider1.SetError(this.txtFloorHouseHolds, "蹇呭~椤�"); + isExist = false; + } + if (string.IsNullOrEmpty(this.txtConstantP.Text.Trim())) + { + this.dxErrorProvider1.SetError(this.txtConstantP, "蹇呭~椤�"); + isExist = false; + } + if (this.comboBoxCompletePlant.Text == "璇烽�夋嫨") + { + this.dxErrorProvider1.SetError(this.comboBoxCompletePlant, "蹇呭~椤�"); + isExist = false; + } + if (this.comboBoxWaterSupply.Text == "璇烽�夋嫨") + { + this.dxErrorProvider1.SetError(this.comboBoxWaterSupply, "蹇呭~椤�"); + isExist = false; + } + if (string.IsNullOrEmpty(this.txtMaxWaterDemand.Text.Trim())) + { + this.dxErrorProvider1.SetError(this.txtMaxWaterDemand, "蹇呭~椤�"); + return false; + } + if (string.IsNullOrEmpty(this.txtWaterPressure.Text.Trim())) + { + this.dxErrorProvider1.SetError(this.txtWaterPressure, "蹇呭~椤�"); + return false; + } + if (string.IsNullOrEmpty(this.textEdit11.Text.Trim())) + { + this.dxErrorProvider1.SetError(this.textEdit11, "蹇呭~椤�"); + return false; + } + return isExist; + } + + 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 Vmo.FacilityVmo GetData() + { + 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(), + if (comboBoxWaterSupply.EditValue != null) + { + model.WaterSupply = (HStation.PBS.eWaterSupply)comboBoxWaterSupply.EditValue; + } + return model; + //= Convert.ToDouble(textEdit11.EditValue), + // ModelType = imageComboBoxEdit11.EditValue.ToString(), + } + } +} \ No newline at end of file diff --git a/WinFrmUI/PBS.WinFrmUI/02-facility/00-core/FacilitiesCtrl.resx b/WinFrmUI/PBS.WinFrmUI/02-facility/00-core/FacilitiesCtrl.resx new file mode 100644 index 0000000..43b467c --- /dev/null +++ b/WinFrmUI/PBS.WinFrmUI/02-facility/00-core/FacilitiesCtrl.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/02-facility/00-core/FacilityViewModel.cs b/WinFrmUI/PBS.WinFrmUI/02-facility/00-core/FacilityViewModel.cs index 9bf5273..aa2e303 100644 --- a/WinFrmUI/PBS.WinFrmUI/02-facility/00-core/FacilityViewModel.cs +++ b/WinFrmUI/PBS.WinFrmUI/02-facility/00-core/FacilityViewModel.cs @@ -1,4 +1,5 @@ -锘縰sing System.ComponentModel; +锘縰sing HStation.PBS; +using System.ComponentModel; using System.Windows.Forms.VisualStyles; namespace PBS.WinFrmUI @@ -21,7 +22,6 @@ this.FloorHeight = rhs.FloorHeight; this.Households = rhs.Households; this.MaxWaterDemand = rhs.MaxWaterDemand; - this.ServicePipeLength = rhs.ServicePipeLength; this.ConstantPressure = rhs.ConstantPressure; this.TerminalPressure = rhs.TerminalPressure; this.Paras = rhs.Paras == null ? null : new(rhs.Paras); @@ -31,7 +31,6 @@ this.SortCode = rhs.SortCode; this.Description = rhs.Description; } - public void Resert(Vmo.FacilityVmo rhs) { @@ -45,7 +44,6 @@ this.FloorHeight = rhs.FloorHeight; this.Households = rhs.Households; this.MaxWaterDemand = rhs.MaxWaterDemand; - this.ServicePipeLength = rhs.ServicePipeLength; this.ConstantPressure = rhs.ConstantPressure; this.TerminalPressure = rhs.TerminalPressure; this.Paras = rhs.Paras == null ? null : new(rhs.Paras); @@ -54,7 +52,6 @@ this.UseStatus = rhs.UseStatus; this.SortCode = rhs.SortCode; this.Description = rhs.Description; - } /// <summary> @@ -62,7 +59,7 @@ ///</summary> [DisplayName("ID")] [Browsable(false)] - public long ID { get; set; } + public long ID { get; set; } /// <summary> /// PlaceID @@ -81,7 +78,7 @@ /// <summary> /// 鍚嶇О ///</summary> - [DisplayName("Name")] + [DisplayName("鍚嶇О")] [Browsable(true)] public string Name { get; set; } @@ -90,22 +87,20 @@ ///</summary> [DisplayName("渚涙按鍗曞厓")] [Browsable(true)] - public int WaterSupply { get; set; } + public eWaterSupply WaterSupply { get; set; } /// <summary> /// 渚涙按妯″紡 ///</summary> [DisplayName("渚涙按妯″紡")] [Browsable(true)] - - public int SupplyMode { get; set; } + public eSupplyMode SupplyMode { get; set; } /// <summary> /// 妤煎眰 ///</summary> [DisplayName("妤煎眰")] [Browsable(true)] - public int Floor { get; set; } /// <summary> @@ -113,7 +108,6 @@ ///</summary> [DisplayName("灞傞珮")] [Browsable(true)] - public double? FloorHeight { get; set; } /// <summary> @@ -131,13 +125,6 @@ [DisplayName("鏈�澶ч渶姘撮噺")] [Browsable(true)] public double? MaxWaterDemand { get; set; } - - /// <summary> - /// 鍏ユ埛绠¢暱 - ///</summary> - [DisplayName("鍏ユ埛绠¢暱")] - [Browsable(true)] - public double? ServicePipeLength { get; set; } /// <summary> /// 鎭掑畾鍘嬪姏 @@ -179,7 +166,7 @@ ///</summary> [DisplayName("浣跨敤鐘舵��")] [Browsable(true)] - public int UseStatus { get; set; } + public Yw.Vmo.eUseStatus UseStatus { get; set; } /// <summary> /// 鎺掑簭鐮� diff --git a/WinFrmUI/PBS.WinFrmUI/02-facility/AddPlaceDlg.Designer.cs b/WinFrmUI/PBS.WinFrmUI/02-facility/AddPlaceDlg.Designer.cs new file mode 100644 index 0000000..f66e5e4 --- /dev/null +++ b/WinFrmUI/PBS.WinFrmUI/02-facility/AddPlaceDlg.Designer.cs @@ -0,0 +1,134 @@ +锘縩amespace PBS.WinFrmUI +{ + partial class AddFacilityDlg + { + /// <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() + { + 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(); + ((System.ComponentModel.ISupportInitialize)Root).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem7).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControl1).BeginInit(); + layoutControl1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem1).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, layoutControlItem1 }); + Root.Name = "Root"; + Root.Size = new Size(779, 347); + Root.TextVisible = false; + // + // layoutControlItem7 + // + layoutControlItem7.Control = generalOkAndCancelCtrl1; + layoutControlItem7.Location = new Point(0, 290); + layoutControlItem7.Name = "layoutControlItem7"; + layoutControlItem7.Size = new Size(759, 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, 302); + generalOkAndCancelCtrl1.Margin = new Padding(3, 5, 3, 5); + generalOkAndCancelCtrl1.Name = "generalOkAndCancelCtrl1"; + generalOkAndCancelCtrl1.Size = new Size(755, 33); + generalOkAndCancelCtrl1.TabIndex = 0; + // + // layoutControl1 + // + layoutControl1.Controls.Add(facilitiesCtrl); + layoutControl1.Controls.Add(generalOkAndCancelCtrl1); + 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(779, 347); + 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); + Controls.Add(layoutControl1); + Margin = new Padding(3, 4, 3, 4); + Name = "AddFacilityDlg"; + StartPosition = FormStartPosition.CenterScreen; + Text = "鏂板"; + ((System.ComponentModel.ISupportInitialize)Root).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem7).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControl1).EndInit(); + layoutControl1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)layoutControlItem1).EndInit(); + ResumeLayout(false); + } + + #endregion + + private DevExpress.XtraLayout.LayoutControlGroup Root; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7; + private Yw.WinFrmUI.GeneralOkAndCancelCtrl generalOkAndCancelCtrl1; + private DevExpress.XtraLayout.LayoutControl layoutControl1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; + private FacilitiesCtrl facilitiesCtrl; + } +} \ No newline at end of file diff --git a/WinFrmUI/PBS.WinFrmUI/02-facility/AddPlaceDlg.cs b/WinFrmUI/PBS.WinFrmUI/02-facility/AddPlaceDlg.cs new file mode 100644 index 0000000..499df26 --- /dev/null +++ b/WinFrmUI/PBS.WinFrmUI/02-facility/AddPlaceDlg.cs @@ -0,0 +1,51 @@ +锘縰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.resx b/WinFrmUI/PBS.WinFrmUI/02-facility/AddPlaceDlg.resx new file mode 100644 index 0000000..8b2ff64 --- /dev/null +++ b/WinFrmUI/PBS.WinFrmUI/02-facility/AddPlaceDlg.resx @@ -0,0 +1,120 @@ +锘�<?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> +</root> \ No newline at end of file diff --git a/WinFrmUI/PBS.WinFrmUI/02-facility/FacilityMgrPage.Designer.cs b/WinFrmUI/PBS.WinFrmUI/02-facility/FacilityMgrPage.Designer.cs index 26e021e..85c2a61 100644 --- a/WinFrmUI/PBS.WinFrmUI/02-facility/FacilityMgrPage.Designer.cs +++ b/WinFrmUI/PBS.WinFrmUI/02-facility/FacilityMgrPage.Designer.cs @@ -36,18 +36,20 @@ private void InitializeComponent() { components = new Container(); - ComponentResourceManager resources = new ComponentResourceManager(typeof(PlaceMgrPage)); + ComponentResourceManager resources = new ComponentResourceManager(typeof(FacilityMgrPage)); gridControl1 = new DevExpress.XtraGrid.GridControl(); - placeViewModelBindingSource = new BindingSource(components); + facilityViewModelBindingSource = new BindingSource(components); gridView1 = new GridView(); - colID = new DevExpress.XtraGrid.Columns.GridColumn(); - colRegionID = new DevExpress.XtraGrid.Columns.GridColumn(); colName = new DevExpress.XtraGrid.Columns.GridColumn(); - colPlaceType = new DevExpress.XtraGrid.Columns.GridColumn(); - colPlaceInfo = new DevExpress.XtraGrid.Columns.GridColumn(); - colAddress = new DevExpress.XtraGrid.Columns.GridColumn(); + colWaterSupply = new DevExpress.XtraGrid.Columns.GridColumn(); + colSupplyMode = new DevExpress.XtraGrid.Columns.GridColumn(); + colFloor = new DevExpress.XtraGrid.Columns.GridColumn(); + colFloorHeight = new DevExpress.XtraGrid.Columns.GridColumn(); + colHouseholds = new DevExpress.XtraGrid.Columns.GridColumn(); + colMaxWaterDemand = new DevExpress.XtraGrid.Columns.GridColumn(); + colConstantPressure = new DevExpress.XtraGrid.Columns.GridColumn(); + colTerminalPressure = new DevExpress.XtraGrid.Columns.GridColumn(); colParas = new DevExpress.XtraGrid.Columns.GridColumn(); - colFlags = new DevExpress.XtraGrid.Columns.GridColumn(); colTagName = new DevExpress.XtraGrid.Columns.GridColumn(); colUseStatus = new DevExpress.XtraGrid.Columns.GridColumn(); colSortCode = new DevExpress.XtraGrid.Columns.GridColumn(); @@ -60,7 +62,6 @@ barBtnUpdateTagName = new DevExpress.XtraBars.BarButtonItem(); barBtnUpdateUseStatus = new DevExpress.XtraBars.BarButtonItem(); barCekSearch = new DevExpress.XtraBars.BarCheckItem(); - barSubItem1 = new DevExpress.XtraBars.BarSubItem(); btnAddBuilding = new DevExpress.XtraBars.BarButtonItem(); btnAddschool = new DevExpress.XtraBars.BarButtonItem(); btnAddHospital = new DevExpress.XtraBars.BarButtonItem(); @@ -68,13 +69,14 @@ barCkDrag = new DevExpress.XtraBars.BarCheckItem(); barBtnUp = new DevExpress.XtraBars.BarButtonItem(); barBtnDown = new DevExpress.XtraBars.BarButtonItem(); + BtnAdd = new DevExpress.XtraBars.BarButtonItem(); ribbonPage = new DevExpress.XtraBars.Ribbon.RibbonPage(); ribbonPageGroup1 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup(); ribbonPageGroup2 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup(); behaviorManager1 = new DevExpress.Utils.Behaviors.BehaviorManager(components); dragDropEvents1 = new DevExpress.Utils.DragDrop.DragDropEvents(components); ((ISupportInitialize)gridControl1).BeginInit(); - ((ISupportInitialize)placeViewModelBindingSource).BeginInit(); + ((ISupportInitialize)facilityViewModelBindingSource).BeginInit(); ((ISupportInitialize)gridView1).BeginInit(); ((ISupportInitialize)ribbonControl1).BeginInit(); ((ISupportInitialize)behaviorManager1).BeginInit(); @@ -82,125 +84,173 @@ // // gridControl1 // - gridControl1.DataSource = placeViewModelBindingSource; + gridControl1.DataSource = facilityViewModelBindingSource; gridControl1.Dock = DockStyle.Fill; - gridControl1.Location = new Point(0, 104); + 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(818, 577); + gridControl1.Size = new Size(935, 748); gridControl1.TabIndex = 18; gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { gridView1 }); // - // placeViewModelBindingSource + // facilityViewModelBindingSource // - placeViewModelBindingSource.DataSource = typeof(PlaceViewModel); + facilityViewModelBindingSource.DataSource = typeof(FacilityViewModel); // // gridView1 // behaviorManager1.SetBehaviors(gridView1, new DevExpress.Utils.Behaviors.Behavior[] { DevExpress.Utils.DragDrop.DragDropBehavior.Create(typeof(DevExpress.XtraGrid.Extensions.ColumnViewDragDropSource), true, true, true, true, dragDropEvents1) }); - gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { colID, colRegionID, colName, colPlaceType, colPlaceInfo, colAddress, colParas, colFlags, colTagName, colUseStatus, colSortCode, colDescription }); + gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { colName, colWaterSupply, colSupplyMode, colFloor, colFloorHeight, colHouseholds, colMaxWaterDemand, colConstantPressure, colTerminalPressure, colParas, colTagName, colUseStatus, colSortCode, colDescription }); + gridView1.DetailHeight = 450; gridView1.GridControl = gridControl1; gridView1.Name = "gridView1"; gridView1.OptionsDetail.EnableMasterViewMode = false; - // - // colID - // - colID.FieldName = "ID"; - colID.Name = "colID"; - colID.Visible = true; - colID.VisibleIndex = 0; - // - // colRegionID - // - colRegionID.FieldName = "RegionID"; - colRegionID.Name = "colRegionID"; - colRegionID.Visible = true; - colRegionID.VisibleIndex = 1; + gridView1.OptionsEditForm.PopupEditFormWidth = 914; + gridView1.OptionsView.ShowGroupPanel = false; // // colName // colName.FieldName = "Name"; + colName.MinWidth = 25; colName.Name = "colName"; colName.Visible = true; - colName.VisibleIndex = 2; + colName.VisibleIndex = 0; + colName.Width = 94; // - // colPlaceType + // colWaterSupply // - colPlaceType.FieldName = "PlaceType"; - colPlaceType.Name = "colPlaceType"; - colPlaceType.Visible = true; - colPlaceType.VisibleIndex = 3; + colWaterSupply.FieldName = "WaterSupply"; + colWaterSupply.MinWidth = 25; + colWaterSupply.Name = "colWaterSupply"; + colWaterSupply.Visible = true; + colWaterSupply.VisibleIndex = 1; + colWaterSupply.Width = 94; // - // colPlaceInfo + // colSupplyMode // - colPlaceInfo.FieldName = "PlaceInfo"; - colPlaceInfo.Name = "colPlaceInfo"; - colPlaceInfo.Visible = true; - colPlaceInfo.VisibleIndex = 4; + colSupplyMode.FieldName = "SupplyMode"; + colSupplyMode.MinWidth = 25; + colSupplyMode.Name = "colSupplyMode"; + colSupplyMode.Visible = true; + colSupplyMode.VisibleIndex = 2; + colSupplyMode.Width = 94; // - // colAddress + // colFloor // - colAddress.FieldName = "Address"; - colAddress.Name = "colAddress"; - colAddress.Visible = true; - colAddress.VisibleIndex = 5; + colFloor.FieldName = "Floor"; + colFloor.MinWidth = 25; + colFloor.Name = "colFloor"; + colFloor.Visible = true; + colFloor.VisibleIndex = 3; + colFloor.Width = 94; + // + // colFloorHeight + // + colFloorHeight.FieldName = "FloorHeight"; + colFloorHeight.MinWidth = 25; + colFloorHeight.Name = "colFloorHeight"; + colFloorHeight.Visible = true; + colFloorHeight.VisibleIndex = 4; + colFloorHeight.Width = 94; + // + // colHouseholds + // + colHouseholds.FieldName = "Households"; + colHouseholds.MinWidth = 25; + colHouseholds.Name = "colHouseholds"; + colHouseholds.Visible = true; + colHouseholds.VisibleIndex = 5; + colHouseholds.Width = 94; + // + // colMaxWaterDemand + // + colMaxWaterDemand.FieldName = "MaxWaterDemand"; + colMaxWaterDemand.MinWidth = 25; + colMaxWaterDemand.Name = "colMaxWaterDemand"; + colMaxWaterDemand.Visible = true; + colMaxWaterDemand.VisibleIndex = 6; + colMaxWaterDemand.Width = 94; + // + // colConstantPressure + // + colConstantPressure.FieldName = "ConstantPressure"; + colConstantPressure.MinWidth = 25; + colConstantPressure.Name = "colConstantPressure"; + colConstantPressure.Visible = true; + colConstantPressure.VisibleIndex = 7; + colConstantPressure.Width = 94; + // + // colTerminalPressure + // + colTerminalPressure.FieldName = "TerminalPressure"; + colTerminalPressure.MinWidth = 25; + colTerminalPressure.Name = "colTerminalPressure"; + colTerminalPressure.Visible = true; + colTerminalPressure.VisibleIndex = 8; + colTerminalPressure.Width = 94; // // colParas // colParas.FieldName = "Paras"; + colParas.MinWidth = 25; colParas.Name = "colParas"; colParas.Visible = true; - colParas.VisibleIndex = 6; - // - // colFlags - // - colFlags.FieldName = "Flags"; - colFlags.Name = "colFlags"; - colFlags.Visible = true; - colFlags.VisibleIndex = 7; + colParas.VisibleIndex = 9; + colParas.Width = 94; // // colTagName // colTagName.FieldName = "TagName"; + colTagName.MinWidth = 25; colTagName.Name = "colTagName"; colTagName.Visible = true; - colTagName.VisibleIndex = 8; + colTagName.VisibleIndex = 10; + colTagName.Width = 94; // // colUseStatus // colUseStatus.FieldName = "UseStatus"; + colUseStatus.MinWidth = 25; colUseStatus.Name = "colUseStatus"; colUseStatus.Visible = true; - colUseStatus.VisibleIndex = 9; + colUseStatus.VisibleIndex = 11; + colUseStatus.Width = 94; // // colSortCode // colSortCode.FieldName = "SortCode"; + colSortCode.MinWidth = 25; colSortCode.Name = "colSortCode"; - colSortCode.Visible = true; - colSortCode.VisibleIndex = 10; + colSortCode.Width = 94; // // colDescription // colDescription.FieldName = "Description"; + colDescription.MinWidth = 25; colDescription.Name = "colDescription"; colDescription.Visible = true; - colDescription.VisibleIndex = 11; + colDescription.VisibleIndex = 12; + colDescription.Width = 94; // // ribbonControl1 // ribbonControl1.DrawGroupsBorderMode = 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, barBtnEdit, barBtnRefresh, barBtnDelete, barBtnDetail, barBtnUpdateTagName, barBtnUpdateUseStatus, barCekSearch, barSubItem1, btnAddBuilding, btnAddschool, btnAddHospital, btnAddShop, barCkDrag, barBtnUp, barBtnDown }); + ribbonControl1.Items.AddRange(new DevExpress.XtraBars.BarItem[] { ribbonControl1.ExpandCollapseItem, barBtnEdit, barBtnRefresh, barBtnDelete, barBtnDetail, barBtnUpdateTagName, barBtnUpdateUseStatus, barCekSearch, btnAddBuilding, btnAddschool, btnAddHospital, btnAddShop, barCkDrag, barBtnUp, barBtnDown, BtnAdd }); ribbonControl1.Location = new Point(0, 0); - ribbonControl1.MaxItemId = 39; + ribbonControl1.Margin = new Padding(3, 4, 3, 4); + ribbonControl1.MaxItemId = 44; ribbonControl1.Name = "ribbonControl1"; + ribbonControl1.OptionsMenuMinWidth = 377; ribbonControl1.Pages.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPage[] { ribbonPage }); ribbonControl1.ShowApplicationButton = DefaultBoolean.False; ribbonControl1.ShowExpandCollapseButton = 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; // // barBtnEdit @@ -255,41 +305,25 @@ barCekSearch.Name = "barCekSearch"; barCekSearch.CheckedChanged += barCekSearch_CheckedChanged; // - // barSubItem1 - // - barSubItem1.Caption = "娣诲姞"; - barSubItem1.Id = 31; - barSubItem1.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barSubItem1.ImageOptions.SvgImage"); - barSubItem1.LinksPersistInfo.AddRange(new DevExpress.XtraBars.LinkPersistInfo[] { new DevExpress.XtraBars.LinkPersistInfo(btnAddBuilding), new DevExpress.XtraBars.LinkPersistInfo(btnAddschool), new DevExpress.XtraBars.LinkPersistInfo(btnAddHospital), new DevExpress.XtraBars.LinkPersistInfo(btnAddShop) }); - barSubItem1.Name = "barSubItem1"; - // // btnAddBuilding // - btnAddBuilding.Caption = "灏忓尯"; - btnAddBuilding.Id = 32; + btnAddBuilding.Id = 40; btnAddBuilding.Name = "btnAddBuilding"; - btnAddBuilding.ItemClick += btnAddBuilding_ItemClick; // // btnAddschool // - btnAddschool.Caption = "瀛︽牎"; - btnAddschool.Id = 33; + btnAddschool.Id = 41; btnAddschool.Name = "btnAddschool"; - btnAddschool.ItemClick += btnAddschool_ItemClick; // // btnAddHospital // - btnAddHospital.Caption = "鍖婚櫌"; - btnAddHospital.Id = 34; + btnAddHospital.Id = 42; btnAddHospital.Name = "btnAddHospital"; - btnAddHospital.ItemClick += btnAddHospital_ItemClick; // // btnAddShop // - btnAddShop.Caption = "鍟嗛摵"; - btnAddShop.Id = 35; + btnAddShop.Id = 43; btnAddShop.Name = "btnAddShop"; - btnAddShop.ItemClick += btnAddShop_ItemClick; // // barCkDrag // @@ -303,7 +337,7 @@ // barBtnUp.Caption = "涓婄Щ"; barBtnUp.Id = 37; - barBtnUp.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barButtonItem1.ImageOptions.SvgImage"); + barBtnUp.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnUp.ImageOptions.SvgImage"); barBtnUp.Name = "barBtnUp"; barBtnUp.RibbonStyle = DevExpress.XtraBars.Ribbon.RibbonItemStyles.SmallWithText; barBtnUp.ItemClick += barButtonItem1_ItemClick; @@ -312,10 +346,18 @@ // barBtnDown.Caption = "涓嬬Щ"; barBtnDown.Id = 38; - barBtnDown.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barButtonItem2.ImageOptions.SvgImage"); + barBtnDown.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnDown.ImageOptions.SvgImage"); barBtnDown.Name = "barBtnDown"; barBtnDown.RibbonStyle = DevExpress.XtraBars.Ribbon.RibbonItemStyles.SmallWithText; barBtnDown.ItemClick += barBtnDown_ItemClick; + // + // BtnAdd + // + BtnAdd.Caption = "娣诲姞"; + BtnAdd.Id = 39; + BtnAdd.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("BtnAdd.ImageOptions.SvgImage"); + BtnAdd.Name = "BtnAdd"; + BtnAdd.ItemClick += BtnAdd_ItemClick; // // ribbonPage // @@ -325,7 +367,7 @@ // // ribbonPageGroup1 // - ribbonPageGroup1.ItemLinks.Add(barSubItem1); + ribbonPageGroup1.ItemLinks.Add(BtnAdd); ribbonPageGroup1.ItemLinks.Add(barBtnEdit); ribbonPageGroup1.ItemLinks.Add(barBtnDelete); ribbonPageGroup1.ItemLinks.Add(barBtnDetail); @@ -348,18 +390,19 @@ // dragDropEvents1.DragDrop += dragDropEvents1_DragDrop; // - // PlaceMgrPage + // FacilityMgrPage // 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(ribbonControl1); - Name = "PlaceMgrPage"; - Size = new Size(818, 681); + Margin = new Padding(3, 5, 3, 5); + Name = "FacilityMgrPage"; + Size = new Size(935, 876); ((ISupportInitialize)gridControl1).EndInit(); - ((ISupportInitialize)placeViewModelBindingSource).EndInit(); + ((ISupportInitialize)facilityViewModelBindingSource).EndInit(); ((ISupportInitialize)gridView1).EndInit(); ((ISupportInitialize)ribbonControl1).EndInit(); ((ISupportInitialize)behaviorManager1).EndInit(); @@ -380,20 +423,6 @@ private DevExpress.XtraBars.BarButtonItem barBtnUpdateTagName; private DevExpress.XtraBars.BarButtonItem barBtnUpdateUseStatus; private DevExpress.XtraBars.BarCheckItem barCekSearch; - private BindingSource placeViewModelBindingSource; - private DevExpress.XtraGrid.Columns.GridColumn colID; - private DevExpress.XtraGrid.Columns.GridColumn colRegionID; - private DevExpress.XtraGrid.Columns.GridColumn colName; - private DevExpress.XtraGrid.Columns.GridColumn colPlaceType; - private DevExpress.XtraGrid.Columns.GridColumn colPlaceInfo; - private DevExpress.XtraGrid.Columns.GridColumn colAddress; - private DevExpress.XtraGrid.Columns.GridColumn colParas; - private DevExpress.XtraGrid.Columns.GridColumn colFlags; - private DevExpress.XtraGrid.Columns.GridColumn colTagName; - private DevExpress.XtraGrid.Columns.GridColumn colUseStatus; - private DevExpress.XtraGrid.Columns.GridColumn colSortCode; - private DevExpress.XtraGrid.Columns.GridColumn colDescription; - private DevExpress.XtraBars.BarSubItem barSubItem1; private DevExpress.XtraBars.BarButtonItem btnAddBuilding; private DevExpress.XtraBars.BarButtonItem btnAddschool; private DevExpress.XtraBars.BarButtonItem btnAddHospital; @@ -404,5 +433,21 @@ private DevExpress.XtraBars.Ribbon.RibbonPageGroup ribbonPageGroup2; private DevExpress.Utils.Behaviors.BehaviorManager behaviorManager1; private DevExpress.Utils.DragDrop.DragDropEvents dragDropEvents1; + private BindingSource facilityViewModelBindingSource; + private DevExpress.XtraGrid.Columns.GridColumn colName; + private DevExpress.XtraGrid.Columns.GridColumn colWaterSupply; + private DevExpress.XtraGrid.Columns.GridColumn colSupplyMode; + private DevExpress.XtraGrid.Columns.GridColumn colFloor; + private DevExpress.XtraGrid.Columns.GridColumn colFloorHeight; + private DevExpress.XtraGrid.Columns.GridColumn colHouseholds; + private DevExpress.XtraGrid.Columns.GridColumn colMaxWaterDemand; + private DevExpress.XtraGrid.Columns.GridColumn colConstantPressure; + private DevExpress.XtraGrid.Columns.GridColumn colTerminalPressure; + private DevExpress.XtraGrid.Columns.GridColumn colParas; + private DevExpress.XtraGrid.Columns.GridColumn colTagName; + private DevExpress.XtraGrid.Columns.GridColumn colUseStatus; + private DevExpress.XtraGrid.Columns.GridColumn colSortCode; + private DevExpress.XtraGrid.Columns.GridColumn colDescription; + private DevExpress.XtraBars.BarButtonItem BtnAdd; } } diff --git a/WinFrmUI/PBS.WinFrmUI/02-facility/FacilityMgrPage.cs b/WinFrmUI/PBS.WinFrmUI/02-facility/FacilityMgrPage.cs index 06b65ab..1898c84 100644 --- a/WinFrmUI/PBS.WinFrmUI/02-facility/FacilityMgrPage.cs +++ b/WinFrmUI/PBS.WinFrmUI/02-facility/FacilityMgrPage.cs @@ -32,86 +32,27 @@ _allBindingList.Add(new FacilityViewModel(item)); } } - this.placeViewModelBindingSource.DataSource = _allBindingList; - this.placeViewModelBindingSource.ResetBindings(false); + this.facilityViewModelBindingSource.DataSource = _allBindingList; + this.facilityViewModelBindingSource.ResetBindings(false); } - //鏂板灏忓尯 - private void btnAddBuilding_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + //鏂板 + private void BtnAdd_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { - /* var dlg = new AddPlaceDlg(); - dlg.SetBindingData("Build"); - dlg.ReloadDataEvent += async (Vmo) => - { - var id = await _facilityBll.Insert(Vmo); - if (id > 0) - { - _allBindingList.Add(new PlaceViewModel(Vmo)); - this.placeViewModelBindingSource.ResetBindings(false); - return true; - } - return false; - }; - dlg.ShowDialog();*/ - } - - //鏂板瀛︽牎 - private void btnAddschool_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) - { - /* var dlg = new AddPlaceDlg(); - dlg.SetBindingData("School"); - dlg.ReloadDataEvent += async (Vmo) => - { - var id = await _facilityBll.Insert(Vmo); - if (id > 0) - { - _allBindingList.Add(new PlaceViewModel(Vmo)); - this.placeViewModelBindingSource.ResetBindings(false); - return true; - } - return false; - }; - dlg.ShowDialog();*/ - } - - //鏂板鍖婚櫌 - private void btnAddHospital_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) - { - /* var dlg = new AddPlaceDlg(); - dlg.SetBindingData("Hospital"); - dlg.ReloadDataEvent += async (Vmo) => - { - var id = await _facilityBll.Insert(Vmo); - if (id > 0) - { - _allBindingList.Add(new PlaceViewModel(Vmo)); - this.placeViewModelBindingSource.ResetBindings(false); - return true; - } - return false; - }; - dlg.ShowDialog(); - */ - } - - //鏂板鍟嗛摵 - private void btnAddShop_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) - { - /* var dlg = new AddPlaceDlg(); - dlg.SetBindingData("Shop"); - dlg.ReloadDataEvent += async (Vmo) => - { - var id = await _facilityBll.Insert(Vmo); - if (id > 0) - { - _allBindingList.Add(new PlaceViewModel(Vmo)); - this.placeViewModelBindingSource.ResetBindings(false); - return true; - } - return false; - }; - dlg.ShowDialog(); - */ + var dlg = new AddFacilityDlg(); + dlg.ReloadDataEvent += async (vmo) => + { + var id = await _facilityBll.Insert(vmo); + if (id > 0) + { + vmo.ID = id; + _allBindingList.Add(new FacilityViewModel(vmo)); + this.facilityViewModelBindingSource.ResetBindings(false); + return true; + } + return false; + }; + dlg.ShowDialog(); } //鍒犻櫎 @@ -134,7 +75,7 @@ return; } _allBindingList.Remove(vm); - this.placeViewModelBindingSource.ResetBindings(false); + this.facilityViewModelBindingSource.ResetBindings(false); TipFormHelper.ShowSucceed("鍒犻櫎鎴愬姛锛�"); } @@ -288,8 +229,8 @@ current.SortCode = prev.SortCode; prev.SortCode = sortCode; _allBindingList = _allBindingList.OrderBy(x => x.SortCode).ToList(); - this.placeViewModelBindingSource.DataSource = _allBindingList; - this.placeViewModelBindingSource.ResetBindings(false); + this.facilityViewModelBindingSource.DataSource = _allBindingList; + this.facilityViewModelBindingSource.ResetBindings(false); this.gridView1.FocusedRowHandle = prevHandle; } @@ -336,8 +277,8 @@ current.SortCode = next.SortCode; next.SortCode = sortCode; _allBindingList = _allBindingList.OrderBy(x => x.SortCode).ToList(); - this.placeViewModelBindingSource.DataSource = _allBindingList; - this.placeViewModelBindingSource.ResetBindings(false); + this.facilityViewModelBindingSource.DataSource = _allBindingList; + this.facilityViewModelBindingSource.ResetBindings(false); this.gridView1.FocusedRowHandle = nextHandle; } } diff --git a/WinFrmUI/PBS.WinFrmUI/02-facility/FacilityMgrPage.resx b/WinFrmUI/PBS.WinFrmUI/02-facility/FacilityMgrPage.resx index 098a114..123a0f6 100644 --- a/WinFrmUI/PBS.WinFrmUI/02-facility/FacilityMgrPage.resx +++ b/WinFrmUI/PBS.WinFrmUI/02-facility/FacilityMgrPage.resx @@ -117,8 +117,8 @@ <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> - <metadata name="placeViewModelBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>17, 17</value> + <metadata name="facilityViewModelBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>513, 20</value> </metadata> <metadata name="behaviorManager1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>311, 20</value> @@ -294,25 +294,6 @@ QmxhY2siIC8+DQogIDwvZz4NCjwvc3ZnPgs= </value> </data> - <data name="barSubItem1.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value> - AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 - LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl - dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAKcCAAAC77u/ - PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi - IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv - MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh - Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg - MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5Z - ZWxsb3d7ZmlsbDojRkZCMTE1O30KCS5CbGFja3tmaWxsOiM3MjcyNzI7fQoJLkdyZWVue2ZpbGw6IzAz - OUMyMzt9CgkuUmVke2ZpbGw6I0QxMUMxQzt9Cgkuc3Qwe29wYWNpdHk6MC43NTt9Cgkuc3Qxe29wYWNp - dHk6MC41O30KPC9zdHlsZT4NCiAgPGcgaWQ9IkFkZCI+DQogICAgPHBhdGggZD0iTTI3LDE0aC05VjVj - MC0wLjUtMC41LTEtMS0xaC0yYy0wLjUsMC0xLDAuNS0xLDF2OUg1Yy0wLjUsMC0xLDAuNS0xLDF2MmMw - LDAuNSwwLjUsMSwxLDFoOXY5ICAgYzAsMC41LDAuNSwxLDEsMWgyYzAuNSwwLDEtMC41LDEtMXYtOWg5 - YzAuNSwwLDEtMC41LDEtMXYtMkMyOCwxNC41LDI3LjUsMTQsMjcsMTR6IiBjbGFzcz0iR3JlZW4iIC8+ - DQogIDwvZz4NCjwvc3ZnPgs= -</value> - </data> <data name="barCkDrag.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value> AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 @@ -333,7 +314,7 @@ IDEyLDEyIDE2LDEyICAiIGNsYXNzPSJCbGFjayIgLz4NCiAgPC9nPg0KPC9zdmc+Cw== </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="barBtnUp.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value> AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl @@ -347,7 +328,7 @@ MjAsMTQgIiBjbGFzcz0iQmx1ZSIgLz4NCjwvc3ZnPgs= </value> </data> - <data name="barButtonItem2.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <data name="barBtnDown.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value> AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl @@ -361,4 +342,23 @@ MiwxOCAiIGNsYXNzPSJCbHVlIiAvPg0KPC9zdmc+Cw== </value> </data> + <data name="BtnAdd.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAKcCAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5Z + ZWxsb3d7ZmlsbDojRkZCMTE1O30KCS5CbGFja3tmaWxsOiM3MjcyNzI7fQoJLkdyZWVue2ZpbGw6IzAz + OUMyMzt9CgkuUmVke2ZpbGw6I0QxMUMxQzt9Cgkuc3Qwe29wYWNpdHk6MC43NTt9Cgkuc3Qxe29wYWNp + dHk6MC41O30KPC9zdHlsZT4NCiAgPGcgaWQ9IkFkZCI+DQogICAgPHBhdGggZD0iTTI3LDE0aC05VjVj + MC0wLjUtMC41LTEtMS0xaC0yYy0wLjUsMC0xLDAuNS0xLDF2OUg1Yy0wLjUsMC0xLDAuNS0xLDF2MmMw + LDAuNSwwLjUsMSwxLDFoOXY5ICAgYzAsMC41LDAuNSwxLDEsMWgyYzAuNSwwLDEtMC41LDEtMXYtOWg5 + YzAuNSwwLDEtMC41LDEtMXYtMkMyOCwxNC41LDI3LjUsMTQsMjcsMTR6IiBjbGFzcz0iR3JlZW4iIC8+ + DQogIDwvZz4NCjwvc3ZnPgs= +</value> + </data> </root> \ No newline at end of file diff --git a/WinFrmUI/PBS.WinFrmUI/PBS.WinFrmUI.csproj b/WinFrmUI/PBS.WinFrmUI/PBS.WinFrmUI.csproj index 7319418..89127b6 100644 --- a/WinFrmUI/PBS.WinFrmUI/PBS.WinFrmUI.csproj +++ b/WinFrmUI/PBS.WinFrmUI/PBS.WinFrmUI.csproj @@ -44,6 +44,9 @@ </ItemGroup> <ItemGroup> + <Compile Update="02-facility\AddPlaceDlg.cs"> + <SubType>Form</SubType> + </Compile> <Compile Update="02-facility\FacilityMgrPage.cs"> <SubType>UserControl</SubType> </Compile> @@ -62,7 +65,9 @@ </ItemGroup> <ItemGroup> + <ProjectReference Include="..\..\BLL\HStation.BLL.Assets.Core\HStation.BLL.Assets.Core.csproj" /> <ProjectReference Include="..\..\BLL\PBS.BLL\PBS.BLL.csproj" /> + <ProjectReference Include="..\..\BLL\Yw.BLL.Division.Core\Yw.BLL.Division.Core.csproj" /> <ProjectReference Include="..\PBS.WinFrmUI.WE\PBS.WinFrmUI.WE.csproj" /> <ProjectReference Include="..\Yw.WinFrmUI.Core\Yw.WinFrmUI.Core.csproj" /> </ItemGroup> diff --git a/WinFrmUI/PBS.WinFrmUI/PBS.WinFrmUI.csproj.user b/WinFrmUI/PBS.WinFrmUI/PBS.WinFrmUI.csproj.user index e699386..ecdea04 100644 --- a/WinFrmUI/PBS.WinFrmUI/PBS.WinFrmUI.csproj.user +++ b/WinFrmUI/PBS.WinFrmUI/PBS.WinFrmUI.csproj.user @@ -20,5 +20,11 @@ <Compile Update="01-place\PlaceMgrPage.cs"> <SubType>UserControl</SubType> </Compile> + <Compile Update="02-facility\00-core\FacilitiesCtrl.cs"> + <SubType>UserControl</SubType> + </Compile> + <Compile Update="XtraUserControl1.cs"> + <SubType>UserControl</SubType> + </Compile> </ItemGroup> </Project> \ No newline at end of file diff --git a/WinFrmUI/PBS.WinFrmUI/Properties/DataSources/PBS.WinFrmUI.FacilityViewModel.datasource b/WinFrmUI/PBS.WinFrmUI/Properties/DataSources/PBS.WinFrmUI.FacilityViewModel.datasource new file mode 100644 index 0000000..b023f97 --- /dev/null +++ b/WinFrmUI/PBS.WinFrmUI/Properties/DataSources/PBS.WinFrmUI.FacilityViewModel.datasource @@ -0,0 +1,10 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<!-- + This file is automatically generated by Visual Studio. It is + used to store generic object data source configuration information. + Renaming the file extension or editing the content of this file may + cause the file to be unrecognizable by the program. +--> +<GenericObjectDataSource DisplayName="FacilityViewModel" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource"> + <TypeInfo>PBS.WinFrmUI.FacilityViewModel, PBS.WinFrmUI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo> +</GenericObjectDataSource> \ No newline at end of file diff --git a/WinFrmUI/Yw.WinFrmUI.Division.Core/01-division/AddDivisonDlg.cs b/WinFrmUI/Yw.WinFrmUI.Division.Core/01-division/AddDivisonDlg.cs index 7e17799..7b47645 100644 --- a/WinFrmUI/Yw.WinFrmUI.Division.Core/01-division/AddDivisonDlg.cs +++ b/WinFrmUI/Yw.WinFrmUI.Division.Core/01-division/AddDivisonDlg.cs @@ -2,6 +2,8 @@ { public partial class AddDivisonDlg : DevExpress.XtraEditors.XtraForm { + private Yw.Vmo.DivisionVmo _model = null; + public AddDivisonDlg() { InitializeComponent(); @@ -18,12 +20,10 @@ /// </summary> public event Func<string, bool> VerifyTagNameExistEvent; - private Yw.Vmo.DivisionVmo _model = null; - /// <summary> /// 缁戝畾 /// </summary> - public async void SetBindingData() + public async void SetBindingData(long id) { var list = new List<DivisionViewModel>(); _model = new Yw.Vmo.DivisionVmo(); @@ -37,8 +37,36 @@ list.Add(new DivisionViewModel(item)); } } - treeListLookUpEdit1TreeList.DataSource = list; + if (id > 0) + { + this.textEditParents.EditValue = id; + // this.treeListLookUpEdit1TreeList.EditingValue = id; + } + } + + //纭畾 + private async void btnOk_Click(object sender, EventArgs e) + { + if (_model == null) + return; + if (!Valid()) + return; + _model.Name = this.NameTextEdit.Text.Trim(); + _model.Type = (Yw.Model.eDivisionType)this.TypeImageComboBoxEdit.EditValue; + _model.ADCode = this.ADCodeTextEdit.Text.Trim(); + _model.Description = this.DescriptionTextEdit.Text.Trim(); + _model.TagName = this.TagNameTextEdit.Text.Trim(); + if (this.ReloadDataEvent == null) + return; + if (!await this.ReloadDataEvent(_model, this.textEditParents.EditValue)) + { + MessageBoxHelper.ShowError("娣诲姞澶辫触锛�"); + return; + } + MessageBoxHelper.ShowSuccess("娣诲姞鎴愬姛锛�"); + this.DialogResult = System.Windows.Forms.DialogResult.OK; + this.Close(); } //楠岃瘉 @@ -65,30 +93,6 @@ } return true; - } - - //纭畾 - private async void btnOk_Click(object sender, EventArgs e) - { - if (_model == null) - return; - if (!Valid()) - return; - _model.Name = this.NameTextEdit.Text.Trim(); - _model.Type = (Yw.Model.eDivisionType)this.TypeImageComboBoxEdit.EditValue; - _model.ADCode = this.ADCodeTextEdit.Text.Trim(); - _model.Description = this.DescriptionTextEdit.Text.Trim(); - _model.TagName = this.TagNameTextEdit.Text.Trim(); - if (this.ReloadDataEvent == null) - return; - if (!await this.ReloadDataEvent(_model, this.textEditParents.EditValue)) - { - MessageBoxHelper.ShowError("娣诲姞澶辫触锛�"); - return; - } - MessageBoxHelper.ShowSuccess("娣诲姞鎴愬姛锛�"); - this.DialogResult = System.Windows.Forms.DialogResult.OK; - this.Close(); } } } \ No newline at end of file diff --git a/WinFrmUI/Yw.WinFrmUI.Division.Core/01-division/AddDivisonDlg.designer.cs b/WinFrmUI/Yw.WinFrmUI.Division.Core/01-division/AddDivisonDlg.designer.cs index b8dd1bb..85b14bf 100644 --- a/WinFrmUI/Yw.WinFrmUI.Division.Core/01-division/AddDivisonDlg.designer.cs +++ b/WinFrmUI/Yw.WinFrmUI.Division.Core/01-division/AddDivisonDlg.designer.cs @@ -39,7 +39,7 @@ ADCodeTextEdit = new DevExpress.XtraEditors.TextEdit(); textEditParents = new DevExpress.XtraEditors.TreeListLookUpEdit(); treeListLookUpEdit1TreeList = new DevExpress.XtraTreeList.TreeList(); - treeListColumn1 = new DevExpress.XtraTreeList.Columns.TreeListColumn(); + 鍚嶇О = new DevExpress.XtraTreeList.Columns.TreeListColumn(); Root = new DevExpress.XtraLayout.LayoutControlGroup(); layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup(); ItemForName = new DevExpress.XtraLayout.LayoutControlItem(); @@ -87,10 +87,11 @@ dataLayoutControl1.Controls.Add(textEditParents); 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(542, 345); + dataLayoutControl1.Size = new Size(619, 444); dataLayoutControl1.TabIndex = 0; dataLayoutControl1.Text = "dataLayoutControl1"; // @@ -98,9 +99,10 @@ // btnOk.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Primary; btnOk.Appearance.Options.UseBackColor = true; - btnOk.Location = new Point(309, 311); + btnOk.Location = new Point(353, 405); + btnOk.Margin = new Padding(3, 4, 3, 4); btnOk.Name = "btnOk"; - btnOk.Size = new Size(106, 22); + btnOk.Size = new Size(122, 27); btnOk.StyleController = dataLayoutControl1; btnOk.TabIndex = 6; btnOk.Text = "纭畾"; @@ -111,59 +113,64 @@ btnCancel.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Warning; btnCancel.Appearance.Options.UseBackColor = true; btnCancel.DialogResult = DialogResult.Cancel; - btnCancel.Location = new Point(419, 311); + btnCancel.Location = new Point(479, 405); + btnCancel.Margin = new Padding(3, 4, 3, 4); btnCancel.Name = "btnCancel"; - btnCancel.Size = new Size(111, 22); + btnCancel.Size = new Size(128, 27); btnCancel.StyleController = dataLayoutControl1; btnCancel.TabIndex = 7; btnCancel.Text = "鍙栨秷"; // // NameTextEdit // - NameTextEdit.Location = new Point(99, 12); + NameTextEdit.Location = new Point(117, 12); + NameTextEdit.Margin = new Padding(3, 4, 3, 4); NameTextEdit.Name = "NameTextEdit"; - NameTextEdit.Size = new Size(431, 20); + NameTextEdit.Size = new Size(490, 24); NameTextEdit.StyleController = dataLayoutControl1; NameTextEdit.TabIndex = 0; // // DescriptionTextEdit // - DescriptionTextEdit.Location = new Point(99, 132); + DescriptionTextEdit.Location = new Point(117, 152); + DescriptionTextEdit.Margin = new Padding(3, 4, 3, 4); DescriptionTextEdit.Name = "DescriptionTextEdit"; - DescriptionTextEdit.Size = new Size(431, 175); + DescriptionTextEdit.Size = new Size(490, 249); DescriptionTextEdit.StyleController = dataLayoutControl1; DescriptionTextEdit.TabIndex = 5; // // TagNameTextEdit // - TagNameTextEdit.Location = new Point(99, 84); + TagNameTextEdit.Location = new Point(117, 96); + TagNameTextEdit.Margin = new Padding(3, 4, 3, 4); TagNameTextEdit.Name = "TagNameTextEdit"; - TagNameTextEdit.Size = new Size(431, 20); + TagNameTextEdit.Size = new Size(490, 24); TagNameTextEdit.StyleController = dataLayoutControl1; TagNameTextEdit.TabIndex = 4; // // TypeImageComboBoxEdit // - TypeImageComboBoxEdit.Location = new Point(99, 36); - TypeImageComboBoxEdit.Margin = new Padding(2); + TypeImageComboBoxEdit.Location = new Point(117, 40); + TypeImageComboBoxEdit.Margin = new Padding(2, 3, 2, 3); TypeImageComboBoxEdit.Name = "TypeImageComboBoxEdit"; TypeImageComboBoxEdit.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); - TypeImageComboBoxEdit.Size = new Size(431, 20); + TypeImageComboBoxEdit.Size = new Size(490, 24); TypeImageComboBoxEdit.StyleController = dataLayoutControl1; TypeImageComboBoxEdit.TabIndex = 2; // // ADCodeTextEdit // - ADCodeTextEdit.Location = new Point(99, 60); - ADCodeTextEdit.Margin = new Padding(2); + ADCodeTextEdit.Location = new Point(117, 68); + ADCodeTextEdit.Margin = new Padding(2, 3, 2, 3); ADCodeTextEdit.Name = "ADCodeTextEdit"; - ADCodeTextEdit.Size = new Size(431, 20); + ADCodeTextEdit.Size = new Size(490, 24); ADCodeTextEdit.StyleController = dataLayoutControl1; ADCodeTextEdit.TabIndex = 3; // // textEditParents // - textEditParents.Location = new Point(99, 108); + textEditParents.Location = new Point(117, 124); + textEditParents.Margin = new Padding(3, 4, 3, 4); textEditParents.Name = "textEditParents"; textEditParents.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); textEditParents.Properties.DisplayMember = "Name"; @@ -171,26 +178,30 @@ textEditParents.Properties.PopupSizeable = false; textEditParents.Properties.TreeList = treeListLookUpEdit1TreeList; textEditParents.Properties.ValueMember = "ID"; - textEditParents.Size = new Size(431, 20); + textEditParents.Size = new Size(490, 24); textEditParents.StyleController = dataLayoutControl1; textEditParents.TabIndex = 8; // // treeListLookUpEdit1TreeList // - treeListLookUpEdit1TreeList.Columns.AddRange(new DevExpress.XtraTreeList.Columns.TreeListColumn[] { treeListColumn1 }); + treeListLookUpEdit1TreeList.Columns.AddRange(new DevExpress.XtraTreeList.Columns.TreeListColumn[] { 鍚嶇О }); treeListLookUpEdit1TreeList.Location = new Point(0, 0); + treeListLookUpEdit1TreeList.MinWidth = 23; treeListLookUpEdit1TreeList.Name = "treeListLookUpEdit1TreeList"; treeListLookUpEdit1TreeList.OptionsView.ShowIndentAsRowStyle = true; treeListLookUpEdit1TreeList.Size = new Size(400, 200); treeListLookUpEdit1TreeList.TabIndex = 0; + treeListLookUpEdit1TreeList.TreeLevelWidth = 21; // - // treeListColumn1 + // 鍚嶇О // - treeListColumn1.Caption = "treeListColumn1"; - treeListColumn1.FieldName = "Name"; - treeListColumn1.Name = "treeListColumn1"; - treeListColumn1.Visible = true; - treeListColumn1.VisibleIndex = 0; + 鍚嶇О.Caption = "鍚嶇О"; + 鍚嶇О.FieldName = "Name"; + 鍚嶇О.MinWidth = 23; + 鍚嶇О.Name = "鍚嶇О"; + 鍚嶇О.Visible = true; + 鍚嶇О.VisibleIndex = 0; + 鍚嶇О.Width = 86; // // Root // @@ -200,7 +211,7 @@ Root.GroupBordersVisible = false; Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlGroup1 }); Root.Name = "Root"; - Root.Size = new Size(542, 345); + Root.Size = new Size(619, 444); Root.TextVisible = false; // // layoutControlGroup1 @@ -210,7 +221,7 @@ layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { ItemForName, ItemForDescription, layoutControlItem1, layoutControlItem2, emptySpaceItem1, ItemForTagName, layoutControlItem4, layoutControlItem5, layoutControlItem3 }); layoutControlGroup1.Location = new Point(0, 0); layoutControlGroup1.Name = "autoGeneratedGroup0"; - layoutControlGroup1.Size = new Size(522, 325); + layoutControlGroup1.Size = new Size(599, 424); // // ItemForName // @@ -218,43 +229,43 @@ ItemForName.Control = NameTextEdit; ItemForName.Location = new Point(0, 0); ItemForName.Name = "ItemForName"; - ItemForName.Size = new Size(522, 24); + ItemForName.Size = new Size(599, 28); ItemForName.Text = "<color=red>*</color>鍚嶇О:"; - ItemForName.TextSize = new Size(75, 14); + ItemForName.TextSize = new Size(93, 18); // // ItemForDescription // ItemForDescription.Control = DescriptionTextEdit; - ItemForDescription.Location = new Point(0, 120); + ItemForDescription.Location = new Point(0, 140); ItemForDescription.Name = "ItemForDescription"; - ItemForDescription.Size = new Size(522, 179); + ItemForDescription.Size = new Size(599, 253); ItemForDescription.Text = "璇存槑:"; - ItemForDescription.TextSize = new Size(75, 14); + ItemForDescription.TextSize = new Size(93, 18); // // layoutControlItem1 // layoutControlItem1.Control = btnCancel; - layoutControlItem1.Location = new Point(407, 299); + layoutControlItem1.Location = new Point(467, 393); layoutControlItem1.Name = "layoutControlItem1"; - layoutControlItem1.Size = new Size(115, 26); + layoutControlItem1.Size = new Size(132, 31); layoutControlItem1.TextSize = new Size(0, 0); layoutControlItem1.TextVisible = false; // // layoutControlItem2 // layoutControlItem2.Control = btnOk; - layoutControlItem2.Location = new Point(297, 299); + layoutControlItem2.Location = new Point(341, 393); layoutControlItem2.Name = "layoutControlItem2"; - layoutControlItem2.Size = new Size(110, 26); + layoutControlItem2.Size = new Size(126, 31); layoutControlItem2.TextSize = new Size(0, 0); layoutControlItem2.TextVisible = false; // // emptySpaceItem1 // emptySpaceItem1.AllowHotTrack = false; - emptySpaceItem1.Location = new Point(0, 299); + emptySpaceItem1.Location = new Point(0, 393); emptySpaceItem1.Name = "emptySpaceItem1"; - emptySpaceItem1.Size = new Size(297, 26); + emptySpaceItem1.Size = new Size(341, 31); emptySpaceItem1.TextSize = new Size(0, 0); // // ItemForTagName @@ -262,38 +273,38 @@ ItemForTagName.AppearanceItemCaption.Options.UseTextOptions = true; ItemForTagName.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; ItemForTagName.Control = TagNameTextEdit; - ItemForTagName.Location = new Point(0, 72); + ItemForTagName.Location = new Point(0, 84); ItemForTagName.Name = "ItemForTagName"; - ItemForTagName.Size = new Size(522, 24); + ItemForTagName.Size = new Size(599, 28); ItemForTagName.Text = "鏍囩鍚嶇О:"; - ItemForTagName.TextSize = new Size(75, 14); + ItemForTagName.TextSize = new Size(93, 18); // // layoutControlItem4 // layoutControlItem4.Control = TypeImageComboBoxEdit; - layoutControlItem4.Location = new Point(0, 24); + layoutControlItem4.Location = new Point(0, 28); layoutControlItem4.Name = "layoutControlItem4"; - layoutControlItem4.Size = new Size(522, 24); + layoutControlItem4.Size = new Size(599, 28); layoutControlItem4.Text = "绫诲瀷:"; - layoutControlItem4.TextSize = new Size(75, 14); + layoutControlItem4.TextSize = new Size(93, 18); // // layoutControlItem5 // layoutControlItem5.Control = ADCodeTextEdit; - layoutControlItem5.Location = new Point(0, 48); + layoutControlItem5.Location = new Point(0, 56); layoutControlItem5.Name = "layoutControlItem5"; - layoutControlItem5.Size = new Size(522, 24); + layoutControlItem5.Size = new Size(599, 28); layoutControlItem5.Text = "鍩庡競缂栫爜(ad):"; - layoutControlItem5.TextSize = new Size(75, 14); + layoutControlItem5.TextSize = new Size(93, 18); // // layoutControlItem3 // layoutControlItem3.Control = textEditParents; - layoutControlItem3.Location = new Point(0, 96); + layoutControlItem3.Location = new Point(0, 112); layoutControlItem3.Name = "layoutControlItem3"; - layoutControlItem3.Size = new Size(522, 24); + layoutControlItem3.Size = new Size(599, 28); layoutControlItem3.Text = "鐖剁骇:"; - layoutControlItem3.TextSize = new Size(75, 14); + layoutControlItem3.TextSize = new Size(93, 18); // // dxErrorProvider1 // @@ -301,10 +312,11 @@ // // AddDivisonDlg // - AutoScaleDimensions = new SizeF(7F, 14F); + AutoScaleDimensions = new SizeF(8F, 18F); AutoScaleMode = AutoScaleMode.Font; - ClientSize = new Size(542, 345); + ClientSize = new Size(619, 444); Controls.Add(dataLayoutControl1); + Margin = new Padding(3, 4, 3, 4); Name = "AddDivisonDlg"; StartPosition = FormStartPosition.CenterParent; Text = "娣诲姞"; @@ -356,6 +368,6 @@ private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; private DevExpress.XtraEditors.TreeListLookUpEdit textEditParents; private DevExpress.XtraTreeList.TreeList treeListLookUpEdit1TreeList; - private DevExpress.XtraTreeList.Columns.TreeListColumn treeListColumn1; + private DevExpress.XtraTreeList.Columns.TreeListColumn 鍚嶇О; } } \ No newline at end of file diff --git a/WinFrmUI/Yw.WinFrmUI.Division.Core/01-division/DivisionMainPage.cs b/WinFrmUI/Yw.WinFrmUI.Division.Core/01-division/DivisionMainPage.cs index 8d165e4..36c9116 100644 --- a/WinFrmUI/Yw.WinFrmUI.Division.Core/01-division/DivisionMainPage.cs +++ b/WinFrmUI/Yw.WinFrmUI.Division.Core/01-division/DivisionMainPage.cs @@ -39,6 +39,7 @@ } this.divisionViewModelBindingSource.DataSource = _allBindingList; this.treeList1.Refresh(); + this.treeList1.ExpandAll(); } #region 浜嬩欢 @@ -48,10 +49,9 @@ /// </summary> private void barBtnAdd_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { - if (_allBindingList == null) - return; + var vm = this.treeList1.GetCurrentViewModel(_allBindingList); var dlg = new AddDivisonDlg(); - dlg.SetBindingData(); + dlg.SetBindingData(vm != null ? vm.ID : default); dlg.ReloadDataEvent += async (rhs, parentId) => { rhs.SortCode = _allBindingList.Count == 0 ? 1 : _allBindingList.Max(x => x.SortCode) + 1; @@ -84,8 +84,7 @@ MessageBoxHelper.ShowWarning("璇烽�夋嫨鏁版嵁琛岋紒"); return; } - - var dlg = new EditDivisionDlg(); + var dlg = new EditDivisionDlg(); var model = await _bll.GetByID(vm.ID); if (model == null) { @@ -105,7 +104,7 @@ if (bol) { vm.Reset(rhs); - this.treeList1.Refresh(); + this.divisionViewModelBindingSource.ResetBindings(false); } return bol; }; diff --git a/WinFrmUI/Yw.WinFrmUI.Division.Core/01-division/EditDivisionDlg.cs b/WinFrmUI/Yw.WinFrmUI.Division.Core/01-division/EditDivisionDlg.cs index 3579a4a..830f2be 100644 --- a/WinFrmUI/Yw.WinFrmUI.Division.Core/01-division/EditDivisionDlg.cs +++ b/WinFrmUI/Yw.WinFrmUI.Division.Core/01-division/EditDivisionDlg.cs @@ -1,4 +1,6 @@ -锘縩amespace Yw.WinFrmUI +锘縰sing DevExpress.Utils.Extensions; + +namespace Yw.WinFrmUI { public partial class EditDivisionDlg : DevExpress.XtraEditors.XtraForm { @@ -41,7 +43,13 @@ list.Add(new DivisionViewModel(item)); } } + + list.Remove(list.Find(x => x.ID == _model.ID)); treeListLookUpEdit1TreeList.DataSource = list; + if (_model.ParentIds != null && _model.ParentIds.Count > 0) + { + this.textEditParents.EditValue = _model.ParentIds.Last(); + } } //楠岃瘉 diff --git a/WinFrmUI/Yw.WinFrmUI.Division.Core/01-division/EditDivisionDlg.designer.cs b/WinFrmUI/Yw.WinFrmUI.Division.Core/01-division/EditDivisionDlg.designer.cs index af71ba6..37d1164 100644 --- a/WinFrmUI/Yw.WinFrmUI.Division.Core/01-division/EditDivisionDlg.designer.cs +++ b/WinFrmUI/Yw.WinFrmUI.Division.Core/01-division/EditDivisionDlg.designer.cs @@ -38,6 +38,7 @@ dataLayoutControl1 = new DevExpress.XtraDataLayout.DataLayoutControl(); textEditParents = new TreeListLookUpEdit(); treeListLookUpEdit1TreeList = new DevExpress.XtraTreeList.TreeList(); + treeListColumn1 = new DevExpress.XtraTreeList.Columns.TreeListColumn(); btnOk = new SimpleButton(); btnCancel = new SimpleButton(); NameTextEdit = new TextEdit(); @@ -57,7 +58,6 @@ layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); dxErrorProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(components); - treeListColumn1 = new DevExpress.XtraTreeList.Columns.TreeListColumn(); ((ISupportInitialize)dataLayoutControl1).BeginInit(); dataLayoutControl1.SuspendLayout(); ((ISupportInitialize)textEditParents.Properties).BeginInit(); @@ -93,16 +93,18 @@ dataLayoutControl1.Controls.Add(ADCodeTextEdit); 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(530, 342); + dataLayoutControl1.Size = new Size(606, 440); dataLayoutControl1.TabIndex = 0; dataLayoutControl1.Text = "dataLayoutControl1"; // // textEditParents // - textEditParents.Location = new Point(99, 108); + textEditParents.Location = new Point(120, 136); + textEditParents.Margin = new Padding(3, 4, 3, 4); textEditParents.Name = "textEditParents"; textEditParents.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); textEditParents.Properties.DisplayMember = "Name"; @@ -110,7 +112,7 @@ textEditParents.Properties.PopupSizeable = false; textEditParents.Properties.TreeList = treeListLookUpEdit1TreeList; textEditParents.Properties.ValueMember = "ID"; - textEditParents.Size = new Size(419, 20); + textEditParents.Size = new Size(473, 24); textEditParents.StyleController = dataLayoutControl1; textEditParents.TabIndex = 9; // @@ -118,18 +120,31 @@ // treeListLookUpEdit1TreeList.Columns.AddRange(new DevExpress.XtraTreeList.Columns.TreeListColumn[] { treeListColumn1 }); treeListLookUpEdit1TreeList.Location = new Point(0, 71); + treeListLookUpEdit1TreeList.MinWidth = 23; treeListLookUpEdit1TreeList.Name = "treeListLookUpEdit1TreeList"; treeListLookUpEdit1TreeList.OptionsView.ShowIndentAsRowStyle = true; treeListLookUpEdit1TreeList.Size = new Size(400, 200); treeListLookUpEdit1TreeList.TabIndex = 0; + treeListLookUpEdit1TreeList.TreeLevelWidth = 21; + // + // treeListColumn1 + // + treeListColumn1.Caption = "鍚嶇О"; + treeListColumn1.FieldName = "Name"; + treeListColumn1.MinWidth = 23; + treeListColumn1.Name = "treeListColumn1"; + treeListColumn1.Visible = true; + treeListColumn1.VisibleIndex = 0; + treeListColumn1.Width = 86; // // btnOk // btnOk.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Primary; btnOk.Appearance.Options.UseBackColor = true; - btnOk.Location = new Point(303, 308); + btnOk.Location = new Point(346, 397); + btnOk.Margin = new Padding(3, 4, 3, 4); btnOk.Name = "btnOk"; - btnOk.Size = new Size(105, 22); + btnOk.Size = new Size(121, 27); btnOk.StyleController = dataLayoutControl1; btnOk.TabIndex = 7; btnOk.Text = "纭畾"; @@ -140,53 +155,57 @@ btnCancel.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Warning; btnCancel.Appearance.Options.UseBackColor = true; btnCancel.DialogResult = DialogResult.Cancel; - btnCancel.Location = new Point(412, 308); + btnCancel.Location = new Point(471, 397); + btnCancel.Margin = new Padding(3, 4, 3, 4); btnCancel.Name = "btnCancel"; - btnCancel.Size = new Size(106, 22); + btnCancel.Size = new Size(122, 27); btnCancel.StyleController = dataLayoutControl1; btnCancel.TabIndex = 8; btnCancel.Text = "鍙栨秷"; // // NameTextEdit // - NameTextEdit.Location = new Point(99, 12); + NameTextEdit.Location = new Point(120, 16); + NameTextEdit.Margin = new Padding(3, 4, 3, 4); NameTextEdit.Name = "NameTextEdit"; - NameTextEdit.Size = new Size(419, 20); + NameTextEdit.Size = new Size(473, 24); NameTextEdit.StyleController = dataLayoutControl1; NameTextEdit.TabIndex = 0; // // DescriptionTextEdit // - DescriptionTextEdit.Location = new Point(99, 132); + DescriptionTextEdit.Location = new Point(120, 166); + DescriptionTextEdit.Margin = new Padding(3, 4, 3, 4); DescriptionTextEdit.Name = "DescriptionTextEdit"; - DescriptionTextEdit.Size = new Size(419, 172); + DescriptionTextEdit.Size = new Size(473, 225); DescriptionTextEdit.StyleController = dataLayoutControl1; DescriptionTextEdit.TabIndex = 6; // // TagNameTextEdit // - TagNameTextEdit.Location = new Point(99, 84); + TagNameTextEdit.Location = new Point(120, 106); + TagNameTextEdit.Margin = new Padding(3, 4, 3, 4); TagNameTextEdit.Name = "TagNameTextEdit"; - TagNameTextEdit.Size = new Size(419, 20); + TagNameTextEdit.Size = new Size(473, 24); TagNameTextEdit.StyleController = dataLayoutControl1; TagNameTextEdit.TabIndex = 4; // // TypeImageComboBoxEdit // - TypeImageComboBoxEdit.Location = new Point(99, 36); - TypeImageComboBoxEdit.Margin = new Padding(2); + TypeImageComboBoxEdit.Location = new Point(120, 46); + TypeImageComboBoxEdit.Margin = new Padding(2, 3, 2, 3); TypeImageComboBoxEdit.Name = "TypeImageComboBoxEdit"; TypeImageComboBoxEdit.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); - TypeImageComboBoxEdit.Size = new Size(419, 20); + TypeImageComboBoxEdit.Size = new Size(473, 24); TypeImageComboBoxEdit.StyleController = dataLayoutControl1; TypeImageComboBoxEdit.TabIndex = 10; // // ADCodeTextEdit // - ADCodeTextEdit.Location = new Point(99, 60); - ADCodeTextEdit.Margin = new Padding(2); + ADCodeTextEdit.Location = new Point(120, 76); + ADCodeTextEdit.Margin = new Padding(2, 3, 2, 3); ADCodeTextEdit.Name = "ADCodeTextEdit"; - ADCodeTextEdit.Size = new Size(419, 20); + ADCodeTextEdit.Size = new Size(473, 24); ADCodeTextEdit.StyleController = dataLayoutControl1; ADCodeTextEdit.TabIndex = 11; // @@ -198,7 +217,7 @@ Root.GroupBordersVisible = false; Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlGroup1 }); Root.Name = "Root"; - Root.Size = new Size(530, 342); + Root.Size = new Size(606, 440); Root.TextVisible = false; // // layoutControlGroup1 @@ -208,7 +227,7 @@ layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { ItemForName, ItemForDescription, layoutControlItem1, layoutControlItem2, emptySpaceItem1, ItemForTagName, layoutControlItem4, layoutControlItem5, layoutControlItem3 }); layoutControlGroup1.Location = new Point(0, 0); layoutControlGroup1.Name = "autoGeneratedGroup0"; - layoutControlGroup1.Size = new Size(510, 322); + layoutControlGroup1.Size = new Size(584, 414); // // ItemForName // @@ -216,43 +235,43 @@ ItemForName.Control = NameTextEdit; ItemForName.Location = new Point(0, 0); ItemForName.Name = "ItemForName"; - ItemForName.Size = new Size(510, 24); + ItemForName.Size = new Size(584, 30); ItemForName.Text = "<color=red>*</color>鍚嶇О:"; - ItemForName.TextSize = new Size(75, 14); + ItemForName.TextSize = new Size(93, 18); // // ItemForDescription // ItemForDescription.Control = DescriptionTextEdit; - ItemForDescription.Location = new Point(0, 120); + ItemForDescription.Location = new Point(0, 150); ItemForDescription.Name = "ItemForDescription"; - ItemForDescription.Size = new Size(510, 176); + ItemForDescription.Size = new Size(584, 231); ItemForDescription.Text = "璇存槑:"; - ItemForDescription.TextSize = new Size(75, 14); + ItemForDescription.TextSize = new Size(93, 18); // // layoutControlItem1 // layoutControlItem1.Control = btnCancel; - layoutControlItem1.Location = new Point(400, 296); + layoutControlItem1.Location = new Point(458, 381); layoutControlItem1.Name = "layoutControlItem1"; - layoutControlItem1.Size = new Size(110, 26); + layoutControlItem1.Size = new Size(126, 33); layoutControlItem1.TextSize = new Size(0, 0); layoutControlItem1.TextVisible = false; // // layoutControlItem2 // layoutControlItem2.Control = btnOk; - layoutControlItem2.Location = new Point(291, 296); + layoutControlItem2.Location = new Point(333, 381); layoutControlItem2.Name = "layoutControlItem2"; - layoutControlItem2.Size = new Size(109, 26); + layoutControlItem2.Size = new Size(125, 33); layoutControlItem2.TextSize = new Size(0, 0); layoutControlItem2.TextVisible = false; // // emptySpaceItem1 // emptySpaceItem1.AllowHotTrack = false; - emptySpaceItem1.Location = new Point(0, 296); + emptySpaceItem1.Location = new Point(0, 381); emptySpaceItem1.Name = "emptySpaceItem1"; - emptySpaceItem1.Size = new Size(291, 26); + emptySpaceItem1.Size = new Size(333, 33); emptySpaceItem1.TextSize = new Size(0, 0); // // ItemForTagName @@ -260,61 +279,54 @@ ItemForTagName.AppearanceItemCaption.Options.UseTextOptions = true; ItemForTagName.AppearanceItemCaption.TextOptions.HAlignment = HorzAlignment.Far; ItemForTagName.Control = TagNameTextEdit; - ItemForTagName.Location = new Point(0, 72); + ItemForTagName.Location = new Point(0, 90); ItemForTagName.Name = "ItemForTagName"; - ItemForTagName.Size = new Size(510, 24); + ItemForTagName.Size = new Size(584, 30); ItemForTagName.Text = "鏍囩鍚嶇О:"; - ItemForTagName.TextSize = new Size(75, 14); + ItemForTagName.TextSize = new Size(93, 18); // // layoutControlItem4 // layoutControlItem4.Control = TypeImageComboBoxEdit; layoutControlItem4.ControlAlignment = ContentAlignment.TopLeft; layoutControlItem4.CustomizationFormText = "绫诲瀷:"; - layoutControlItem4.Location = new Point(0, 24); + layoutControlItem4.Location = new Point(0, 30); layoutControlItem4.Name = "layoutControlItem4"; - layoutControlItem4.Size = new Size(510, 24); + layoutControlItem4.Size = new Size(584, 30); layoutControlItem4.Text = "绫诲瀷:"; - layoutControlItem4.TextSize = new Size(75, 14); + layoutControlItem4.TextSize = new Size(93, 18); // // layoutControlItem5 // layoutControlItem5.Control = ADCodeTextEdit; layoutControlItem5.ControlAlignment = ContentAlignment.TopLeft; layoutControlItem5.CustomizationFormText = "鍩庡競缂栫爜(ad):"; - layoutControlItem5.Location = new Point(0, 48); + layoutControlItem5.Location = new Point(0, 60); layoutControlItem5.Name = "layoutControlItem5"; - layoutControlItem5.Size = new Size(510, 24); + layoutControlItem5.Size = new Size(584, 30); layoutControlItem5.Text = "鍩庡競缂栫爜(ad):"; - layoutControlItem5.TextSize = new Size(75, 14); + layoutControlItem5.TextSize = new Size(93, 18); // // layoutControlItem3 // layoutControlItem3.Control = textEditParents; - layoutControlItem3.Location = new Point(0, 96); + layoutControlItem3.Location = new Point(0, 120); layoutControlItem3.Name = "layoutControlItem3"; - layoutControlItem3.Size = new Size(510, 24); + layoutControlItem3.Size = new Size(584, 30); layoutControlItem3.Text = "鐖剁骇:"; - layoutControlItem3.TextSize = new Size(75, 14); + layoutControlItem3.TextSize = new Size(93, 18); // // dxErrorProvider1 // dxErrorProvider1.ContainerControl = this; // - // treeListColumn1 - // - treeListColumn1.Caption = "treeListColumn1"; - treeListColumn1.FieldName = "Name"; - treeListColumn1.Name = "treeListColumn1"; - treeListColumn1.Visible = true; - treeListColumn1.VisibleIndex = 0; - // // EditDivisionDlg // - AutoScaleDimensions = new SizeF(7F, 14F); + AutoScaleDimensions = new SizeF(8F, 18F); AutoScaleMode = AutoScaleMode.Font; - ClientSize = new Size(530, 342); + ClientSize = new Size(606, 440); Controls.Add(dataLayoutControl1); + Margin = new Padding(3, 4, 3, 4); Name = "EditDivisionDlg"; StartPosition = FormStartPosition.CenterParent; Text = "缂栬緫"; diff --git a/WinFrmUI/Yw.WinFrmUI.Division.Core/01-division/EditDivisionDlg.resx b/WinFrmUI/Yw.WinFrmUI.Division.Core/01-division/EditDivisionDlg.resx index d438392..43b467c 100644 --- a/WinFrmUI/Yw.WinFrmUI.Division.Core/01-division/EditDivisionDlg.resx +++ b/WinFrmUI/Yw.WinFrmUI.Division.Core/01-division/EditDivisionDlg.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 -- Gitblit v1.9.3