lu
2025-03-15 0c6e45643cddd0fc8a28032f6fd7a307186c3605
样本
已修改3个文件
181 ■■■■ 文件已修改
DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.Designer.cs 63 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs 33 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01Input.cs 85 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.Designer.cs
@@ -37,16 +37,16 @@
            DevExpress.XtraLayout.RowDefinition rowDefinition2 = new DevExpress.XtraLayout.RowDefinition();
            DevExpress.XtraLayout.RowDefinition rowDefinition3 = new DevExpress.XtraLayout.RowDefinition();
            DevExpress.XtraLayout.RowDefinition rowDefinition4 = new DevExpress.XtraLayout.RowDefinition();
            DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions1 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject1 = new DevExpress.Utils.SerializableAppearanceObject();
            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject2 = new DevExpress.Utils.SerializableAppearanceObject();
            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject3 = new DevExpress.Utils.SerializableAppearanceObject();
            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject4 = new DevExpress.Utils.SerializableAppearanceObject();
            DevExpress.XtraLayout.ColumnDefinition columnDefinition5 = new DevExpress.XtraLayout.ColumnDefinition();
            DevExpress.XtraLayout.ColumnDefinition columnDefinition6 = new DevExpress.XtraLayout.ColumnDefinition();
            DevExpress.XtraLayout.ColumnDefinition columnDefinition7 = new DevExpress.XtraLayout.ColumnDefinition();
            DevExpress.XtraLayout.ColumnDefinition columnDefinition8 = new DevExpress.XtraLayout.ColumnDefinition();
            DevExpress.XtraLayout.RowDefinition rowDefinition5 = new DevExpress.XtraLayout.RowDefinition();
            DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions1 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject1 = new DevExpress.Utils.SerializableAppearanceObject();
            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject2 = new DevExpress.Utils.SerializableAppearanceObject();
            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject3 = new DevExpress.Utils.SerializableAppearanceObject();
            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject4 = new DevExpress.Utils.SerializableAppearanceObject();
            DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions2 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject5 = new DevExpress.Utils.SerializableAppearanceObject();
            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject6 = new DevExpress.Utils.SerializableAppearanceObject();
@@ -57,11 +57,6 @@
            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject10 = new DevExpress.Utils.SerializableAppearanceObject();
            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject11 = new DevExpress.Utils.SerializableAppearanceObject();
            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject12 = new DevExpress.Utils.SerializableAppearanceObject();
            DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions4 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject13 = new DevExpress.Utils.SerializableAppearanceObject();
            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject14 = new DevExpress.Utils.SerializableAppearanceObject();
            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject15 = new DevExpress.Utils.SerializableAppearanceObject();
            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject16 = new DevExpress.Utils.SerializableAppearanceObject();
            this.repositoryItemComboBox1 = new DevExpress.XtraEditors.Repository.RepositoryItemComboBox();
            this.toolBarMenu1 = new Gs.DevApp.UserControl.UcToolBarMenu();
            this.xtraTabControl1 = new DevExpress.XtraTab.XtraTabControl();
@@ -157,8 +152,6 @@
            this.gvMx1sampleSizeNo = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gvMx1fcheckLevel = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gvMx1facLevel = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn21 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.repositoryItemButtonEdit4 = new DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit();
            this.splitYangLi = new DevExpress.XtraEditors.SplitContainerControl();
            this.groupControl1 = new DevExpress.XtraEditors.GroupControl();
            this.gcMx2 = new DevExpress.XtraGrid.GridControl();
@@ -271,7 +264,6 @@
            this.splitMx2.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.gcMx1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.gvMx1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.repositoryItemButtonEdit4)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.splitYangLi)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.splitYangLi.Panel1)).BeginInit();
            this.splitYangLi.Panel1.SuspendLayout();
@@ -1292,8 +1284,6 @@
            this.gcMx1.Location = new System.Drawing.Point(0, 0);
            this.gcMx1.MainView = this.gvMx1;
            this.gcMx1.Name = "gcMx1";
            this.gcMx1.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] {
            this.repositoryItemButtonEdit4});
            this.gcMx1.Size = new System.Drawing.Size(1340, 201);
            this.gcMx1.TabIndex = 1;
            this.gcMx1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
@@ -1321,8 +1311,7 @@
            this.gvMx1fngQty,
            this.gvMx1sampleSizeNo,
            this.gvMx1fcheckLevel,
            this.gvMx1facLevel,
            this.gridColumn21});
            this.gvMx1facLevel});
            this.gvMx1.GridControl = this.gcMx1;
            this.gvMx1.Name = "gvMx1";
            this.gvMx1.OptionsBehavior.AllowAddRows = DevExpress.Utils.DefaultBoolean.False;
@@ -1552,26 +1541,6 @@
            this.gvMx1facLevel.VisibleIndex = 15;
            this.gvMx1facLevel.Width = 200;
            // 
            // gridColumn21
            //
            this.gridColumn21.Caption = "清空";
            this.gridColumn21.ColumnEdit = this.repositoryItemButtonEdit4;
            this.gridColumn21.MinWidth = 25;
            this.gridColumn21.Name = "gridColumn21";
            this.gridColumn21.Visible = true;
            this.gridColumn21.VisibleIndex = 16;
            this.gridColumn21.Width = 94;
            //
            // repositoryItemButtonEdit4
            //
            this.repositoryItemButtonEdit4.AutoHeight = false;
            editorButtonImageOptions1.Image = global::Gs.DevApp.Properties.Resources.refresh_16x16;
            editorButtonImageOptions1.ImageToTextAlignment = DevExpress.XtraEditors.ImageAlignToText.LeftCenter;
            this.repositoryItemButtonEdit4.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "清空", -1, true, true, false, editorButtonImageOptions1, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject1, serializableAppearanceObject2, serializableAppearanceObject3, serializableAppearanceObject4, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
            this.repositoryItemButtonEdit4.Name = "repositoryItemButtonEdit4";
            this.repositoryItemButtonEdit4.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.HideTextEditor;
            //
            // splitYangLi
            // 
            this.splitYangLi.Dock = System.Windows.Forms.DockStyle.Fill;
@@ -1656,7 +1625,6 @@
            // gridColumn20
            // 
            this.gridColumn20.Caption = "判定标志";
            this.gridColumn20.ColumnEdit = this.repositoryItemComboBox1;
            this.gridColumn20.FieldName = "fstand";
            this.gridColumn20.MinWidth = 25;
            this.gridColumn20.Name = "gridColumn20";
@@ -1977,9 +1945,9 @@
            // repositoryItemButtonEdit2
            // 
            this.repositoryItemButtonEdit2.AutoHeight = false;
            editorButtonImageOptions2.ImageToTextAlignment = DevExpress.XtraEditors.ImageAlignToText.LeftCenter;
            editorButtonImageOptions1.ImageToTextAlignment = DevExpress.XtraEditors.ImageAlignToText.LeftCenter;
            this.repositoryItemButtonEdit2.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "浏览", -1, true, true, false, editorButtonImageOptions2, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject5, serializableAppearanceObject6, serializableAppearanceObject7, serializableAppearanceObject8, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "浏览", -1, true, true, false, editorButtonImageOptions1, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject1, serializableAppearanceObject2, serializableAppearanceObject3, serializableAppearanceObject4, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
            this.repositoryItemButtonEdit2.Name = "repositoryItemButtonEdit2";
            this.repositoryItemButtonEdit2.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.HideTextEditor;
            // 
@@ -1996,10 +1964,10 @@
            // repositoryItemButtonEdit3
            // 
            this.repositoryItemButtonEdit3.AutoHeight = false;
            editorButtonImageOptions3.Image = global::Gs.DevApp.Properties.Resources.download_16x16;
            editorButtonImageOptions3.ImageToTextAlignment = DevExpress.XtraEditors.ImageAlignToText.LeftCenter;
            editorButtonImageOptions2.Image = global::Gs.DevApp.Properties.Resources.download_16x16;
            editorButtonImageOptions2.ImageToTextAlignment = DevExpress.XtraEditors.ImageAlignToText.LeftCenter;
            this.repositoryItemButtonEdit3.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "下载", -1, true, true, false, editorButtonImageOptions3, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject9, serializableAppearanceObject10, serializableAppearanceObject11, serializableAppearanceObject12, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "下载", -1, true, true, false, editorButtonImageOptions2, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject5, serializableAppearanceObject6, serializableAppearanceObject7, serializableAppearanceObject8, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
            this.repositoryItemButtonEdit3.Name = "repositoryItemButtonEdit3";
            this.repositoryItemButtonEdit3.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.HideTextEditor;
            // 
@@ -2016,10 +1984,10 @@
            // repositoryItemButtonEdit1
            // 
            this.repositoryItemButtonEdit1.AutoHeight = false;
            editorButtonImageOptions4.Image = global::Gs.DevApp.Properties.Resources.removegroupfooter_16x16;
            editorButtonImageOptions4.ImageToTextAlignment = DevExpress.XtraEditors.ImageAlignToText.LeftCenter;
            editorButtonImageOptions3.Image = global::Gs.DevApp.Properties.Resources.removegroupfooter_16x16;
            editorButtonImageOptions3.ImageToTextAlignment = DevExpress.XtraEditors.ImageAlignToText.LeftCenter;
            this.repositoryItemButtonEdit1.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "删除", -1, true, true, false, editorButtonImageOptions4, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject13, serializableAppearanceObject14, serializableAppearanceObject15, serializableAppearanceObject16, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "删除", -1, true, true, false, editorButtonImageOptions3, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject9, serializableAppearanceObject10, serializableAppearanceObject11, serializableAppearanceObject12, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
            this.repositoryItemButtonEdit1.Name = "repositoryItemButtonEdit1";
            this.repositoryItemButtonEdit1.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.HideTextEditor;
            // 
@@ -2142,7 +2110,6 @@
            this.splitMx2.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.gcMx1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.gvMx1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.repositoryItemButtonEdit4)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.splitYangLi.Panel1)).EndInit();
            this.splitYangLi.Panel1.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.splitYangLi.Panel2)).EndInit();
@@ -2307,8 +2274,6 @@
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem11;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem20;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem19;
        private DevExpress.XtraGrid.Columns.GridColumn gridColumn21;
        private DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit repositoryItemButtonEdit4;
        private DevExpress.XtraGrid.Columns.GridColumn gridColumn20;
        private DevExpress.XtraEditors.Repository.RepositoryItemComboBox repositoryItemComboBox1;
        private DevExpress.XtraEditors.SplitContainerControl splitYangLi;
DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs
@@ -140,9 +140,11 @@
                string _strCmd = txtJianYan.Text.Trim().ToUpper();
                string _strOK = "OK";
                string _strNG = "NG";
                int n = 0;
                if ((_strCmd.StartsWith(_strOK) || _strCmd.StartsWith(_strNG)))
                if (!(_strCmd.StartsWith(_strOK) || _strCmd.StartsWith(_strNG)))
                {
                    Gs.DevApp.ToolBox.MsgHelper.ShowError("命令输入错误:请正确使用OK 或 NG 命令!");
                    return;
                }
                    if (!_strCmd.Contains("-"))
                    {
                        Gs.DevApp.ToolBox.MsgHelper.ShowError("命令输入错误:请正确使用OK 或 NG 命令!");
@@ -151,35 +153,8 @@
                    string[] _ary = _strCmd.Split('-');
                    if (_ary.Length != 2)
                    {
                        Gs.DevApp.ToolBox.MsgHelper.ShowError("命令输入错误::请正确使用OK 或  NG 命令!");
                        return;
                    }
                    string _str1 = _ary[0];
                    if (!(_str1 == _strOK || _str1 == _strNG))
                    {
                        Gs.DevApp.ToolBox.MsgHelper.ShowError("命令输入错误:请正确使用OK 或  NG 命令!");
                        return;
                    }
                    string _str2 = _ary[1];
                    if (int.TryParse(_str2, out n))
                    {
                    }
                    else
                    {
                        Gs.DevApp.ToolBox.MsgHelper.ShowError("命令输入错误:请正确使用OK 或  NG 命令!");
                        return;
                    }
                }
                else
                {
                    if (int.TryParse(_strCmd, out n))
                    {
                    }
                    else
                    {
                        Gs.DevApp.ToolBox.MsgHelper.ShowError("命令输入错误:请正确使用OK 或  NG 命令!");
                        return;
                    }
                }
                var _obj = new
                {
DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01Input.cs
@@ -1,23 +1,9 @@
using DevExpress.Utils;
using DevExpress.Utils.DirectXPaint;
using DevExpress.XtraGrid.Columns;
using DevExpress.XtraGrid.Views.Grid;
using DevExpress.XtraPrinting.Native;
using DevExpress.XtraRichEdit.Layout;
using Gs.DevApp.DevFrm.QC;
using Gs.DevApp.Entity;
using Gs.DevApp.Entity;
using Gs.DevApp.ToolBox;
using Gs.DevApp.UserControl;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Drawing;
using System.Net;
using System.Threading.Tasks;
using System.Web.UI.WebControls;
using System.Windows.Forms;
namespace Gs.DevApp.DevFrm.QC
@@ -37,41 +23,40 @@
            gvMx1.CustomDrawCell += GvMx1_CustomDrawCell;
        }
        private void GvMx1_CustomDrawCell(object sender, DevExpress.XtraGrid.Views.Base.RowCellCustomDrawEventArgs e)
        /// <summary>
        /// 判断单元格的编辑性
        /// </summary>
        /// <param name="Column"></param>
        /// <param name="_maxYbs"></param>
        /// <returns></returns>
        private bool ckCol(string ColumnName, string _maxYbs)
        {
            // 判断单元格是否符合条件 && e.CellValue.ToString() == "YourCondition"
            bool _bl = false;
            string _FieldName = e.Column.FieldName;
            //if (e.Column.FieldName == "样本数")
            //{
            //    _bl = true;
            //}
            //e.Appearance.BackColor = Color.LightBlue; // 设置背景色
            if (_FieldName.Contains("样"))
            {
            string _FieldName = ColumnName;
            if (!_FieldName.Contains("样本"))
                return false;
                if (_FieldName == "样本数")
                    _bl = true;
                else
                {
                    string _maxYbs = (gvMx1.GetRowCellValue(e.RowHandle, "样本数").ToString());
                return true;
            if (string.IsNullOrEmpty(_maxYbs))
                return false;
                    string _seqYb = _FieldName.Replace("样本", "");
                    if (int.Parse(_seqYb) > int.Parse(_maxYbs))
                        _bl = false;
                    else
                        _bl = true;
                return false;
            return true;
                }
        private void GvMx1_CustomDrawCell(object sender, DevExpress.XtraGrid.Views.Base.RowCellCustomDrawEventArgs e)
        {
            string _maxYbs = (gvMx1.GetRowCellValue(e.RowHandle, "样本数").ToString());
            bool _bl = ckCol(e.Column.FieldName, _maxYbs);
            if (_bl)
            {
                e.Appearance.BackColor = Color.Azure;
                e.Column.MinWidth = 50;
            }
            else
            {
                _bl = false;
            }
            if (_bl) {
              e.Appearance.BackColor = Color.Azure;
                e.Column.MinWidth = 50;
             //e.Appearance.BackColor2 = Color.LightSkyBlue;
            }
            else
                e.Appearance.BackColor = Color.LightGray;
            }
        }
        private void GvMx1_CellValueChanged(object sender, DevExpress.XtraGrid.Views.Base.CellValueChangedEventArgs e)
@@ -124,24 +109,10 @@
        private void GvMx1_ShowingEditor(object sender, System.ComponentModel.CancelEventArgs e)
        {
            DevExpress.XtraGrid.Views.Grid.GridView view = sender as DevExpress.XtraGrid.Views.Grid.GridView;
            string _FieldName = view.FocusedColumn.FieldName;
            if (view.FocusedColumn.FieldName.Contains("样"))
            {
                if (_FieldName == "样本数")
                    e.Cancel = false;
                else
                {
                    string _maxYbs = (gvMx1.GetRowCellValue(view.FocusedRowHandle, "样本数").ToString());
                    string _seqYb = _FieldName.Replace("样本", "");
                    if (int.Parse(_seqYb) > int.Parse(_maxYbs))
            bool _bl = ckCol(view.FocusedColumn.FieldName, _maxYbs);
            if (!_bl)
                        e.Cancel = true;
                }
            }
            else
            {
                e.Cancel = true;
            }
        }
        private void getModel()