From c6dc733e3e5e5eb5fe07366652a3987c78cc68d4 Mon Sep 17 00:00:00 2001 From: lu <123456> Date: 星期日, 03 八月 2025 09:53:19 +0800 Subject: [PATCH] 用户绑定 --- DevApp/Gs.DevApp/DevFrm/PDA/SelectCk.cs | 9 +- DevApp/Gs.DevApp/DevFrm/PDA/SelectPage.cs | 9 +- DevApp/Gs.DevApp/DevFrm/Sys/Frm_PrintInfo.cs | 30 +++++---- DevApp/Gs.DevApp/DevFrm/PDA/Frm_UserBind.Designer.cs | 2 DevApp/Gs.DevApp/Gs.DevApp.csproj | 18 ------ DevApp/Gs.DevApp/DevFrm/PDA/SelectPrint.cs | 9 ++- DevApp/Gs.DevApp/DevFrm/PDA/Frm_UserBind.cs | 26 +++++--- DevApp/Gs.DevApp/DevFrm/Sys/Frm_MesSysPageview.cs | 32 ++++++---- 8 files changed, 67 insertions(+), 68 deletions(-) diff --git a/DevApp/Gs.DevApp/DevFrm/PDA/Frm_UserBind.Designer.cs b/DevApp/Gs.DevApp/DevFrm/PDA/Frm_UserBind.Designer.cs index 126977a..22d6a1e 100644 --- a/DevApp/Gs.DevApp/DevFrm/PDA/Frm_UserBind.Designer.cs +++ b/DevApp/Gs.DevApp/DevFrm/PDA/Frm_UserBind.Designer.cs @@ -1063,7 +1063,7 @@ this.Controls.Add(this.xtraTabControl1); this.Controls.Add(this.toolBarMenu1); this.Name = "Frm_UserBind"; - this.Text = "鐢ㄦ埛缁戝畾"; + this.Text = "PDA浜哄憳缁戝畾"; ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).EndInit(); this.xtraTabControl1.ResumeLayout(false); this.xtraTabPage1.ResumeLayout(false); diff --git a/DevApp/Gs.DevApp/DevFrm/PDA/Frm_UserBind.cs b/DevApp/Gs.DevApp/DevFrm/PDA/Frm_UserBind.cs index df6f25d..a567822 100644 --- a/DevApp/Gs.DevApp/DevFrm/PDA/Frm_UserBind.cs +++ b/DevApp/Gs.DevApp/DevFrm/PDA/Frm_UserBind.cs @@ -38,9 +38,14 @@ getPageList(1); pageBar1.PagerEvent += PageBar1_PagerEvent; } + /// <summary> + /// 浠庢暟鎹簱杩涜鎼滅储 + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> private void GridView1_ColumnFilterChanged(object sender, EventArgs e) { - Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1); + _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1); Task.Delay(100); getPageList(1); } @@ -145,7 +150,7 @@ } catch (Exception ex) { - MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); } } @@ -157,7 +162,7 @@ if (toolBarMenu1.currentAction == "edit") isEdit = true; if (string.IsNullOrEmpty(strGuid)) { - MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); + MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); return; } var _obj = new @@ -236,12 +241,12 @@ } else { - MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg); + MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg); } } catch (Exception ex) { - MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); } } @@ -347,16 +352,15 @@ var _rtn = UtilityHelper.ReturnToDynamic(strJson); if (_rtn.rtnCode > 0) { - if (_rtn.rtnCode > 0) - { - getModel(lbGuid.Text.Trim()); - } + MsgHelper.ShowInformation("鎻愮ず锛�" + _rtn.rtnMsg); + getModel(lbGuid.Text.Trim()); } - MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg); + else + MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg); } catch (Exception ex) { - MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); } } } diff --git a/DevApp/Gs.DevApp/DevFrm/PDA/SelectCk.cs b/DevApp/Gs.DevApp/DevFrm/PDA/SelectCk.cs index 4dd61fc..6d04959 100644 --- a/DevApp/Gs.DevApp/DevFrm/PDA/SelectCk.cs +++ b/DevApp/Gs.DevApp/DevFrm/PDA/SelectCk.cs @@ -55,22 +55,23 @@ bindGuidslist = sbList.ToString(), fType = "浠撳簱", }; - try { var strJson = UtilityHelper.HttpPost("", "MesSysPageviewManager/SetUserBind", JsonConvert.SerializeObject(_obj)); var _rtn = UtilityHelper.ReturnToDynamic(strJson); - MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnData.outMsg); if (_rtn.rtnCode > 0) { + MsgHelper.ShowInformation("鎻愮ず锛�" + _rtn.rtnData.outMsg); this.Close(); } + else + MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnData.outMsg); } catch (Exception ex) { - MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); } }; } @@ -109,7 +110,7 @@ } catch (Exception ex) { - MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); } } } diff --git a/DevApp/Gs.DevApp/DevFrm/PDA/SelectPage.cs b/DevApp/Gs.DevApp/DevFrm/PDA/SelectPage.cs index 97fb00a..8d2cc75 100644 --- a/DevApp/Gs.DevApp/DevFrm/PDA/SelectPage.cs +++ b/DevApp/Gs.DevApp/DevFrm/PDA/SelectPage.cs @@ -62,15 +62,17 @@ "MesSysPageviewManager/SetUserBind", JsonConvert.SerializeObject(_obj)); var _rtn = UtilityHelper.ReturnToDynamic(strJson); - MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnData.outMsg); if (_rtn.rtnCode > 0) { + MsgHelper.ShowInformation("鎻愮ず锛�" + _rtn.rtnData.outMsg); this.Close(); } + else + MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnData.outMsg); } catch (Exception ex) { - MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); } }; } @@ -110,9 +112,8 @@ } catch (Exception ex) { - MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); } } - } } \ No newline at end of file diff --git a/DevApp/Gs.DevApp/DevFrm/PDA/SelectPrint.cs b/DevApp/Gs.DevApp/DevFrm/PDA/SelectPrint.cs index a09266d..848c7a3 100644 --- a/DevApp/Gs.DevApp/DevFrm/PDA/SelectPrint.cs +++ b/DevApp/Gs.DevApp/DevFrm/PDA/SelectPrint.cs @@ -60,15 +60,18 @@ "MesSysPageviewManager/SetUserBind", JsonConvert.SerializeObject(_obj)); var _rtn = UtilityHelper.ReturnToDynamic(strJson); - MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnData.outMsg); + if (_rtn.rtnCode > 0) { + MsgHelper.ShowInformation("鎻愮ず锛�" + _rtn.rtnData.outMsg); this.Close(); } + else + MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnData.outMsg); } catch (Exception ex) { - MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); } }; } @@ -106,7 +109,7 @@ } catch (Exception ex) { - MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); } } } diff --git a/DevApp/Gs.DevApp/DevFrm/Sys/Frm_MesSysPageview.cs b/DevApp/Gs.DevApp/DevFrm/Sys/Frm_MesSysPageview.cs index 4a2f8c9..9783b84 100644 --- a/DevApp/Gs.DevApp/DevFrm/Sys/Frm_MesSysPageview.cs +++ b/DevApp/Gs.DevApp/DevFrm/Sys/Frm_MesSysPageview.cs @@ -64,10 +64,10 @@ private void ToolBarMenu1_btnDelClick1(object sender, EventArgs e) { string rowGuid = "", rowName = ""; - (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_pageView, gridView1); + (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_pageView, gridView1, "pageView"); if (string.IsNullOrEmpty(rowGuid)) { - ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); + ToolBox.MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); return; } if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾鍒犻櫎鍚楋紵")) @@ -81,17 +81,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); } } @@ -128,7 +130,7 @@ (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_pageView, gridView1); if (string.IsNullOrEmpty(rowGuid)) { - ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); + ToolBox.MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); return; } Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3); @@ -162,19 +164,19 @@ toolBarMenu1.isSetBtn = false; if (string.IsNullOrEmpty(txt_pageView.Text.Trim())) { - Gs.DevApp.ToolBox.MsgHelper.Warning("椤甸潰鍚嶇О涓嶈兘涓虹┖锛�"); + Gs.DevApp.ToolBox.MsgHelper.ShowError("椤甸潰鍚嶇О涓嶈兘涓虹┖锛�"); txt_pageView.Focus(); return; } if (string.IsNullOrEmpty(txt_path.Text.Trim())) { - Gs.DevApp.ToolBox.MsgHelper.Warning("璺緞涓嶈兘涓虹┖锛�"); + Gs.DevApp.ToolBox.MsgHelper.ShowError("璺緞涓嶈兘涓虹┖锛�"); txt_path.Focus(); return; } if (string.IsNullOrEmpty(txt_pageGroup.Text.Trim())) { - Gs.DevApp.ToolBox.MsgHelper.Warning("缁勫埆涓嶈兘涓虹┖锛�"); + Gs.DevApp.ToolBox.MsgHelper.ShowError("缁勫埆涓嶈兘涓虹┖锛�"); txt_pageGroup.Focus(); return; } @@ -191,19 +193,21 @@ { 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); } } @@ -240,7 +244,7 @@ } catch (Exception ex) { - ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); } } /// <summary> @@ -256,7 +260,7 @@ if (toolBarMenu1.currentAction == "edit") isEdit = true; if (string.IsNullOrEmpty(strGuid)) { - ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); + ToolBox.MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); return; } var _obj = new @@ -274,11 +278,11 @@ 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); } } diff --git a/DevApp/Gs.DevApp/DevFrm/Sys/Frm_PrintInfo.cs b/DevApp/Gs.DevApp/DevFrm/Sys/Frm_PrintInfo.cs index 2c92c67..80aa1f7 100644 --- a/DevApp/Gs.DevApp/DevFrm/Sys/Frm_PrintInfo.cs +++ b/DevApp/Gs.DevApp/DevFrm/Sys/Frm_PrintInfo.cs @@ -104,7 +104,7 @@ (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_printNo, gridView1); if (string.IsNullOrEmpty(rowGuid)) { - ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); + ToolBox.MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); return; } if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾鍒犻櫎鍚楋紵")) @@ -118,17 +118,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); } } @@ -165,7 +167,7 @@ (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_printNo, gridView1); if (string.IsNullOrEmpty(rowGuid)) { - ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); + ToolBox.MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); return; } Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3); @@ -200,25 +202,25 @@ toolBarMenu1.isSetBtn = false; if (string.IsNullOrEmpty(txt_printNo.Text.Trim())) { - Gs.DevApp.ToolBox.MsgHelper.Warning("缂栧彿涓嶈兘涓虹┖锛�"); + Gs.DevApp.ToolBox.MsgHelper.ShowError("缂栧彿涓嶈兘涓虹┖锛�"); txt_printNo.Focus(); return; } if (string.IsNullOrEmpty(txt_ip.Text.Trim())) { - Gs.DevApp.ToolBox.MsgHelper.Warning("IP涓嶈兘涓虹┖锛�"); + Gs.DevApp.ToolBox.MsgHelper.ShowError("IP涓嶈兘涓虹┖锛�"); txt_ip.Focus(); return; } if (string.IsNullOrEmpty(txt_port.Text.Trim())) { - Gs.DevApp.ToolBox.MsgHelper.Warning("绔彛涓嶈兘涓虹┖锛�"); + Gs.DevApp.ToolBox.MsgHelper.ShowError("绔彛涓嶈兘涓虹┖锛�"); txt_port.Focus(); return; } if (!validateIpAddress(txt_ip.Text.Trim())) { - MessageBox.Show("璇疯緭鍏ユ纭殑IP鍦板潃"); + ToolBox.MsgHelper.ShowError("璇疯緭鍏ユ纭殑IP鍦板潃"); txt_ip.Focus(); return; } @@ -234,19 +236,21 @@ { 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); } } @@ -306,7 +310,7 @@ if (toolBarMenu1.currentAction == "edit") isEdit = true; if (string.IsNullOrEmpty(strGuid)) { - ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); + ToolBox.MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); return; } var _obj = new @@ -324,11 +328,11 @@ 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); } } private bool validateIpAddress(string ip) diff --git a/DevApp/Gs.DevApp/Gs.DevApp.csproj b/DevApp/Gs.DevApp/Gs.DevApp.csproj index ffd9501..407c988 100644 --- a/DevApp/Gs.DevApp/Gs.DevApp.csproj +++ b/DevApp/Gs.DevApp/Gs.DevApp.csproj @@ -488,12 +488,6 @@ <Compile Include="DevFrm\PDA\Frm_UserBind.Designer.cs"> <DependentUpon>Frm_UserBind.cs</DependentUpon> </Compile> - <Compile Include="DevFrm\PDA\Frm_UserBindLst.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Include="DevFrm\PDA\Frm_UserBindLst.Designer.cs"> - <DependentUpon>Frm_UserBindLst.cs</DependentUpon> - </Compile> <Compile Include="DevFrm\PDA\SelectCk.cs"> <SubType>Form</SubType> </Compile> @@ -905,12 +899,6 @@ </Compile> <Compile Include="DevFrm\Sys\Frm_PrintInfo.Designer.cs"> <DependentUpon>Frm_PrintInfo.cs</DependentUpon> - </Compile> - <Compile Include="DevFrm\Sys\Frm_PrintUser.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Include="DevFrm\Sys\Frm_PrintUser.Designer.cs"> - <DependentUpon>Frm_PrintUser.cs</DependentUpon> </Compile> <Compile Include="DevFrm\Sys\Mode\PrintInfo.cs" /> <Compile Include="DevFrm\Sys\Mode\PrintUser.cs" /> @@ -1672,9 +1660,6 @@ <EmbeddedResource Include="DevFrm\PDA\Frm_UserBind.resx"> <DependentUpon>Frm_UserBind.cs</DependentUpon> </EmbeddedResource> - <EmbeddedResource Include="DevFrm\PDA\Frm_UserBindLst.resx"> - <DependentUpon>Frm_UserBindLst.cs</DependentUpon> - </EmbeddedResource> <EmbeddedResource Include="DevFrm\PDA\SelectCk.resx"> <DependentUpon>SelectCk.cs</DependentUpon> </EmbeddedResource> @@ -1846,9 +1831,6 @@ </EmbeddedResource> <EmbeddedResource Include="DevFrm\Sys\Frm_PrintInfo.resx"> <DependentUpon>Frm_PrintInfo.cs</DependentUpon> - </EmbeddedResource> - <EmbeddedResource Include="DevFrm\Sys\Frm_PrintUser.resx"> - <DependentUpon>Frm_PrintUser.cs</DependentUpon> </EmbeddedResource> <EmbeddedResource Include="DevFrm\Sys\SysHelp.resx"> <DependentUpon>SysHelp.cs</DependentUpon> -- Gitblit v1.9.3