From 75b427e877ee7cb24116db3df19bf2a73e1986f9 Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期四, 08 五月 2025 16:01:47 +0800
Subject: [PATCH] fqc

---
 DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs |   31 ++++++++-----------------------
 1 files changed, 8 insertions(+), 23 deletions(-)

diff --git a/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs b/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
index 5eafab2..0efbe39 100644
--- a/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
+++ b/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
@@ -2123,25 +2123,22 @@
                 string t2 = box2.Text.Trim();
                 if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric2(t1))
                     return;
+                if (Gs.DevApp.ToolBox.UtilityHelper.ToDecimal(t1) <= 0)
+                    return;
                 decimal? dc = Gs.DevApp.ToolBox.UtilityHelper.GetDecimal(sum);
                 decimal? dc1 = Gs.DevApp.ToolBox.UtilityHelper.GetDecimal(t1);
-
-                int dividend = int.Parse(sum); // 琚櫎鏁�
-                int divisor = int.Parse(t1);   // 闄ゆ暟
-
-                int quotient = dividend / divisor; // 鏁存暟閮ㄥ垎
-                int remainder = dividend % divisor; // 浣欐暟
-
+                decimal dividend = decimal.Parse(sum); // 琚櫎鏁�
+                decimal divisor = decimal.Parse(t1);   // 闄ゆ暟
+                decimal quotient = dividend / divisor; // 鏁存暟閮ㄥ垎
+                decimal remainder = dividend % divisor; // 浣欐暟
                 box2.Text = quotient.ToString();
-
                 if (rd.SelectedIndex == 0)
                     txt_yuliang.Text = remainder.ToString();
             }
             catch (Exception ex)
             {
-                Gs.DevApp.ToolBox.MsgHelper.ShowError(ex.Message);
+              Gs.DevApp.ToolBox.MsgHelper.ShowError("杈撳叆鏁版嵁閿欒:"+ex.Message);
             }
-
         }
         public static void PrintAuto(DevExpress.XtraEditors.TextEdit txt_psnQty_1, DevExpress.XtraEditors.TextEdit txt_iCount_1, DevExpress.XtraEditors.RadioGroup radOut, DevExpress.XtraEditors.TextEdit txt_yuliang = null)
         {
@@ -2153,19 +2150,7 @@
             else
                 txt_iCount_1.ReadOnly = true;
         }
-        public static decimal PrintYuLiang(DevExpress.XtraEditors.RadioGroup rd)
-        {
-            decimal dc = 0;
-            if (rd.SelectedIndex != 0)
-                return 0;
-            string txt = rd.Properties.Items[0].Description;// = "鍏ㄨ嚜鍔ㄣ��" + remainder.ToString() + "銆�";
-            txt = txt.Trim().Replace("鍏ㄨ嚜鍔ㄣ��", "");
-            txt = txt.Replace("銆�", "");
-            if (string.IsNullOrEmpty(txt))
-                return 0;
-            return decimal.Parse(txt);
-        }
-
+   
         #region 缁樺埗琛ㄥご鍏ㄩ�夊嬀閫夋
         /// <summary>
         /// 缁樺埗琛ㄥご鍏ㄩ�夊嬀閫夋

--
Gitblit v1.9.3