From 0bab28c7959335969f6d07c3cb33acbeffed1de5 Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期五, 29 十一月 2024 17:34:52 +0800 Subject: [PATCH] 1 --- DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womcaa.cs | 62 +++++++++++++++++++++++------- 1 files changed, 47 insertions(+), 15 deletions(-) diff --git a/DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womcaa.cs b/DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womcaa.cs index 404f47d..5367a9a 100644 --- a/DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womcaa.cs +++ b/DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womcaa.cs @@ -1,5 +1,6 @@ using Gs.DevApp.Entity; using Gs.DevApp.ToolBox; +using Gs.DevApp.UserControl; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using System; @@ -17,6 +18,7 @@ public Frm_Womcaa() { InitializeComponent(); + toolBarMenu1.btnEdtClick += ToolBarMenu1_btnEdtClick; this.toolBarMenu1.btnLoadClick += ToolBarMenu1_btnLoadClick; this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick; this.toolBarMenu1.btnJieAnClick += ToolBarMenu1_btnJieAnClick; @@ -97,26 +99,31 @@ getPageList(1, UtilityHelper.GetPageSize()); } /// <summary> - /// 鍙嶇粨妗� + /// 淇敼浜嬩欢 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> - /// <exception cref="NotImplementedException"></exception> - private void ToolBarMenu1_btnFjieAnClick(object sender, EventArgs e) + private void ToolBarMenu1_btnEdtClick(object sender, EventArgs e) { - string rowGuid, rowName; + string rowGuid = "", rowName = ""; (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, - lbGuid, txt_caa001, gridView1, 2); + lbGuid, txt_caa001, gridView1); if (string.IsNullOrEmpty(rowGuid)) { MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); return; } - - if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + - "銆戯紝纭畾鍙嶇粨妗堝悧锛�")) - return; - + getModel(rowGuid, true, 1); + } + /// <summary> + /// 鍙嶇粨妗� + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + /// <exception cref="NotImplementedException"></exception> + private async void ToolBarMenu1_btnFjieAnClick(object sender, EventArgs e) + { + } /// <summary> /// 缁撴 @@ -124,20 +131,45 @@ /// <param name="sender"></param> /// <param name="e"></param> /// <exception cref="NotImplementedException"></exception> - private void ToolBarMenu1_btnJieAnClick(object sender, EventArgs e) + private async void ToolBarMenu1_btnJieAnClick(object sender, EventArgs e) { + toolBarMenu1.guidKey = ""; string rowGuid, rowName; (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, - lbGuid, txt_caa001, gridView1, 2); + lbGuid, txt_caa001, gridView1); + toolBarMenu1.guidKey = rowGuid; if (string.IsNullOrEmpty(rowGuid)) { MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); return; } - - if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + - "銆戯紝纭畾缁撴鍚楋紵")) + if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾鎻愪氦妫�楠屽悧锛�")) return; + UcLoading _loading = new UcLoading(); + var _obj = new + { + guid = rowGuid, + }; + try + { + var strJson = await UtilityHelper.HttpPostAsync("", + _webServiceName + "EditModelSubmit", + JsonConvert.SerializeObject(_obj)); + var _rtn = UtilityHelper.ReturnToDynamic(strJson); + MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnData.outMsg); + if (_rtn.rtnCode > 0) + { + if (xtraTabControl1.SelectedTabPageIndex == 1) + getModel(lbGuid.Text.Trim(), false, 999); + else + getPageList(1, UtilityHelper.GetPageSize()); + } + } + catch (Exception ex) + { + MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + } + _loading.Stop(); } /// <summary> -- Gitblit v1.9.3