From a906f71640d9ba5cd9f8d689a51de3a557d8bbff Mon Sep 17 00:00:00 2001
From: duheng <2286773002@qq.com>
Date: 星期五, 14 三月 2025 17:37:10 +0800
Subject: [PATCH] 完善成套设备界面问题

---
 WinFrmUI/PBS.WinFrmUI/01-place/00-core/BuildWizardForm.cs |  117 ++++++++++++++++++++++++++++++----------------------------
 1 files changed, 60 insertions(+), 57 deletions(-)

diff --git a/WinFrmUI/PBS.WinFrmUI/01-place/00-core/BuildWizardForm.cs b/WinFrmUI/PBS.WinFrmUI/01-place/00-core/BuildWizardForm.cs
index abac8dd..f96a06d 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,66 @@
                 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;
         }
 
@@ -82,40 +120,5 @@
             //      cbDist.EditValue = model.Dist;
         }
 
-        public string getText()
-        {
-            return "a";
-        }
-
-        private void BuildWizardForm_Load(object sender, EventArgs e)
-        {
-            /*     var allProvince = new BLL.Region().GetAll().Where(x => x.Type == eRegionType.Province).ToList();
-                 foreach (var item in allProvince)
-                 {
-                     var imageItem = new ImageComboBoxItem(item.Name, item.ID);
-                     cbArea.Properties.Items.Add(imageItem);
-                     //鍩庡競娣诲姞鐪佷唤鍙槸涓轰簡涓存椂鐢�,鍚庢湡浼氭洿鏀�
-                     cbCity.Properties.Items.Add(imageItem);
-                 }
-                 ValueChangeEvent(); //涓轰簡缂栬緫椤甸潰鐨勬椂鍊欏彲浠ラ�変腑鎵�閫夐」*/
-        }
-
-        private void cbArea_SelectedIndexChanged(object sender, EventArgs e)
-        {
-            ValueChangeEvent();
-        }
-
-        private void ValueChangeEvent()
-        {
-            /*   if (cbArea.EditValue != null)
-               {
-                   var AllDist = new BLL.Region().GetChildrenByID((long)cbArea.EditValue);
-                   foreach (var item in AllDist)
-                   {
-                       var imageItem = new ImageComboBoxItem(item.Name, item.ID);
-                       cbDist.Properties.Items.Add(imageItem);
-                   }
-               }*/
-        }
     }
 }
\ No newline at end of file

--
Gitblit v1.9.3