duheng
2024-07-17 88cf57f64ac1f846eaa62213db07a21f2532b5bb
剩余代码提交
已修改5个文件
已添加2个文件
289 ■■■■■ 文件已修改
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-ViewModel/XhsProject/XhsProjectPropertyGridViewModel.cs 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-HomePageMainPanel/HomePageMainPanel.Designer.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/00-ViewModel/PropGroupChoiceViewModel.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/AddPumpProductMainDlg.Designer.cs 228 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/AddPumpProductMainDlg.cs 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/AddPumpProductMainDlg.resx 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Project/Properties/DataSources/PropGroupChoiceViewModel.datasource 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-ViewModel/XhsProject/XhsProjectPropertyGridViewModel.cs
@@ -4,9 +4,9 @@
namespace HStation.WinFrmUI.Xhs.Core
{
    [TypeConverter(typeof(PropertySorter))]
    public class XhsProjectPropertyGridViewModel
    {
        [TypeConverter(typeof(PropertySorter))]
        public XhsProjectPropertyGridViewModel(XhsProjectDto rhs)
        {
            this.Address = rhs.Address;
@@ -22,7 +22,7 @@
        /// </summary>
        [DisplayName("名称")]
        [Category("基本信息")]
        [PropertyOrder(11)]
        [PropertyOrder(-9)]
        [Browsable(true)]
        public string Name { get; set; }
@@ -32,7 +32,7 @@
        [DisplayName("项目编号")]
        [Category("基本信息")]
        [Browsable(true)]
        [PropertyOrder(-9)]
        [PropertyOrder(-10)]
        public string ProjectNumber { get; set; }
        /// <summary>
@@ -49,7 +49,7 @@
        /// </summary>
        [DisplayName("创建人")]
        [Category("基本信息")]
        [PropertyOrder(-11)]
        [PropertyOrder(-8)]
        [Browsable(true)]
        public string CreateName { get; set; }
@@ -58,7 +58,7 @@
        /// </summary>
        [DisplayName("说明")]
        [Category("基本信息")]
        [PropertyOrder(-12)]
        [PropertyOrder(10)]
        [Browsable(true)]
        public string Description { get; set; }
@@ -67,7 +67,7 @@
        /// </summary>
        [DisplayName("地址")]
        [Category("基本信息")]
        [PropertyOrder(-13)]
        [PropertyOrder(11)]
        [Browsable(true)]
        public string Address { get; set; }
    }
WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-HomePageMainPanel/HomePageMainPanel.Designer.cs
@@ -89,6 +89,7 @@
            // 
            propertyGridControl1.Location = new Point(789, 2);
            propertyGridControl1.Name = "propertyGridControl1";
            propertyGridControl1.OptionsBehavior.Editable = false;
            propertyGridControl1.OptionsView.AllowReadOnlyRowAppearance = DevExpress.Utils.DefaultBoolean.True;
            propertyGridControl1.Size = new Size(166, 514);
            propertyGridControl1.TabIndex = 4;
@@ -130,14 +131,14 @@
            layoutControlItem3.TextSize = new Size(0, 0);
            layoutControlItem3.TextVisible = false;
            // 
            // MainPanel
            // HomePageMainPanel
            // 
            Appearance.BackColor = SystemColors.Control;
            Appearance.Options.UseBackColor = true;
            AutoScaleDimensions = new SizeF(7F, 14F);
            AutoScaleMode = AutoScaleMode.Font;
            Controls.Add(layoutControl1);
            Name = "MainPanel";
            Name = "HomePageMainPanel";
            Size = new Size(957, 518);
            ((System.ComponentModel.ISupportInitialize)layoutControl1).EndInit();
            layoutControl1.ResumeLayout(false);
WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/00-ViewModel/PropGroupChoiceViewModel.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,9 @@
namespace HStation.WinFrmUI.Xhs.PumpProduct
{
    public class PropGroupChoiceViewModel
    {
        public string PropGroupName { get; set; }
        public string PropName { get; set; }
        public string Value { get; set; }
    }
}
WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/AddPumpProductMainDlg.Designer.cs
@@ -30,6 +30,12 @@
        {
            components = new System.ComponentModel.Container();
            layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
            gridControl1 = new DevExpress.XtraGrid.GridControl();
            propGroupChoiceViewModelBindingSource = new BindingSource(components);
            gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView();
            colPropGroupName = new DevExpress.XtraGrid.Columns.GridColumn();
            colPropName = new DevExpress.XtraGrid.Columns.GridColumn();
            colValue = new DevExpress.XtraGrid.Columns.GridColumn();
            BtnOk = new DevExpress.XtraEditors.SimpleButton();
            simpleButton1 = new DevExpress.XtraEditors.SimpleButton();
            TextEditName = new DevExpress.XtraEditors.TextEdit();
@@ -58,15 +64,16 @@
            layoutControlItem12 = new DevExpress.XtraLayout.LayoutControlItem();
            layoutControlItem13 = new DevExpress.XtraLayout.LayoutControlItem();
            tabbedControlGroup1 = new DevExpress.XtraLayout.TabbedControlGroup();
            layoutControlGroup2 = new DevExpress.XtraLayout.LayoutControlGroup();
            layoutControlItem14 = new DevExpress.XtraLayout.LayoutControlItem();
            layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup();
            layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem();
            dxErrorProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(components);
            layoutControlGroup2 = new DevExpress.XtraLayout.LayoutControlGroup();
            gridControl1 = new DevExpress.XtraGrid.GridControl();
            gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView();
            layoutControlItem14 = new DevExpress.XtraLayout.LayoutControlItem();
            ((System.ComponentModel.ISupportInitialize)layoutControl1).BeginInit();
            layoutControl1.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)gridControl1).BeginInit();
            ((System.ComponentModel.ISupportInitialize)propGroupChoiceViewModelBindingSource).BeginInit();
            ((System.ComponentModel.ISupportInitialize)gridView1).BeginInit();
            ((System.ComponentModel.ISupportInitialize)TextEditName.Properties).BeginInit();
            ((System.ComponentModel.ISupportInitialize)DescriptionTextEdit.Properties).BeginInit();
            ((System.ComponentModel.ISupportInitialize)TextEditErosion.Properties).BeginInit();
@@ -93,13 +100,11 @@
            ((System.ComponentModel.ISupportInitialize)layoutControlItem12).BeginInit();
            ((System.ComponentModel.ISupportInitialize)layoutControlItem13).BeginInit();
            ((System.ComponentModel.ISupportInitialize)tabbedControlGroup1).BeginInit();
            ((System.ComponentModel.ISupportInitialize)layoutControlGroup2).BeginInit();
            ((System.ComponentModel.ISupportInitialize)layoutControlItem14).BeginInit();
            ((System.ComponentModel.ISupportInitialize)layoutControlGroup1).BeginInit();
            ((System.ComponentModel.ISupportInitialize)layoutControlItem5).BeginInit();
            ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).BeginInit();
            ((System.ComponentModel.ISupportInitialize)layoutControlGroup2).BeginInit();
            ((System.ComponentModel.ISupportInitialize)gridControl1).BeginInit();
            ((System.ComponentModel.ISupportInitialize)gridView1).BeginInit();
            ((System.ComponentModel.ISupportInitialize)layoutControlItem14).BeginInit();
            SuspendLayout();
            // 
            // layoutControl1
@@ -122,17 +127,72 @@
            layoutControl1.Location = new Point(0, 0);
            layoutControl1.Name = "layoutControl1";
            layoutControl1.Root = Root;
            layoutControl1.Size = new Size(587, 423);
            layoutControl1.Size = new Size(681, 482);
            layoutControl1.TabIndex = 0;
            layoutControl1.Text = "layoutControl1";
            //
            // gridControl1
            //
            gridControl1.DataSource = propGroupChoiceViewModelBindingSource;
            gridControl1.Location = new Point(20, 188);
            gridControl1.MainView = gridView1;
            gridControl1.Name = "gridControl1";
            gridControl1.Size = new Size(641, 248);
            gridControl1.TabIndex = 14;
            gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { gridView1 });
            //
            // propGroupChoiceViewModelBindingSource
            //
            propGroupChoiceViewModelBindingSource.DataSource = typeof(PropGroupChoiceViewModel);
            //
            // gridView1
            //
            gridView1.Appearance.HeaderPanel.Options.UseTextOptions = true;
            gridView1.Appearance.HeaderPanel.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
            gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { colPropGroupName, colPropName, colValue });
            gridView1.GridControl = gridControl1;
            gridView1.Name = "gridView1";
            gridView1.OptionsView.AllowCellMerge = true;
            gridView1.OptionsView.ShowGroupPanel = false;
            //
            // colPropGroupName
            //
            colPropGroupName.AppearanceCell.Options.UseTextOptions = true;
            colPropGroupName.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
            colPropGroupName.Caption = "属性组";
            colPropGroupName.FieldName = "PropGroupName";
            colPropGroupName.Name = "colPropGroupName";
            colPropGroupName.Visible = true;
            colPropGroupName.VisibleIndex = 0;
            //
            // colPropName
            //
            colPropName.AppearanceCell.Options.UseTextOptions = true;
            colPropName.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
            colPropName.Caption = "属性";
            colPropName.FieldName = "PropName";
            colPropName.Name = "colPropName";
            colPropName.Visible = true;
            colPropName.VisibleIndex = 1;
            //
            // colValue
            //
            colValue.AppearanceCell.Options.UseTextOptions = true;
            colValue.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
            colValue.Caption = "值";
            colValue.FieldName = "Value";
            colValue.Name = "colValue";
            colValue.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.False;
            colValue.Visible = true;
            colValue.VisibleIndex = 2;
            // 
            // BtnOk
            // 
            BtnOk.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Primary;
            BtnOk.Appearance.Options.UseBackColor = true;
            BtnOk.Location = new Point(367, 393);
            BtnOk.Location = new Point(426, 452);
            BtnOk.Name = "BtnOk";
            BtnOk.Size = new Size(99, 22);
            BtnOk.Size = new Size(122, 22);
            BtnOk.StyleController = layoutControl1;
            BtnOk.TabIndex = 12;
            BtnOk.Text = "完成";
@@ -143,9 +203,9 @@
            simpleButton1.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Danger;
            simpleButton1.Appearance.Options.UseBackColor = true;
            simpleButton1.DialogResult = DialogResult.Cancel;
            simpleButton1.Location = new Point(470, 393);
            simpleButton1.Location = new Point(552, 452);
            simpleButton1.Name = "simpleButton1";
            simpleButton1.Size = new Size(109, 22);
            simpleButton1.Size = new Size(121, 22);
            simpleButton1.StyleController = layoutControl1;
            simpleButton1.TabIndex = 13;
            simpleButton1.Text = "取消";
@@ -154,7 +214,7 @@
            // 
            TextEditName.Location = new Point(79, 8);
            TextEditName.Name = "TextEditName";
            TextEditName.Size = new Size(188, 20);
            TextEditName.Size = new Size(231, 20);
            TextEditName.StyleController = layoutControl1;
            TextEditName.TabIndex = 0;
            // 
@@ -162,39 +222,39 @@
            // 
            DescriptionTextEdit.Location = new Point(91, 188);
            DescriptionTextEdit.Name = "DescriptionTextEdit";
            DescriptionTextEdit.Size = new Size(476, 189);
            DescriptionTextEdit.Size = new Size(570, 248);
            DescriptionTextEdit.StyleController = layoutControl1;
            DescriptionTextEdit.TabIndex = 11;
            // 
            // TextEditErosion
            // 
            TextEditErosion.Location = new Point(342, 56);
            TextEditErosion.Location = new Point(385, 56);
            TextEditErosion.Name = "TextEditErosion";
            TextEditErosion.Size = new Size(237, 20);
            TextEditErosion.Size = new Size(288, 20);
            TextEditErosion.StyleController = layoutControl1;
            TextEditErosion.TabIndex = 6;
            // 
            // TextEditRatedPower
            // 
            TextEditRatedPower.Location = new Point(342, 32);
            TextEditRatedPower.Location = new Point(385, 32);
            TextEditRatedPower.Name = "TextEditRatedPower";
            TextEditRatedPower.Size = new Size(237, 20);
            TextEditRatedPower.Size = new Size(288, 20);
            TextEditRatedPower.StyleController = layoutControl1;
            TextEditRatedPower.TabIndex = 4;
            // 
            // TextEditRatedeffciency
            // 
            TextEditRatedeffciency.Location = new Point(342, 8);
            TextEditRatedeffciency.Location = new Point(385, 8);
            TextEditRatedeffciency.Name = "TextEditRatedeffciency";
            TextEditRatedeffciency.Size = new Size(237, 20);
            TextEditRatedeffciency.Size = new Size(288, 20);
            TextEditRatedeffciency.StyleController = layoutControl1;
            TextEditRatedeffciency.TabIndex = 2;
            // 
            // TextEditD2
            // 
            TextEditD2.Location = new Point(342, 80);
            TextEditD2.Location = new Point(385, 80);
            TextEditD2.Name = "TextEditD2";
            TextEditD2.Size = new Size(237, 20);
            TextEditD2.Size = new Size(288, 20);
            TextEditD2.StyleController = layoutControl1;
            TextEditD2.TabIndex = 8;
            // 
@@ -202,7 +262,7 @@
            // 
            TextEditTagName.Location = new Point(79, 128);
            TextEditTagName.Name = "TextEditTagName";
            TextEditTagName.Size = new Size(500, 20);
            TextEditTagName.Size = new Size(594, 20);
            TextEditTagName.StyleController = layoutControl1;
            TextEditTagName.TabIndex = 10;
            // 
@@ -210,7 +270,7 @@
            // 
            TextEditRatedHead.Location = new Point(79, 80);
            TextEditRatedHead.Name = "TextEditRatedHead";
            TextEditRatedHead.Size = new Size(188, 20);
            TextEditRatedHead.Size = new Size(231, 20);
            TextEditRatedHead.StyleController = layoutControl1;
            TextEditRatedHead.TabIndex = 7;
            // 
@@ -218,7 +278,7 @@
            // 
            TextEditRatedFlow.Location = new Point(79, 32);
            TextEditRatedFlow.Name = "TextEditRatedFlow";
            TextEditRatedFlow.Size = new Size(188, 20);
            TextEditRatedFlow.Size = new Size(231, 20);
            TextEditRatedFlow.StyleController = layoutControl1;
            TextEditRatedFlow.TabIndex = 3;
            // 
@@ -226,7 +286,7 @@
            // 
            TextEditRatedSpeed.Location = new Point(79, 56);
            TextEditRatedSpeed.Name = "TextEditRatedSpeed";
            TextEditRatedSpeed.Size = new Size(188, 20);
            TextEditRatedSpeed.Size = new Size(231, 20);
            TextEditRatedSpeed.StyleController = layoutControl1;
            TextEditRatedSpeed.TabIndex = 5;
            // 
@@ -235,7 +295,7 @@
            TextEditCatalogChoice.Location = new Point(79, 104);
            TextEditCatalogChoice.Name = "TextEditCatalogChoice";
            TextEditCatalogChoice.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) });
            TextEditCatalogChoice.Size = new Size(500, 20);
            TextEditCatalogChoice.Size = new Size(594, 20);
            TextEditCatalogChoice.StyleController = layoutControl1;
            TextEditCatalogChoice.TabIndex = 9;
            TextEditCatalogChoice.SelectedValueChanged += TextEditCatalogChoice_SelectedValueChanged;
@@ -249,7 +309,7 @@
            Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem1, layoutControlItem2, layoutControlItem3, layoutControlItem4, emptySpaceItem1, layoutControlItem8, layoutControlItem7, layoutControlItem6, layoutControlItem9, layoutControlItem10, layoutControlItem11, layoutControlItem12, layoutControlItem13, tabbedControlGroup1 });
            Root.Name = "Root";
            Root.Padding = new DevExpress.XtraLayout.Utils.Padding(6, 6, 6, 6);
            Root.Size = new Size(587, 423);
            Root.Size = new Size(681, 482);
            Root.TextVisible = false;
            // 
            // layoutControlItem1
@@ -258,7 +318,7 @@
            layoutControlItem1.Control = TextEditName;
            layoutControlItem1.Location = new Point(0, 0);
            layoutControlItem1.Name = "layoutControlItem1";
            layoutControlItem1.Size = new Size(263, 24);
            layoutControlItem1.Size = new Size(306, 24);
            layoutControlItem1.Text = "<color=red>*</color>名称:";
            layoutControlItem1.TextSize = new Size(59, 14);
            // 
@@ -268,7 +328,7 @@
            layoutControlItem2.Control = TextEditRatedSpeed;
            layoutControlItem2.Location = new Point(0, 48);
            layoutControlItem2.Name = "layoutControlItem2";
            layoutControlItem2.Size = new Size(263, 24);
            layoutControlItem2.Size = new Size(306, 24);
            layoutControlItem2.Text = "<color=red>*</color>额定转速:";
            layoutControlItem2.TextSize = new Size(59, 14);
            // 
@@ -278,33 +338,33 @@
            layoutControlItem3.Control = TextEditRatedFlow;
            layoutControlItem3.Location = new Point(0, 24);
            layoutControlItem3.Name = "layoutControlItem3";
            layoutControlItem3.Size = new Size(263, 24);
            layoutControlItem3.Size = new Size(306, 24);
            layoutControlItem3.Text = "<color=red>*</color>额定流量:";
            layoutControlItem3.TextSize = new Size(59, 14);
            // 
            // layoutControlItem4
            // 
            layoutControlItem4.Control = BtnOk;
            layoutControlItem4.Location = new Point(359, 385);
            layoutControlItem4.Location = new Point(418, 444);
            layoutControlItem4.Name = "layoutControlItem4";
            layoutControlItem4.Size = new Size(103, 26);
            layoutControlItem4.Size = new Size(126, 26);
            layoutControlItem4.TextSize = new Size(0, 0);
            layoutControlItem4.TextVisible = false;
            // 
            // emptySpaceItem1
            // 
            emptySpaceItem1.AllowHotTrack = false;
            emptySpaceItem1.Location = new Point(0, 385);
            emptySpaceItem1.Location = new Point(0, 444);
            emptySpaceItem1.Name = "emptySpaceItem1";
            emptySpaceItem1.Size = new Size(359, 26);
            emptySpaceItem1.Size = new Size(418, 26);
            emptySpaceItem1.TextSize = new Size(0, 0);
            // 
            // layoutControlItem8
            // 
            layoutControlItem8.Control = simpleButton1;
            layoutControlItem8.Location = new Point(462, 385);
            layoutControlItem8.Location = new Point(544, 444);
            layoutControlItem8.Name = "layoutControlItem8";
            layoutControlItem8.Size = new Size(113, 26);
            layoutControlItem8.Size = new Size(125, 26);
            layoutControlItem8.TextSize = new Size(0, 0);
            layoutControlItem8.TextVisible = false;
            // 
@@ -314,7 +374,7 @@
            layoutControlItem7.Control = TextEditRatedHead;
            layoutControlItem7.Location = new Point(0, 72);
            layoutControlItem7.Name = "layoutControlItem7";
            layoutControlItem7.Size = new Size(263, 24);
            layoutControlItem7.Size = new Size(306, 24);
            layoutControlItem7.Text = "<color=red>*</color>额定扬程:";
            layoutControlItem7.TextSize = new Size(59, 14);
            // 
@@ -323,43 +383,43 @@
            layoutControlItem6.Control = TextEditTagName;
            layoutControlItem6.Location = new Point(0, 120);
            layoutControlItem6.Name = "layoutControlItem6";
            layoutControlItem6.Size = new Size(575, 24);
            layoutControlItem6.Size = new Size(669, 24);
            layoutControlItem6.Text = "标签名称:";
            layoutControlItem6.TextSize = new Size(59, 14);
            // 
            // layoutControlItem9
            // 
            layoutControlItem9.Control = TextEditRatedeffciency;
            layoutControlItem9.Location = new Point(263, 0);
            layoutControlItem9.Location = new Point(306, 0);
            layoutControlItem9.Name = "layoutControlItem9";
            layoutControlItem9.Size = new Size(312, 24);
            layoutControlItem9.Size = new Size(363, 24);
            layoutControlItem9.Text = "额定效率:";
            layoutControlItem9.TextSize = new Size(59, 14);
            // 
            // layoutControlItem10
            // 
            layoutControlItem10.Control = TextEditRatedPower;
            layoutControlItem10.Location = new Point(263, 24);
            layoutControlItem10.Location = new Point(306, 24);
            layoutControlItem10.Name = "layoutControlItem10";
            layoutControlItem10.Size = new Size(312, 24);
            layoutControlItem10.Size = new Size(363, 24);
            layoutControlItem10.Text = "额定功率:";
            layoutControlItem10.TextSize = new Size(59, 14);
            // 
            // layoutControlItem11
            // 
            layoutControlItem11.Control = TextEditErosion;
            layoutControlItem11.Location = new Point(263, 48);
            layoutControlItem11.Location = new Point(306, 48);
            layoutControlItem11.Name = "layoutControlItem11";
            layoutControlItem11.Size = new Size(312, 24);
            layoutControlItem11.Size = new Size(363, 24);
            layoutControlItem11.Text = "气蚀:";
            layoutControlItem11.TextSize = new Size(59, 14);
            // 
            // layoutControlItem12
            // 
            layoutControlItem12.Control = TextEditD2;
            layoutControlItem12.Location = new Point(263, 72);
            layoutControlItem12.Location = new Point(306, 72);
            layoutControlItem12.Name = "layoutControlItem12";
            layoutControlItem12.Size = new Size(312, 24);
            layoutControlItem12.Size = new Size(363, 24);
            layoutControlItem12.Text = "叶轮外径:";
            layoutControlItem12.TextSize = new Size(59, 14);
            // 
@@ -368,7 +428,7 @@
            layoutControlItem13.Control = TextEditCatalogChoice;
            layoutControlItem13.Location = new Point(0, 96);
            layoutControlItem13.Name = "layoutControlItem13";
            layoutControlItem13.Size = new Size(575, 24);
            layoutControlItem13.Size = new Size(669, 24);
            layoutControlItem13.Text = "选择分类";
            layoutControlItem13.TextSize = new Size(59, 14);
            // 
@@ -377,16 +437,34 @@
            tabbedControlGroup1.Location = new Point(0, 144);
            tabbedControlGroup1.Name = "tabbedControlGroup1";
            tabbedControlGroup1.SelectedTabPage = layoutControlGroup2;
            tabbedControlGroup1.Size = new Size(575, 241);
            tabbedControlGroup1.Size = new Size(669, 300);
            tabbedControlGroup1.TabPages.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlGroup1, layoutControlGroup2 });
            tabbedControlGroup1.Text = "说明";
            //
            // layoutControlGroup2
            //
            layoutControlGroup2.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem14 });
            layoutControlGroup2.Location = new Point(0, 0);
            layoutControlGroup2.Name = "layoutControlGroup2";
            layoutControlGroup2.Size = new Size(645, 252);
            layoutControlGroup2.Text = "属性";
            layoutControlGroup2.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
            //
            // layoutControlItem14
            //
            layoutControlItem14.Control = gridControl1;
            layoutControlItem14.Location = new Point(0, 0);
            layoutControlItem14.Name = "layoutControlItem14";
            layoutControlItem14.Size = new Size(645, 252);
            layoutControlItem14.TextSize = new Size(0, 0);
            layoutControlItem14.TextVisible = false;
            // 
            // layoutControlGroup1
            // 
            layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem5 });
            layoutControlGroup1.Location = new Point(0, 0);
            layoutControlGroup1.Name = "layoutControlGroup1";
            layoutControlGroup1.Size = new Size(551, 193);
            layoutControlGroup1.Size = new Size(645, 252);
            layoutControlGroup1.Text = "说明";
            // 
            // layoutControlItem5
@@ -394,7 +472,7 @@
            layoutControlItem5.Control = DescriptionTextEdit;
            layoutControlItem5.Location = new Point(0, 0);
            layoutControlItem5.Name = "layoutControlItem5";
            layoutControlItem5.Size = new Size(551, 193);
            layoutControlItem5.Size = new Size(645, 252);
            layoutControlItem5.Text = "说明:";
            layoutControlItem5.TextSize = new Size(59, 14);
            // 
@@ -402,48 +480,20 @@
            // 
            dxErrorProvider1.ContainerControl = this;
            // 
            // layoutControlGroup2
            //
            layoutControlGroup2.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem14 });
            layoutControlGroup2.Location = new Point(0, 0);
            layoutControlGroup2.Name = "layoutControlGroup2";
            layoutControlGroup2.Size = new Size(551, 193);
            layoutControlGroup2.Text = "属性";
            //
            // gridControl1
            //
            gridControl1.Location = new Point(20, 188);
            gridControl1.MainView = gridView1;
            gridControl1.Name = "gridControl1";
            gridControl1.Size = new Size(547, 189);
            gridControl1.TabIndex = 14;
            gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { gridView1 });
            //
            // gridView1
            //
            gridView1.GridControl = gridControl1;
            gridView1.Name = "gridView1";
            //
            // layoutControlItem14
            //
            layoutControlItem14.Control = gridControl1;
            layoutControlItem14.Location = new Point(0, 0);
            layoutControlItem14.Name = "layoutControlItem14";
            layoutControlItem14.Size = new Size(551, 193);
            layoutControlItem14.TextSize = new Size(0, 0);
            layoutControlItem14.TextVisible = false;
            //
            // AddPumpProductMainDlg
            // 
            AutoScaleDimensions = new SizeF(7F, 14F);
            AutoScaleMode = AutoScaleMode.Font;
            ClientSize = new Size(587, 423);
            ClientSize = new Size(681, 482);
            Controls.Add(layoutControl1);
            Name = "AddPumpProductMainDlg";
            StartPosition = FormStartPosition.CenterScreen;
            Text = "添加型号";
            ((System.ComponentModel.ISupportInitialize)layoutControl1).EndInit();
            layoutControl1.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)gridControl1).EndInit();
            ((System.ComponentModel.ISupportInitialize)propGroupChoiceViewModelBindingSource).EndInit();
            ((System.ComponentModel.ISupportInitialize)gridView1).EndInit();
            ((System.ComponentModel.ISupportInitialize)TextEditName.Properties).EndInit();
            ((System.ComponentModel.ISupportInitialize)DescriptionTextEdit.Properties).EndInit();
            ((System.ComponentModel.ISupportInitialize)TextEditErosion.Properties).EndInit();
@@ -470,13 +520,11 @@
            ((System.ComponentModel.ISupportInitialize)layoutControlItem12).EndInit();
            ((System.ComponentModel.ISupportInitialize)layoutControlItem13).EndInit();
            ((System.ComponentModel.ISupportInitialize)tabbedControlGroup1).EndInit();
            ((System.ComponentModel.ISupportInitialize)layoutControlGroup2).EndInit();
            ((System.ComponentModel.ISupportInitialize)layoutControlItem14).EndInit();
            ((System.ComponentModel.ISupportInitialize)layoutControlGroup1).EndInit();
            ((System.ComponentModel.ISupportInitialize)layoutControlItem5).EndInit();
            ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).EndInit();
            ((System.ComponentModel.ISupportInitialize)layoutControlGroup2).EndInit();
            ((System.ComponentModel.ISupportInitialize)gridControl1).EndInit();
            ((System.ComponentModel.ISupportInitialize)gridView1).EndInit();
            ((System.ComponentModel.ISupportInitialize)layoutControlItem14).EndInit();
            ResumeLayout(false);
        }
@@ -518,5 +566,9 @@
        private DevExpress.XtraGrid.GridControl gridControl1;
        private DevExpress.XtraGrid.Views.Grid.GridView gridView1;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem14;
        private BindingSource propGroupChoiceViewModelBindingSource;
        private DevExpress.XtraGrid.Columns.GridColumn colPropGroupName;
        private DevExpress.XtraGrid.Columns.GridColumn colPropName;
        private DevExpress.XtraGrid.Columns.GridColumn colValue;
    }
}
WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/AddPumpProductMainDlg.cs
@@ -1,5 +1,7 @@
using DevExpress.XtraEditors.Controls;
using HStation.Dto;
using System.Windows.Forms;
using static System.Windows.Forms.VisualStyles.VisualStyleElement.StartPanel;
namespace HStation.WinFrmUI.Xhs.PumpProduct
{
@@ -11,6 +13,7 @@
        }
        private Yw.BLL.SysCatalog _bll = null;
        private List<PropGroupChoiceViewModel> _proplist = null;
        private AddPumpMainDto model = null;
@@ -25,6 +28,9 @@
                var imageItem = new ImageComboBoxItem(item.Name, item.ID);
                TextEditCatalogChoice.Properties.Items.Add(imageItem);
            }
            _proplist = new List<PropGroupChoiceViewModel>();
            this.propGroupChoiceViewModelBindingSource.DataSource = _proplist;
            this.propGroupChoiceViewModelBindingSource.ResetBindings(false);
        }
        public event Func<AddPumpMainDto, Task<bool>> ReloadDataEvent = null;
@@ -100,12 +106,28 @@
        //分类选择变换
        private async void TextEditCatalogChoice_SelectedValueChanged(object sender, EventArgs e)
        {
            this.layoutControlGroup2.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always;
            this.tabbedControlGroup1.SelectedTabPage = layoutControlGroup2;
            _proplist.Clear();
            var bll = new Yw.BLL.SysPropStruct();
            var catlogID = this.TextEditCatalogChoice.EditValue;
            if (catlogID == null)
                return;
            var id = Convert.ToInt64(catlogID);
            var catlog = await bll.GetByCatalogID(id);
            if (catlog == null)
            {
                this.propGroupChoiceViewModelBindingSource.ResetBindings(false);
                return;
            }
            foreach (var item in catlog)
            {
                foreach (var prop in item.PropList)
                {
                    _proplist.Add(new PropGroupChoiceViewModel() { PropGroupName = item.Name, PropName = prop.Name });
                }
            }
            this.propGroupChoiceViewModelBindingSource.ResetBindings(false);
        }
    }
}
WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/AddPumpProductMainDlg.resx
@@ -117,6 +117,9 @@
  <resheader name="writer">
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <metadata name="propGroupChoiceViewModelBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
    <value>172, 17</value>
  </metadata>
  <metadata name="dxErrorProvider1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
    <value>17, 17</value>
  </metadata>
WinFrmUI/HStation.WinFrmUI.Xhs.Project/Properties/DataSources/PropGroupChoiceViewModel.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="PropGroupChoiceViewModel" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
  <TypeInfo>HStation.WinFrmUI.Xhs.PumpProduct.PropGroupChoiceViewModel, HStation.WinFrmUI.Xhs.PumpProduct, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo>
</GenericObjectDataSource>