From c7af604a39a9ab2ad511212ee5e0263d1793d6bd Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期五, 11 四月 2025 22:19:59 +0800
Subject: [PATCH] 打印
---
DevApp/Gs.DevApp/App.config | 4
DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womdaa.cs | 54 ++++--------
DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womdaa.Designer.cs | 88 ++++++++++++++-------
DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs | 59 +++++++++++++-
4 files changed, 135 insertions(+), 70 deletions(-)
diff --git a/DevApp/Gs.DevApp/App.config b/DevApp/Gs.DevApp/App.config
index 2d4703e..09d6be2 100644
--- a/DevApp/Gs.DevApp/App.config
+++ b/DevApp/Gs.DevApp/App.config
@@ -28,8 +28,8 @@
</assemblyBinding>
</runtime>
<appSettings>
- <add key="WebApiUrl" value="http://localhost:5263/" />
- <!--<add key="WebApiUrl" value="http://192.168.1.145:81/" />-->
+ <!--<add key="WebApiUrl" value="http://localhost:5263/" />-->
+ <add key="WebApiUrl" value="http://192.168.1.145:81/" />
<add key="LogPath" value="logs" />
<add key="ProductName" value="骞挎繁绉戞妧 G-MES V2.0" />
<add key="PageSize" value="50" />
diff --git a/DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womdaa.Designer.cs b/DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womdaa.Designer.cs
index ac7360f..cb0399c 100644
--- a/DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womdaa.Designer.cs
+++ b/DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womdaa.Designer.cs
@@ -216,14 +216,16 @@
this.txt_printRemark = new DevExpress.XtraEditors.TextEdit();
this.txt_kQty = new DevExpress.XtraEditors.TextEdit();
this.txt_yQty = new DevExpress.XtraEditors.TextEdit();
+ this.txt_zQty = new DevExpress.XtraEditors.TextEdit();
this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup();
- this.layoutControlItem22 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem23 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem21 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem24 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem25 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem35 = new DevExpress.XtraLayout.LayoutControlItem();
this.layoutControlItem26 = new DevExpress.XtraLayout.LayoutControlItem();
+ this.layoutControlItem22 = new DevExpress.XtraLayout.LayoutControlItem();
+ this.layoutControlItem36 = new DevExpress.XtraLayout.LayoutControlItem();
this.xtraTabPage3 = new DevExpress.XtraTab.XtraTabPage();
this.gcMx3 = new DevExpress.XtraGrid.GridControl();
this.gvMx3 = new DevExpress.XtraGrid.Views.Grid.GridView();
@@ -260,8 +262,8 @@
this.gridColumn47 = new DevExpress.XtraGrid.Columns.GridColumn();
this.gridColumn48 = new DevExpress.XtraGrid.Columns.GridColumn();
this.panMx100 = new System.Windows.Forms.Panel();
- this.tips = new DevExpress.Utils.ToolTipController(this.components);
this.ucBtnPrint100 = new Gs.DevApp.UserControl.UcBtnPrint();
+ this.tips = new DevExpress.Utils.ToolTipController(this.components);
((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).BeginInit();
this.xtraTabControl1.SuspendLayout();
this.xtraTabPage1.SuspendLayout();
@@ -345,14 +347,16 @@
((System.ComponentModel.ISupportInitialize)(this.txt_printRemark.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txt_kQty.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txt_yQty.Properties)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.txt_zQty.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem22)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem23)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem21)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem24)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem25)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem35)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem26)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem22)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem36)).BeginInit();
this.xtraTabPage3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.gcMx3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.gvMx3)).BeginInit();
@@ -2204,10 +2208,11 @@
this.layoutMx99.Controls.Add(this.txt_printRemark);
this.layoutMx99.Controls.Add(this.txt_kQty);
this.layoutMx99.Controls.Add(this.txt_yQty);
+ this.layoutMx99.Controls.Add(this.txt_zQty);
this.layoutMx99.Dock = System.Windows.Forms.DockStyle.Fill;
this.layoutMx99.Location = new System.Drawing.Point(0, 0);
this.layoutMx99.Name = "layoutMx99";
- this.layoutMx99.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(429, 530, 812, 500);
+ this.layoutMx99.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(174, 443, 812, 500);
this.layoutMx99.Root = this.layoutControlGroup1;
this.layoutMx99.Size = new System.Drawing.Size(1265, 82);
this.layoutMx99.TabIndex = 0;
@@ -2218,11 +2223,12 @@
this.radOut.Location = new System.Drawing.Point(813, 10);
this.radOut.Margin = new System.Windows.Forms.Padding(0);
this.radOut.Name = "radOut";
+ this.radOut.Properties.ItemHorzAlignment = DevExpress.XtraEditors.RadioItemHorzAlignment.Near;
this.radOut.Properties.Items.AddRange(new DevExpress.XtraEditors.Controls.RadioGroupItem[] {
- new DevExpress.XtraEditors.Controls.RadioGroupItem(null, "鑷姩涓斿嵃浣欓噺"),
- new DevExpress.XtraEditors.Controls.RadioGroupItem(null, "鑷姩涓嶅嵃浣欓噺"),
- new DevExpress.XtraEditors.Controls.RadioGroupItem(null, "鍙栨秷鑷姩")});
- this.radOut.Size = new System.Drawing.Size(352, 28);
+ new DevExpress.XtraEditors.Controls.RadioGroupItem(null, "鍏ㄨ嚜鍔�"),
+ new DevExpress.XtraEditors.Controls.RadioGroupItem(null, "鍗婅嚜鍔�"),
+ new DevExpress.XtraEditors.Controls.RadioGroupItem(null, "鎵嬪姩")});
+ this.radOut.Size = new System.Drawing.Size(348, 28);
this.radOut.StyleController = this.layoutMx99;
this.radOut.TabIndex = 473;
//
@@ -2233,7 +2239,7 @@
this.ucBtnPrint1.Margin = new System.Windows.Forms.Padding(0);
this.ucBtnPrint1.Name = "ucBtnPrint1";
this.ucBtnPrint1.rptParameter = null;
- this.ucBtnPrint1.Size = new System.Drawing.Size(265, 31);
+ this.ucBtnPrint1.Size = new System.Drawing.Size(267, 31);
this.ucBtnPrint1.TabIndex = 464;
//
// txt_iCount_1
@@ -2280,7 +2286,7 @@
//
// txt_yQty
//
- this.txt_yQty.Location = new System.Drawing.Point(99, 12);
+ this.txt_yQty.Location = new System.Drawing.Point(99, 43);
this.txt_yQty.Name = "txt_yQty";
this.txt_yQty.Properties.Appearance.Options.UseFont = true;
this.txt_yQty.Properties.ReadOnly = true;
@@ -2289,18 +2295,28 @@
this.txt_yQty.TabIndex = 470;
this.txt_yQty.Tag = "readonly";
//
+ // txt_zQty
+ //
+ this.txt_zQty.Location = new System.Drawing.Point(99, 12);
+ this.txt_zQty.Name = "txt_zQty";
+ this.txt_zQty.Properties.ReadOnly = true;
+ this.txt_zQty.Size = new System.Drawing.Size(176, 24);
+ this.txt_zQty.StyleController = this.layoutMx99;
+ this.txt_zQty.TabIndex = 474;
+ //
// layoutControlGroup1
//
this.layoutControlGroup1.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
this.layoutControlGroup1.GroupBordersVisible = false;
this.layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
- this.layoutControlItem22,
this.layoutControlItem23,
this.layoutControlItem21,
this.layoutControlItem24,
this.layoutControlItem25,
this.layoutControlItem35,
- this.layoutControlItem26});
+ this.layoutControlItem26,
+ this.layoutControlItem22,
+ this.layoutControlItem36});
this.layoutControlGroup1.LayoutMode = DevExpress.XtraLayout.Utils.LayoutMode.Table;
this.layoutControlGroup1.Name = "Root";
columnDefinition5.SizeType = System.Windows.Forms.SizeType.Percent;
@@ -2312,7 +2328,7 @@
columnDefinition8.SizeType = System.Windows.Forms.SizeType.Percent;
columnDefinition8.Width = 100D;
columnDefinition9.SizeType = System.Windows.Forms.SizeType.AutoSize;
- columnDefinition9.Width = 177D;
+ columnDefinition9.Width = 175D;
this.layoutControlGroup1.OptionsTableLayoutGroup.ColumnDefinitions.AddRange(new DevExpress.XtraLayout.ColumnDefinition[] {
columnDefinition5,
columnDefinition6,
@@ -2328,17 +2344,6 @@
rowDefinition8});
this.layoutControlGroup1.Size = new System.Drawing.Size(1265, 82);
this.layoutControlGroup1.TextVisible = false;
- //
- // layoutControlItem22
- //
- this.layoutControlItem22.AppearanceItemCaption.Options.UseTextOptions = true;
- this.layoutControlItem22.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
- this.layoutControlItem22.Control = this.txt_yQty;
- this.layoutControlItem22.Location = new System.Drawing.Point(0, 0);
- this.layoutControlItem22.Name = "layoutControlItem22";
- this.layoutControlItem22.Size = new System.Drawing.Size(267, 31);
- this.layoutControlItem22.Text = "宸叉墦鍗版暟閲�";
- this.layoutControlItem22.TextSize = new System.Drawing.Size(75, 18);
//
// layoutControlItem23
//
@@ -2395,8 +2400,8 @@
//
this.layoutControlItem35.Control = this.radOut;
this.layoutControlItem35.Location = new System.Drawing.Point(801, 0);
- this.layoutControlItem35.MaxSize = new System.Drawing.Size(354, 28);
- this.layoutControlItem35.MinSize = new System.Drawing.Size(354, 20);
+ this.layoutControlItem35.MaxSize = new System.Drawing.Size(350, 28);
+ this.layoutControlItem35.MinSize = new System.Drawing.Size(300, 20);
this.layoutControlItem35.Name = "layoutControlItem35";
this.layoutControlItem35.OptionsTableLayoutItem.ColumnIndex = 3;
this.layoutControlItem35.OptionsTableLayoutItem.ColumnSpan = 2;
@@ -2417,10 +2422,31 @@
this.layoutControlItem26.OptionsTableLayoutItem.ColumnIndex = 3;
this.layoutControlItem26.OptionsTableLayoutItem.RowIndex = 1;
this.layoutControlItem26.Padding = new DevExpress.XtraLayout.Utils.Padding(1, 1, 0, 0);
- this.layoutControlItem26.Size = new System.Drawing.Size(267, 31);
+ this.layoutControlItem26.Size = new System.Drawing.Size(269, 31);
this.layoutControlItem26.Text = "鎶ュ伐鎵撳嵃";
this.layoutControlItem26.TextSize = new System.Drawing.Size(0, 0);
this.layoutControlItem26.TextVisible = false;
+ //
+ // layoutControlItem22
+ //
+ this.layoutControlItem22.AppearanceItemCaption.Options.UseTextOptions = true;
+ this.layoutControlItem22.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
+ this.layoutControlItem22.Control = this.txt_yQty;
+ this.layoutControlItem22.Location = new System.Drawing.Point(0, 31);
+ this.layoutControlItem22.Name = "layoutControlItem22";
+ this.layoutControlItem22.OptionsTableLayoutItem.RowIndex = 1;
+ this.layoutControlItem22.Size = new System.Drawing.Size(267, 31);
+ this.layoutControlItem22.Text = "宸叉墦鍗版暟閲�";
+ this.layoutControlItem22.TextSize = new System.Drawing.Size(75, 18);
+ //
+ // layoutControlItem36
+ //
+ this.layoutControlItem36.Control = this.txt_zQty;
+ this.layoutControlItem36.Location = new System.Drawing.Point(0, 0);
+ this.layoutControlItem36.Name = "layoutControlItem36";
+ this.layoutControlItem36.Size = new System.Drawing.Size(267, 31);
+ this.layoutControlItem36.Text = "宸ュ崟鎬婚噺";
+ this.layoutControlItem36.TextSize = new System.Drawing.Size(75, 18);
//
// xtraTabPage3
//
@@ -2948,14 +2974,16 @@
((System.ComponentModel.ISupportInitialize)(this.txt_printRemark.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txt_kQty.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txt_yQty.Properties)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.txt_zQty.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem22)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem23)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem21)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem24)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem25)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem35)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem26)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem22)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem36)).EndInit();
this.xtraTabPage3.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.gcMx3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.gvMx3)).EndInit();
@@ -3127,7 +3155,6 @@
private DevExpress.XtraEditors.TextEdit txt_kQty;
private DevExpress.XtraEditors.TextEdit txt_yQty;
private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1;
- private DevExpress.XtraLayout.LayoutControlItem layoutControlItem22;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem23;
private UserControl.UcBtnPrint ucBtnPrint1;
private DevExpress.XtraEditors.TextEdit txt_iCount_1;
@@ -3184,5 +3211,8 @@
private DevExpress.XtraGrid.Columns.GridColumn gridColumn47;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn48;
private UserControl.UcBtnPrint ucBtnPrint100;
+ private DevExpress.XtraEditors.TextEdit txt_zQty;
+ private DevExpress.XtraLayout.LayoutControlItem layoutControlItem22;
+ private DevExpress.XtraLayout.LayoutControlItem layoutControlItem36;
}
}
\ No newline at end of file
diff --git a/DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womdaa.cs b/DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womdaa.cs
index 538b62a..ea3b89f 100644
--- a/DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womdaa.cs
+++ b/DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womdaa.cs
@@ -76,42 +76,23 @@
{
_print100();
};
- txt_psnQty_1.TextChanged += Txt_psnQty_1_TextChanged;
- }
-
- private void Txt_psnQty_1_TextChanged(object sender, EventArgs e)
- {
- string sum = txt_kQty.Text.Trim();
- string t1 = txt_psnQty_1.Text.Trim();
- string t2 = txt_iCount_1.Text.Trim();
- if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric2(sum))
- sum = txt_kQty.Text = "0";
-
- if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric2(t1))
- t1 = txt_psnQty_1.Text = "0";
-
- if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric2(t2))
- t2 = txt_iCount_1.Text = "0";
-
- if (t1 == "0")
+ txt_psnQty_1.TextChanged += (s, e) =>
{
- t2 = txt_iCount_1.Text = "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; // 浣欐暟
-
- txt_iCount_1.Text = quotient.ToString();
- radOut.Properties.Items[0].Description = "鍙﹀嵃" + remainder.ToString();
-
+ Gs.DevApp.ToolBox.UtilityHelper.PrintJiSuan(this, txt_psnQty_1, txt_iCount_1, txt_kQty.Text.Trim(), radOut);
+ };
+ txt_iCount_1.TextChanged += (s, e) =>
+ {
+ Gs.DevApp.ToolBox.UtilityHelper.PrintJiSuan(this, txt_iCount_1, txt_psnQty_1, txt_kQty.Text.Trim(), radOut);
+ };
+ radOut.SelectedIndexChanged += (s, e) =>
+ {
+ txt_psnQty_1.Text = "";
+ txt_iCount_1.Text = "";
+ radOut.Properties.Items[0].Description = "鍏ㄨ嚜鍔�";
+ };
}
+
+
private void GridView1_ColumnFilterChanged(object sender, EventArgs e)
{
@@ -388,6 +369,7 @@
//string cjId = dy.daa013;
//string xjxt = dy.sjXt;
// txt_sjXt.getSuppler(cjId, xjxt);
+ txt_zQty.Text = dy.daa008;
txt_yQty.Text = dy.yQty;
txt_kQty.Text = dy.kQty;
lbGuid.Text = strGuid;
@@ -468,6 +450,8 @@
{
Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx4, gvMx4);
}
+ txt_psnQty_1.Text = txt_printRemark.Text = txt_iCount_1.Text = txt_printRemark98.Text = txt_iCount_98.Text = "";
+ radOut.Properties.Items[0].Description = "鍏ㄨ嚜鍔�";
}
else
ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
@@ -597,7 +581,7 @@
this.ucBtnPrint1.rptParameter = "rpt_daa{"
+ txt_printRemark.Text.Trim()
+ "," + ""
- + "," + ""
+ + "," + Gs.DevApp.ToolBox.UtilityHelper.PrintYuLiang(radOut).ToString()
+ "," + txt_iCount_1.Text.Trim()
+ "," + txt_psnQty_1.Text.Trim()
+ "}";
diff --git a/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs b/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
index c2e9c93..65c3af7 100644
--- a/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
+++ b/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
@@ -1691,7 +1691,7 @@
/// <param name="fileName">瀛楁</param>
/// <param name="icoName">鍥炬爣璺緞</param>
/// <param name="action"></param>
- public static void SetGridViewParameter(GridView gridView1, PictureBox picCheckBox = null, Form fm = null, string fileName = "checkStatus", string icoName = "", DelegateGetModel action = null, DevExpress.Utils.ToolTipController tips = null,bool isSearch=true)
+ public static void SetGridViewParameter(GridView gridView1, PictureBox picCheckBox = null, Form fm = null, string fileName = "checkStatus", string icoName = "", DelegateGetModel action = null, DevExpress.Utils.ToolTipController tips = null, bool isSearch = true)
{
gridView1.PopupMenuShowing += (s, e) =>
{
@@ -1714,7 +1714,8 @@
};
gridView1.OptionsView.ColumnAutoWidth = false;//鑷姩璋冩暣鍒楀
- if (isSearch == true) {
+ if (isSearch == true)
+ {
gridView1.OptionsView.ShowGroupPanel = false;
gridView1.OptionsCustomization.AllowGroup = false;
gridView1.OptionsFilter.AllowAutoFilterConditionChange = DevExpress.Utils.DefaultBoolean.False;
@@ -1752,7 +1753,7 @@
column.OptionsFilter.AllowAutoFilter = false;
}
}
-
+
gridView1.IndicatorWidth = 50;
gridView1.CustomDrawRowIndicator += (s, e) =>
{
@@ -1884,7 +1885,7 @@
column.Width = 500;
}
}
-
+
/// <summary>
/// 璁剧疆閫夐」鍗�
/// </summary>
@@ -2031,6 +2032,56 @@
bool isNumeric = decimal.TryParse(input, out number);
return isNumeric;
}
+
+ public static void PrintJiSuan(Form fm, DevExpress.XtraEditors.TextEdit box1, DevExpress.XtraEditors.TextEdit box2, string sum, DevExpress.XtraEditors.RadioGroup rd)
+ {
+ if (rd.SelectedIndex == 2)
+ return;
+ try
+ {
+ if (fm.ActiveControl is DevExpress.XtraEditors.TextEdit textBox)
+ {
+ if (textBox.Name != box1.Name)
+ return;
+ }
+ string t1 = box1.Text.Trim();
+ string t2 = box2.Text.Trim();
+ if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric2(t1))
+ 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; // 浣欐暟
+
+ box2.Text = quotient.ToString();
+
+ if (rd.SelectedIndex == 0)
+ rd.Properties.Items[0].Description = "鍏ㄨ嚜鍔ㄣ��" + remainder.ToString() + "銆�";
+ }
+ catch (Exception ex)
+ {
+
+ Gs.DevApp.ToolBox.MsgHelper.ShowError(ex.Message);
+ }
+
+ }
+
+ 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);
+ }
}
/// <summary>
--
Gitblit v1.9.3