From 1d8832e8e8e862a296f80c18ae2f1dac40419b68 Mon Sep 17 00:00:00 2001
From: lixiaojun <1287241240@qq.com>
Date: 星期二, 29 十月 2024 18:09:01 +0800
Subject: [PATCH] Merge branch 'master' of http://47.103.154.90:83/r/HStation/XHS.V1.0

---
 WinFrmUI/HStation.WinFrmUI.Basic/02-SysPropManage/AddSysPropDlg.cs |   50 ++++++++++++++++++++++++++++++++++++++++++++------
 1 files changed, 44 insertions(+), 6 deletions(-)

diff --git a/WinFrmUI/HStation.WinFrmUI.Basic/02-SysPropManage/AddSysPropDlg.cs b/WinFrmUI/HStation.WinFrmUI.Basic/02-SysPropManage/AddSysPropDlg.cs
index d052efb..ecf001d 100644
--- a/WinFrmUI/HStation.WinFrmUI.Basic/02-SysPropManage/AddSysPropDlg.cs
+++ b/WinFrmUI/HStation.WinFrmUI.Basic/02-SysPropManage/AddSysPropDlg.cs
@@ -1,5 +1,4 @@
-锘縰sing Mapster;
-using Yw.Basic;
+锘縰sing Yw.Basic;
 using Yw.Dto;
 
 namespace HStation.WinFrmUI.Basic
@@ -9,17 +8,18 @@
         public AddSysPropDlg()
         {
             InitializeComponent();
+            this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon;
         }
 
-        public event Func<Yw.Dto.AddSysPropInput, Task<bool>> ReloadDataEvent = null;
+        public event Func<Yw.Vmo.SysPropVmo, Task<bool>> ReloadDataEvent = null;
 
-        private AddSysPropInput _AddPropDto { get; set; }
+        private Yw.Vmo.SysPropVmo _AddPropDto { get; set; }
 
         private long _TypeID;
 
         public async void SetBindingData(long GroupID, long TypeID)
         {
-            _AddPropDto = new AddSysPropInput();
+            _AddPropDto = new Yw.Vmo.SysPropVmo();
             _AddPropDto.GroupID = GroupID;
             _TypeID = TypeID;
         }
@@ -31,6 +31,16 @@
             if (string.IsNullOrEmpty(TextEditName.Text.Trim()))
             {
                 this.dxErrorProvider1.SetError(this.TextEditName, "蹇呭~椤�");
+                return false;
+            }
+            if (string.IsNullOrEmpty(TextEditCode.Text.Trim()))
+            {
+                this.dxErrorProvider1.SetError(this.TextEditCode, "蹇呭~椤�");
+                return false;
+            }
+            if (string.IsNullOrEmpty(TextEditFormat.Text.Trim()))
+            {
+                this.dxErrorProvider1.SetError(this.TextEditCode, "蹇呭~椤�");
                 return false;
             }
             return true;
@@ -45,7 +55,35 @@
             _AddPropDto.DefaultValue = TextEditDefaultValue.Text.Trim();
             _AddPropDto.UnitName = TextEditUnitName.Text.Trim();
             _AddPropDto.IsNull = CheckEditIsNull.Checked;
-            //_AddPropDto.Format = TextEditFormat.Text.Trim();
+            // _AddPropDto.Format = TextEditFormat.Text.Trim();
+            if (TextEditFormat.SelectedIndex == 0)
+            {
+                _AddPropDto.Format = (Yw.Basic.ePropFormat)ePropFormat.Integer;
+            }
+            else if (TextEditFormat.SelectedIndex == 1)
+            {
+                _AddPropDto.Format = (Yw.Basic.ePropFormat)ePropFormat.Bigint;
+            }
+            else if (TextEditFormat.SelectedIndex == 2)
+            {
+                _AddPropDto.Format = (Yw.Basic.ePropFormat)ePropFormat.Numeric;
+            }
+            else if (TextEditFormat.SelectedIndex == 3)
+            {
+                _AddPropDto.Format = (Yw.Basic.ePropFormat)ePropFormat.Text;
+            }
+            else if (TextEditFormat.SelectedIndex == 4)
+            {
+                _AddPropDto.Format = (Yw.Basic.ePropFormat)ePropFormat.MultiText;
+            }
+            else if (TextEditFormat.SelectedIndex == 5)
+            {
+                _AddPropDto.Format = (Yw.Basic.ePropFormat)ePropFormat.Time;
+            }
+            else
+            {
+                _AddPropDto.Format = (Yw.Basic.ePropFormat)ePropFormat.Boolen;
+            }
             _AddPropDto.TypeID = _TypeID;
             if (await this.ReloadDataEvent.Invoke(_AddPropDto))
             {

--
Gitblit v1.9.3