From fbe33a615f1c4e798a0f8e58163e68c3ce789614 Mon Sep 17 00:00:00 2001
From: lg <123456>
Date: 星期四, 20 十一月 2025 10:17:49 +0800
Subject: [PATCH] 初始化标准版
---
DevApp/Gs.DevApp/DevFrm/BasicData/Frm_MesWorkshopLine.cs | 92 ++++++++++++++++++++++++++++++++++++++--------
1 files changed, 76 insertions(+), 16 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/BasicData/Frm_MesWorkshopLine.cs b/DevApp/Gs.DevApp/DevFrm/BasicData/Frm_MesWorkshopLine.cs
index 4377132..30915aa 100644
--- a/DevApp/Gs.DevApp/DevFrm/BasicData/Frm_MesWorkshopLine.cs
+++ b/DevApp/Gs.DevApp/DevFrm/BasicData/Frm_MesWorkshopLine.cs
@@ -102,7 +102,7 @@
(rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_lineNo, gridView1, "lineNo");
if (string.IsNullOrEmpty(rowGuid))
{
- ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+ ToolBox.MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
return;
}
if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾鍒犻櫎鍚楋紵"))
@@ -116,17 +116,19 @@
ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson);
if (_rtn.rtnCode > 0)
{
+ ToolBox.MsgHelper.ShowInformation("鎻愮ず锛�" + _rtn.rtnMsg);
if (xtraTabControl1.SelectedTabPageIndex == 0)
{ }
else
Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 2);
getPageList(this.pageBar1.CurrentPage);
}
- ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
+ else
+ ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
}
catch (Exception ex)
{
- ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
}
}
@@ -176,6 +178,8 @@
{
UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, true);
}
+ //2025/07/12鍔犱笂淇敼鐘舵�佷笅涓嶈兘淇敼
+ txt_dptId.IsReadly = true;
}
/// <summary>
/// 鏂板浜嬩欢
@@ -198,25 +202,25 @@
toolBarMenu1.isSetBtn = false;
if (string.IsNullOrEmpty(txt_dptId.GetId().Trim()))
{
- Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨鎵�鍦ㄩ儴闂紒");
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵�鍦ㄩ儴闂紒");
txt_dptId.Focus();
return;
}
if (string.IsNullOrEmpty(txt_lineNo.Text.Trim()))
{
- Gs.DevApp.ToolBox.MsgHelper.Warning("浜х嚎缂栧彿涓嶈兘涓虹┖锛�");
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("浜х嚎缂栧彿涓嶈兘涓虹┖锛�");
txt_lineNo.Focus();
return;
}
if (string.IsNullOrEmpty(txt_name.Text.Trim()))
{
- Gs.DevApp.ToolBox.MsgHelper.Warning("浜х嚎鍚嶇О涓嶈兘涓虹┖锛�");
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("浜х嚎鍚嶇О涓嶈兘涓虹┖锛�");
txt_name.Focus();
return;
}
if (string.IsNullOrEmpty(txt_lineType.Text.Trim()))
{
- Gs.DevApp.ToolBox.MsgHelper.Warning("浜х嚎绫诲埆涓嶈兘涓虹┖锛�");
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("浜х嚎绫诲埆涓嶈兘涓虹┖锛�");
txt_lineType.Focus();
return;
}
@@ -227,26 +231,30 @@
Name = txt_name.Text.Trim(),
LineNo = txt_lineNo.Text.Trim(),
Remark = txt_remark.Text.Trim(),
- LineType = txt_lineType.Text.Trim(),
- isZxbg = txt_isZxbg.Checked
+ LineType = txt_lineType.Checked.ToString(),//杩囩珯鏃跺己鍒舵按妫�
+ isZxbg = txt_isZxbg.Checked //杩囩珯鏃跺己鍒剁數妫�
};
try
{
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;
toolBarMenu1.isSetBtn = true;
UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, false);
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);
}
}
@@ -257,7 +265,11 @@
/// <param name="pageSize">姣忛〉鍑犳潯</param>
private void getPageList(int curPage)
{
- gcMain1.DataSource = null;var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
+ gcMain1.DataSource = null;
+ System.Text.StringBuilder _sbSqlWhere = new System.Text.StringBuilder();
+ _sbSqlWhere.Append(" and c.FSubsidiary in");
+ _sbSqlWhere.Append(ToolBox.UtilityHelper.GetOrgWhere());
+ _sbSqlWhere.Append(UtilityHelper.GetSearchWhere(_filterList));
var pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "org.FNumber asc ,c.departmentcode asc,a.line_no",
"asc", "", _sbSqlWhere.ToString());
var json = JsonConvert.SerializeObject(pgq);
@@ -291,7 +303,7 @@
}
catch (Exception ex)
{
- MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
}
}
/// <summary>
@@ -307,7 +319,7 @@
if (toolBarMenu1.currentAction == "edit") isEdit = true;
if (string.IsNullOrEmpty(strGuid))
{
- ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+ ToolBox.MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
return;
}
var _obj = new
@@ -325,11 +337,59 @@
UtilityHelper.SetValueByObj(this.layoutMx1.Controls, dy, isEdit);
}
else
- ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
+ ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
}
catch (Exception ex)
{
- ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
+ }
+ }
+ /// <summary>
+ /// 涓婁紶鍥剧墖
+ /// </summary>
+ /// <param name="sender"></param>
+ /// <param name="e"></param>
+ private void repositoryItemButtonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
+ {
+ var rowhandle = gridView1.FocusedRowHandle;
+ if (rowhandle < 0)
+ return;
+ if (e.Button.Index == 0)
+ {
+ var dr = gridView1.GetDataRow(rowhandle);
+ var mxGuid = dr["guid"].ToString();
+ Gs.DevApp.UserControl.ShowUp frm = new Gs.DevApp.UserControl.ShowUp(mxGuid);
+ frm.UpdateParent += (ss, ee) =>
+ {
+ Gs.DevApp.ToolBox.MsgHelper.ShowInformation("涓婁紶鎴愬姛锛�");
+ getPageList(this.pageBar1.CurrentPage);
+ };
+ frm.ShowDialog();
+ }
+ }
+ /// <summary>
+ /// 棰勮鍥剧墖
+ /// </summary>
+ /// <param name="sender"></param>
+ /// <param name="e"></param>
+ private void repositoryItemButtonEdit2_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
+ {
+ var rowhandle = gridView1.FocusedRowHandle;
+ if (rowhandle < 0)
+ return;
+ if (e.Button.Index == 0)
+ {
+ try
+ {
+ var dr = gridView1.GetDataRow(rowhandle);
+ var urlPath = dr["guid"].ToString();
+ Gs.DevApp.UserControl.ShowFile frm = new ShowFile(urlPath);
+ frm.ShowDialog();
+ }
+ catch (Exception ex)
+ {
+ Gs.DevApp.ToolBox.MsgHelper.ShowError(ex.Message);
+ }
}
}
}
--
Gitblit v1.9.3