1
lu
2024-11-17 819573ad118c73c49118aaeb9f9d21438943e230
DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs
@@ -1,3 +1,4 @@
using DevExpress.XtraGrid.Views.Grid.ViewInfo;
using Gs.DevApp.Entity;
using Gs.DevApp.ToolBox;
using Gs.DevApp.UserControl;
@@ -16,6 +17,7 @@
{
    public partial class Frm_MesQaItemsDetect01 : DevExpress.XtraEditors.XtraForm
    {
        string _currentRowGuid = "";
        string _webServiceName = "MesQaItemsDetect01Manager/";
        List<FilterEntity> _filterList = new List<FilterEntity>();
        public Frm_MesQaItemsDetect01()
@@ -87,6 +89,7 @@
            string rowGuid = Gs.DevApp.ToolBox.UtilityHelper.GetCurrentDoubleRow(gvMx1, e, "guid");
            if (string.IsNullOrEmpty(rowGuid))
                return;
            this._currentRowGuid = rowGuid;
            getList12(rowGuid);
        }
@@ -113,29 +116,9 @@
            {
                string strJson = UtilityHelper.HttpPost("", _webServiceName + "ReloadModel5", JsonConvert.SerializeObject(_obj));
                ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson);
                Gs.DevApp.ToolBox.MsgHelper.ShowInformation(_rtn.rtnMsg);
                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();
                        getList12(dt.Rows[0]["guid"].ToString());
                    }
                    else
                    {
                        Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx1, gvMx1);
                    }
                    getModel(lbGuid.Text.Trim(), false, 999);
                }
            }
            catch (Exception ex)
@@ -192,13 +175,16 @@
                        return;
                    }
                }
                if (int.TryParse(_strCmd, out n))
                {
                }
                else
                {
                    Gs.DevApp.ToolBox.MsgHelper.ShowError("命令输入错误:请正确使用OK 或  NG 命令!");
                    return;
                    if (int.TryParse(_strCmd, out n))
                    {
                    }
                    else
                    {
                        Gs.DevApp.ToolBox.MsgHelper.ShowError("命令输入错误:请正确使用OK 或  NG 命令!");
                        return;
                    }
                }
                var _obj = new
                {
@@ -539,6 +525,10 @@
                        gcMx1.BindingContext = new BindingContext();
                        gcMx1.DataSource = dt;
                        gcMx1.ForceInitialize();
                        if (!string.IsNullOrEmpty(_currentRowGuid))
                            gvMx1.FocusedRowHandle = gvMx1.LocateByValue(0, gvMx1.Columns["gvMx1guid"], _currentRowGuid);
                        ucUpFile1.parentGuid = lbGuid.Text.Trim();
                        getList12(dt.Rows[0]["guid"].ToString());
                    }