From 4d8b3deb28a4bd7125a1d26f078fe207d4410c5e Mon Sep 17 00:00:00 2001
From: 啊鑫 <t2856754968@163.com>
Date: 星期二, 05 十一月 2024 14:13:06 +0800
Subject: [PATCH] 11

---
 DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs |  108 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 106 insertions(+), 2 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs
index c37f659..5a3b3ff 100644
--- a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs
+++ b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs
@@ -1,9 +1,11 @@
 using DevExpress.DataAccess.Wizard.Model;
 using DevExpress.XtraGrid.Views.Grid;
 using DevExpress.XtraGrid.Views.Grid.ViewInfo;
+using DevExpress.XtraLayout.Customization;
 using Gs.DevApp.Entity;
 using Gs.DevApp.ToolBox;
 using Gs.DevApp.UserControl;
+using MES.Service.Modes;
 using Newtonsoft.Json;
 using Newtonsoft.Json.Linq;
 using System;
@@ -33,7 +35,8 @@
             this.toolBarMenu1.btnDelClick += ToolBarMenu1_btnDelClick1;
             this.toolBarMenu1.btnEscClick += ToolBarMenu1_btnEscClick;
             this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick;
-            this.toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick;
+            toolBarMenu1.btnLogClick += ToolBarMenu1_btnLogClick;
+            toolBarMenu1.btnJianYanClick += ToolBarMenu1_btnJianYanClick;
             gcMain.MouseDoubleClick += GcMain_MouseDoubleClick;
             gvMx1.FocusedRowChanged += GvMx1_FocusedRowChanged;
             getPageList(1, UtilityHelper.GetPageSize());
@@ -60,6 +63,58 @@
             gvMx2.OptionsView.ShowGroupPanel = false;
             _setIno();
             txtJianYan.KeyDown += TxtJianYan_KeyDown;
+            this.btnLoad.Click += BtnLoad_Click;
+        }
+
+        private void BtnLoad_Click(object sender, EventArgs e)
+        {
+            if (!MsgHelper.AskQuestion("纭畾閲嶆柊鍔犺浇妫�楠岄」鐩悧锛�"))
+                return;
+            string strGuid = lbGuid.Text.Trim();
+            if (string.IsNullOrEmpty(strGuid))
+            {
+                ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+                return;
+            }
+            var _obj = new
+            {
+                guid = strGuid,//涓诲缓
+            };
+            try
+            {
+                string strJson = UtilityHelper.HttpPost("", _webServiceName + "GetCheckResultList15Reload", JsonConvert.SerializeObject(_obj));
+                ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson);
+                if (_rtn.rtnCode > 0)
+                {
+                    dynamic dy = _rtn.rtnData;
+                    lbGuid.Text = strGuid;
+                    JObject _job = JObject.Parse(strJson);
+                    JArray array = new JArray();
+                    foreach (var a in _job["rtnData"]["list5"])
+                    {
+                        array.Add(a);
+                    }
+                    DataTable dt = JsonConvert.DeserializeObject<DataTable>(array.ToString());
+                    if (dt.Rows.Count > 0)
+                    {
+                        gcMx1.BindingContext = new BindingContext();
+                        gcMx1.DataSource = dt;
+                        gcMx1.ForceInitialize();
+                    }
+                    else
+                    {
+                        Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx1, gvMx1);
+                    }
+                }
+                else
+                    ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
+            }
+            catch (Exception ex)
+            {
+                ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+            }
+
+
         }
 
         private void TxtJianYan_KeyDown(object sender, KeyEventArgs e)
@@ -107,6 +162,38 @@
                     gvMx2.SetRowCellValue(i, "fcheckResu", _str1);
                     gvMx2.SetRowCellValue(i, "fstand", _str1);
                 }
+                List<MesQaItemsDetectDetail12> lst = new List<MesQaItemsDetectDetail12>();
+                for (var i = 0; i < gvMx2.DataRowCount; i++)
+                {
+                    var row = gvMx2.GetDataRow(i);
+                    if (row != null)
+                        lst.Add(new MesQaItemsDetectDetail12()
+                        {
+                            ParentGuid= UtilityHelper.ToGuid(labCurrentGuid.Text.Trim()),
+                            Guid = UtilityHelper.ToGuid(row["guid"].ToString()),
+                            FcheckResu = row["fcheckResu"].ToString(),
+                            //Fstand = row["fstand"].ToString(),
+                            FcheckItem = labCurrentItem.Text.Trim(),
+                            GrandpaGuid = UtilityHelper.ToGuid(lbGuid.Text.Trim()),
+                        });
+                }
+                var _obj = lst;
+                try
+                {
+                    var strJson = UtilityHelper.HttpPost("",
+                        _webServiceName + "EdtModelDetail12",
+                        JsonConvert.SerializeObject(_obj));
+                    var _rtn = UtilityHelper.ReturnToDynamic(strJson);
+                    MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
+                    if (_rtn.rtnCode > 0)
+                    {
+
+                    }
+                }
+                catch (Exception ex)
+                {
+                    MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+                }
             }
         }
 
@@ -151,7 +238,7 @@
             _filterList = e.FilterList;
             getPageList(1, pageBar1.RowsCount);
         }
-        private void ToolBarMenu1_btnChkClick(object sender, EventArgs e)
+        private void ToolBarMenu1_btnLogClick(object sender, EventArgs e)
         {
             toolBarMenu1.guidKey = "";
             string rowGuid, rowName;
@@ -159,6 +246,21 @@
                 lbGuid, txt_releaseNo, gridView1);
             toolBarMenu1.guidKey = rowGuid;
         }
+        /// <summary>
+        ///     妫�楠�
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        /// <exception cref="NotImplementedException"></exception>
+        private void ToolBarMenu1_btnJianYanClick(object sender, EventArgs e)
+        {
+            toolBarMenu1.guidKey = "";
+            string rowGuid, rowName;
+            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
+                lbGuid, txt_releaseNo, gridView1);
+            toolBarMenu1.guidKey = rowGuid;
+        }
+
         /// <summary>
         /// 鍙栨秷浜嬩欢
         /// </summary>
@@ -460,6 +562,8 @@
         {
             var myDataRow = gvMx1.GetDataRow(e.FocusedRowHandle);
             if (myDataRow == null) return;
+            labCurrentItem.Text = myDataRow["fcheckItem"].ToString();
+            labCurrentGuid.Text = myDataRow["guid"].ToString();
             var _obj = new
             {
                 parentGuid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //涓诲缓

--
Gitblit v1.9.3