From 45b0abd8850da515734792f01addd8aa5f18dd62 Mon Sep 17 00:00:00 2001
From: lu <123456>
Date: 星期五, 01 八月 2025 23:31:42 +0800
Subject: [PATCH] bug
---
DevApp/Gs.DevApp/DevFrm/WW/Frm_WwTbl.cs | 99 +++++++++++++++++++++++++++++--------------------
1 files changed, 58 insertions(+), 41 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/WW/Frm_WwTbl.cs b/DevApp/Gs.DevApp/DevFrm/WW/Frm_WwTbl.cs
index 664aa6a..d5bc7e6 100644
--- a/DevApp/Gs.DevApp/DevFrm/WW/Frm_WwTbl.cs
+++ b/DevApp/Gs.DevApp/DevFrm/WW/Frm_WwTbl.cs
@@ -77,32 +77,29 @@
gcMx1.BindingContext = new BindingContext();
gcMx1.DataSource = _oldTable;
gcMx1.ForceInitialize();
+ gvMx1.BestFitColumns();
+ Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gvMx1);
}
catch (Exception ex)
{
- MessageBox.Show(ex.Message);
+ Gs.DevApp.ToolBox.MsgHelper.ShowError(ex.Message);
}
};
frm.ShowDialog();
};
-
- this.ucBtnPrint1.btnDesignClick += (s, e) =>
- {
- ucBtnPrint1.rptParameter = "rpt_wwtl{}";
- };
- this.ucBtnPrint1.btnReportClick += (s, e) =>
+ this.ucBtnPrint1.btnPrintClick += (s, e) =>
{
ucBtnPrint1.guidKey = "";
string rowGuid = lbMxGuid.Text.Trim();
ucBtnPrint1.guidKey = rowGuid;
- if (string.IsNullOrEmpty(txt_iCount_1.Text.Trim()))
+ if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric3(txt_iCount_1.Text.Trim(), txt_yuliang_1.Text.Trim()))
{
- Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鏉$爜寮犳暟锛�");
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("璇疯緭鍏ユ纭殑鏉$爜鏁伴噺锛�");
txt_iCount_1.Focus();
this.ucBtnPrint1.rptParameter = "return false";
return;
}
- if (string.IsNullOrEmpty(txt_psnQty_1.Text.Trim()))
+ if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric3(txt_psnQty_1.Text.Trim()))
{
Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鏉$爜鏁伴噺锛�");
txt_psnQty_1.Focus();
@@ -117,7 +114,7 @@
}
this.ucBtnPrint1.rptParameter = "rpt_wwtl{" + lbMxGuid.Text.Trim()
+ "," + ""
- + "," + Gs.DevApp.ToolBox.UtilityHelper.PrintYuLiang(radOut).ToString()
+ + "," + Gs.DevApp.ToolBox.UtilityHelper.ToDecimal(txt_yuliang_1.Text.Trim())
+ "," + txt_iCount_1.Text.Trim()
+ "," + txt_psnQty_1.Text.Trim()
+ "}";
@@ -125,12 +122,12 @@
//鑷姩璁$畻鎵撳嵃閲�
txt_psnQty_1.TextChanged += (s, e) =>
{
- Gs.DevApp.ToolBox.UtilityHelper.PrintJiSuan(txt_psnQty_1, txt_iCount_1, txt_kQty.Text.Trim(), radOut);
+ Gs.DevApp.ToolBox.UtilityHelper.PrintJiSuan(txt_psnQty_1, txt_iCount_1, txt_kQty.Text.Trim(), radOut, txt_yuliang_1);
};
radOut.SelectedIndexChanged += (s, e) =>
{
- Gs.DevApp.ToolBox.UtilityHelper.PrintAuto(txt_psnQty_1, txt_iCount_1, radOut);
+ Gs.DevApp.ToolBox.UtilityHelper.PrintAuto(txt_psnQty_1, txt_iCount_1, radOut, txt_yuliang_1);
};
}
@@ -172,7 +169,7 @@
gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged;
gridView1.ActiveFilter.Clear();
gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged;
- var frm = new ShowFilter(gridView1.Columns, _filterList, this.GetType().FullName);
+ var frm = new ShowFilter(gridView1.Columns, _filterList, this.GetType().FullName);
frm.UpdateParent += Frm_UpdateParent;
frm.ShowDialog();
}
@@ -186,8 +183,6 @@
_filterList = e.FilterList;
getPageList(1);
}
-
-
/// <summary>
/// 瀹℃牳浜嬩欢
@@ -231,7 +226,7 @@
lbGuid, txt_billNo, gridView1, "billNo");
if (string.IsNullOrEmpty(rowGuid))
{
- MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+ MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
return;
}
if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾鍒犻櫎鍚楋紵"))
@@ -249,18 +244,19 @@
var _rtn = UtilityHelper.ReturnToDynamic(strJson);
if (_rtn.rtnCode > 0)
{
+ MsgHelper.ShowInformation("鎻愮ず锛�" + _rtn.rtnMsg);
if (xtraTabControl1.SelectedTabPageIndex == 0)
{ }
else
Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 2);
getPageList(this.pageBar1.CurrentPage);
}
-
- MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
+ else
+ MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
}
catch (Exception ex)
{
- MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
}
}
@@ -312,7 +308,9 @@
gvList.Add(gvMx2);
UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, true, gvList);
}
-
+ //2025/07/12鍔犱笂淇敼鐘舵�佷笅涓嶈兘淇敼渚涘簲鍟嗗拰缁勭粐srm,绂佺敤
+ txt_tbl002.IsReadly = true;
+ txt_tbl005.ReadOnly = true;
}
/// <summary>
/// 鏂板浜嬩欢
@@ -341,13 +339,13 @@
string workId = txt_tbl002.GetId();
if (string.IsNullOrEmpty(workId.Trim()))
{
- Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨宸ュ崟锛�");
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨宸ュ崟锛�");
txt_tbl002.Focus();
return;
}
if (txt_tbl005.SelectedIndex <= 0)
{
- Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨閫�鏂欑被鍨嬶紒");
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨閫�鏂欑被鍨嬶紒");
txt_tbl005.Focus();
return;
}
@@ -380,12 +378,18 @@
MsgHelper.ShowError("鐢宠鏁伴噺涓嶈兘涓虹┖锛�");
return;
}
+ string _tld014 = row["tld014"].ToString();
+ if (string.IsNullOrEmpty(_tld014))
+ {
+ MsgHelper.ShowError("閫�鏂欏娉ㄤ笉鑳戒负绌猴紒");
+ return;
+ }
_obj.list.Add(new
{
Guid = _guid,
AboutGuid = Gs.DevApp.ToolBox.UtilityHelper.ToGuid(row["aboutGuid"].ToString()),
Sl = _sl, //鐢宠鏁伴噺
- Remark= row["tld014"].ToString()
+ Remark = _tld014
});
}
}
@@ -393,9 +397,9 @@
{
string strJson = UtilityHelper.HttpPost("", _webServiceName + "EditModel", JsonConvert.SerializeObject(_obj));
ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson);
- ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
if (_rtn.rtnCode > 0)
{
+ ToolBox.MsgHelper.ShowInformation("鎻愮ず锛�" + _rtn.rtnMsg);
lbGuid.Text = _rtn.rtnData.outGuid;
txt_billNo.Text = _rtn.rtnData.outNo;
toolBarMenu1.isSetBtn = true;
@@ -406,10 +410,12 @@
toolBarMenu1.currentAction = "";
Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 6);
}
+ else
+ ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
}
catch (Exception ex)
{
- ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
}
}
@@ -420,7 +426,7 @@
/// <param name="pageSize">姣忛〉鍑犳潯</param>
private void getPageList(int curPage)
{
- var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
+ gcMain1.DataSource = null; var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "create_date", "asc", "", _sbSqlWhere.ToString());
string json = JsonConvert.SerializeObject(pgq);
try
@@ -464,7 +470,7 @@
if (toolBarMenu1.currentAction == "edit") isEdit = true;
if (string.IsNullOrEmpty(strGuid))
{
- ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+ ToolBox.MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
return;
}
var _obj = new
@@ -497,6 +503,8 @@
gcMx1.DataSource = dt;
gcMx1.ForceInitialize();
gvMx1.BestFitColumns();
+ gvMx1.BestFitColumns();
+ Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gvMx1);
}
else
{
@@ -514,6 +522,8 @@
gcMx2.DataSource = dt2;
gcMx2.ForceInitialize();
gvMx2.BestFitColumns();
+ gvMx2.BestFitColumns();
+ Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gvMx2);
}
else
{
@@ -521,11 +531,11 @@
}
}
else
- ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
+ ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
}
catch (Exception ex)
{
- ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
}
}
@@ -564,13 +574,15 @@
var _rtn = UtilityHelper.ReturnToDynamic(strJson);
if (_rtn.rtnCode > 0)
{
- if (_rtn.rtnCode > 0) getModel(lbGuid.Text);
+ MsgHelper.ShowInformation("鎻愮ず锛�" + _rtn.rtnMsg);
+ getModel(lbGuid.Text);
}
- MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
+ else
+ MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
}
catch (Exception ex)
{
- MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
}
}
}
@@ -605,13 +617,15 @@
var _rtn = UtilityHelper.ReturnToDynamic(strJson);
if (_rtn.rtnCode > 0)
{
- if (_rtn.rtnCode > 0) getModel(lbGuid.Text);
+ MsgHelper.ShowInformation("鎻愮ず锛�" + _rtn.rtnMsg);
+ getModel(lbGuid.Text);
}
- MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
+ else
+ MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
}
catch (Exception ex)
{
- MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
}
}
}
@@ -630,13 +644,14 @@
case 0:
strMsg = "鍙嶅鏍�";
break;
- };
+ }
+ ;
toolBarMenu1.guidKey = "";
string rowGuid, rowName;
(rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_billNo, gridView1, "billNo");
if (string.IsNullOrEmpty(rowGuid))
{
- MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+ MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
return;
}
if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾" + strMsg + "鍚楋紵"))
@@ -653,9 +668,9 @@
_webServiceName + "EditModelSubmit",
JsonConvert.SerializeObject(_obj));
var _rtn = UtilityHelper.ReturnToDynamic(strJson);
- MsgHelper.Warning(_rtn.rtnData.outMsg.ToString());
if (_rtn.rtnCode > 0 && _rtn.rtnData.outSum * 1 > 0)
{
+ MsgHelper.ShowInformation(_rtn.rtnData.outMsg.ToString());
if (xtraTabControl1.SelectedTabPageIndex == 1)
{
getModel(lbGuid.Text.Trim());
@@ -664,10 +679,12 @@
gridView1.FocusedRowHandle = rowHandle;
UtilityHelper.SetCheckIco(gridView1, "isChk", "tbl011", "tbl012", picCheckBox, this, _inFieldValue.ToString());
}
+ else
+ MsgHelper.ShowError(_rtn.rtnData.outMsg.ToString());
}
catch (Exception ex)
{
- MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
}
}
@@ -681,7 +698,7 @@
txtWlid.Text = row["tld002"].ToString();
txtWlgg.Text = row["tld004"].ToString();
txtWlmc.Text = row["tld003"].ToString();
- txtQuantity.Text = row["tld004"].ToString();//鐢宠鎬婚噺
+ txtQuantity.Text = row["tld005"].ToString();//鐢宠鎬婚噺
txt_yQty.Text = row["ydy"].ToString();//宸叉墦鍗版�婚噺
txt_kQty.Text = row["kdy"].ToString();//鍙墦鍗版�婚噺
}
--
Gitblit v1.9.3