From c2d73fe7167e6006acd69ad09491e75463eb611a Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期二, 12 十一月 2024 13:53:20 +0800 Subject: [PATCH] 各种细节 --- DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01Check.cs | 118 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 117 insertions(+), 1 deletions(-) diff --git a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01Check.cs b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01Check.cs index e21b553..1cad83f 100644 --- a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01Check.cs +++ b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01Check.cs @@ -5,8 +5,10 @@ using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; +using System.Configuration; using System.Data; using System.Drawing; +using System.Net; using System.Windows.Forms; using static DevExpress.XtraPrinting.Native.PageSizeInfo; @@ -127,6 +129,28 @@ (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_releaseNo, gridView1); toolBarMenu1.guidKey = rowGuid; + + if (string.IsNullOrEmpty(rowGuid)) + { + ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); + return; + } + + if (!MsgHelper.AskQuestion("浣犻�夋嫨浜�1鏉℃暟鎹紝纭畾瑕侀┏鍥炲悧锛�")) + return; + + try + { + var strJson = UtilityHelper.HttpPost("", _webServiceName + "IqcQcSubmit13", + JsonConvert.SerializeObject(rowGuid)); + var _rtn = UtilityHelper.ReturnToDynamic(strJson); + + MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg); + } + catch (Exception ex) + { + MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + } } /// <summary> /// 閲囪喘鍙嶅鏍� @@ -140,6 +164,28 @@ (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_releaseNo, gridView1); toolBarMenu1.guidKey = rowGuid; + + if (string.IsNullOrEmpty(rowGuid)) + { + ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); + return; + } + + if (!MsgHelper.AskQuestion("浣犻�夋嫨浜�1鏉℃暟鎹紝纭畾瑕侀噰璐弽瀹℃牳鍚楋紵")) + return; + + try + { + var strJson = UtilityHelper.HttpPost("", _webServiceName + "IqcQcSubmit12", + JsonConvert.SerializeObject(rowGuid)); + var _rtn = UtilityHelper.ReturnToDynamic(strJson); + + MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg); + } + catch (Exception ex) + { + MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + } } /// <summary> /// 閲囪喘瀹℃牳 @@ -153,6 +199,28 @@ (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_releaseNo, gridView1); toolBarMenu1.guidKey = rowGuid; + + if (string.IsNullOrEmpty(rowGuid)) + { + ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); + return; + } + + if (!MsgHelper.AskQuestion("浣犻�夋嫨浜�1鏉℃暟鎹紝纭畾瑕侀噰璐鏍稿悧锛�")) + return; + + try + { + var strJson = UtilityHelper.HttpPost("", _webServiceName + "IqcQcCGAudit", + JsonConvert.SerializeObject(rowGuid)); + var _rtn = UtilityHelper.ReturnToDynamic(strJson); + + MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg); + } + catch (Exception ex) + { + MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + } } /// <summary> /// 璐ㄩ噺鍙嶅鏍� @@ -444,8 +512,56 @@ return; if (e.Button.Index == 0) { - MsgHelper.Warning("鎻愮ず锛�" + "寮�鍙戜腑"); + try + { + var dr = gvMx3.GetDataRow(rowhandle); + var urlPath = dr["urlPath"].ToString(); + Gs.DevApp.UserControl.ShowFile frm = new ShowFile(urlPath); + frm.ShowDialog(); + } + catch (Exception ex) + { + Gs.DevApp.ToolBox.MsgHelper.ShowError(ex.Message); + } + } } + + private void repositoryItemButtonEdit3_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) + { + var rowhandle = gvMx3.FocusedRowHandle; + if (rowhandle < 0) + return; + if (e.Button.Index == 0) + { + try + { + var dr = gvMx3.GetDataRow(rowhandle); + var urlPath = dr["urlPath"].ToString(); + using (FolderBrowserDialog folderBrowserDialog = new FolderBrowserDialog()) + { + folderBrowserDialog.Description = "閫夋嫨瀵煎嚭鏂囦欢鐨勪繚瀛樿矾寰�"; + DialogResult dialogResult = folderBrowserDialog.ShowDialog(); + if (dialogResult == DialogResult.OK) + { + string _folder = folderBrowserDialog.SelectedPath; + string _folderName = _folder + "\\" + urlPath; + string _url = ConfigurationManager.AppSettings["WebApiUrl"].ToString() + "upload/" + urlPath; + using (WebClient client = new WebClient()) + { + client.DownloadFile(_url, _folderName); + } + ToolBox.MsgHelper.ShowInformation("涓嬭浇鎴愬姛锛�"); + } + } + } + catch (Exception ex) + { + Gs.DevApp.ToolBox.MsgHelper.ShowError(ex.Message); + } + + } + + } } } \ No newline at end of file -- Gitblit v1.9.3