From c5136b7517998a076f1bd2e4abdda01decae8b6f Mon Sep 17 00:00:00 2001
From: duheng <2784771470@qq.com>
Date: 星期五, 07 二月 2025 09:35:58 +0800
Subject: [PATCH] 问题修复

---
 WinFrmUI/IStation.WinFrmUI.Basic/basic/electricprice/AddElectricDlg.cs |   41 +++++++++++++++++++----------------------
 1 files changed, 19 insertions(+), 22 deletions(-)

diff --git a/WinFrmUI/IStation.WinFrmUI.Basic/basic/electricprice/AddElectricDlg.cs b/WinFrmUI/IStation.WinFrmUI.Basic/basic/electricprice/AddElectricDlg.cs
index 5a5c4ae..298dbe3 100644
--- a/WinFrmUI/IStation.WinFrmUI.Basic/basic/electricprice/AddElectricDlg.cs
+++ b/WinFrmUI/IStation.WinFrmUI.Basic/basic/electricprice/AddElectricDlg.cs
@@ -21,16 +21,14 @@
         }
 
         private BindingList<ElecPriceHourSetting> _allBindingList = null; //杩欏氨鏄緭鍏ヨ繘鍘荤珛椹氨鑾峰彇鍒扮殑鍊�
+
         public event Func<Model.ElecPriceMonthSetting, bool> ReloadDataEvent;
-
-
 
         public void SetBindingData()
         {
             _allBindingList = new BindingList<Model.ElecPriceHourSetting>();
             this.bindingSource1.DataSource = _allBindingList;
         }
-
 
         //楠岃瘉
         private bool verify()
@@ -46,13 +44,13 @@
                 this.dxErrorProvider1.SetError(this.txtEndMonth, "蹇呭~椤�");
                 return false;
             }
-            var AllHour =_allBindingList;
-            var hour = AllHour.OrderBy(x => x.EndHour).ToList();  
+            var AllHour = _allBindingList;
+            var hour = AllHour.OrderBy(x => x.EndHour).ToList();
             var HourCount = hour.Count;
             if (hour.First().StartHour != 0 || hour.Last().EndHour != 24)
             {
-                  XtraMessageBox.Show("寮�濮嬫椂闂村拰缁撴潫鏃堕棿鏈夎");
-                  return false;
+                XtraMessageBox.Show("寮�濮嬫椂闂村拰缁撴潫鏃堕棿鏈夎");
+                return false;
             }
             for (int x = 0; x < hour.Count - 1; x++)
             {
@@ -71,8 +69,7 @@
                 }
             }
             return true;
-    }
-
+        }
 
         //纭畾
         private void btnOk_Click(object sender, EventArgs e)
@@ -90,12 +87,12 @@
                 MessageBox.Show("杈撳叆鏈夎");
                 return;
             }
-            if (Startmonth > 11)
-            {
-                MessageBox.Show("寮�濮嬫湀灏忎簬12");
-                return;
-            }
-            
+            /*            if (Startmonth > 11)
+                        {
+                            MessageBox.Show("寮�濮嬫湀灏忎簬12");
+                            return;
+                        }
+                        */
             Eleprice.StartMonth = Startmonth;
             int Endmonth = 0;
             if (!int.TryParse(this.txtEndMonth.Text, out Endmonth))
@@ -109,11 +106,11 @@
                 MessageBox.Show("璇疯緭鍏ヤ笉灏忎簬1涓斾笉澶т簬12鐨勬暟瀛�");
                 return;
             }
-            if (Startmonth >=Endmonth)
-            {
-                MessageBox.Show("寮�濮嬫湀涓嶈兘灏忎簬鎴栫瓑浜庣粨鏉熸湀");
-                return;
-            }
+            /*   if (Startmonth >=Endmonth)
+               {
+                   MessageBox.Show("寮�濮嬫湀涓嶈兘灏忎簬鎴栫瓑浜庣粨鏉熸湀");
+                   return;
+               }*/
             Eleprice.EndMonth = Endmonth;
             Eleprice.HourList = _allBindingList.ToList();        //鎶婄粦瀹氬垪琛ㄧ殑鍊艰祴缁檋ourlist
             var isok = this.ReloadDataEvent.Invoke(Eleprice);
@@ -126,6 +123,7 @@
             this.DialogResult = System.Windows.Forms.DialogResult.OK;       //纭畾ok,鐒跺悗鍏抽棴
             this.Close();
         }
+
         //琛屽垹闄�
         private void gridView2_RowCellClick(object sender, DevExpress.XtraGrid.Views.Grid.RowCellClickEventArgs e)
         {
@@ -138,5 +136,4 @@
                 _allBindingList.Remove(row);
         }
     }
-}
-
+}
\ No newline at end of file

--
Gitblit v1.9.3