From 2ea047bd801dd9c0f5ed693be452ee67aa8b5ff3 Mon Sep 17 00:00:00 2001
From: 啊鑫 <t2856754968@163.com>
Date: 星期一, 11 十一月 2024 19:35:17 +0800
Subject: [PATCH] 质量审核上的五个按钮

---
 DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01Check.cs |  163 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 162 insertions(+), 1 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01Check.cs b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01Check.cs
index 1dc64ea..1cad83f 100644
--- a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01Check.cs
+++ b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01Check.cs
@@ -5,9 +5,12 @@
 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;
 
 namespace Gs.DevApp.DevFrm.QC
 {
@@ -126,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>
         /// 閲囪喘鍙嶅鏍�
@@ -139,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>
         /// 閲囪喘瀹℃牳
@@ -152,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>
         /// 璐ㄩ噺鍙嶅鏍�
@@ -165,6 +234,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 + "IqcQcSubmit11",
+                    JsonConvert.SerializeObject(rowGuid));
+                var _rtn = UtilityHelper.ReturnToDynamic(strJson);
+
+                MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
+            }
+            catch (Exception ex)
+            {
+                MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+            }
         }
         /// <summary>
         /// 璐ㄩ噺瀹℃牳
@@ -178,6 +269,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 + "IqcQcSubmit",
+                    JsonConvert.SerializeObject(rowGuid));
+                var _rtn = UtilityHelper.ReturnToDynamic(strJson);
+
+                MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
+            }
+            catch (Exception ex)
+            {
+                MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+            }
         }
 
         /// <summary>
@@ -399,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