lu
2025-06-02 a80c1ccadaa85132c7ac26474e7aab3da7706cbc
DevApp/Gs.DevApp/DevFrm/QC/Frm_MesDefectCodeShow.cs
@@ -4,6 +4,7 @@
using Newtonsoft.Json;
using System;
using System.Data;
using System.Text;
namespace Gs.DevApp.DevFrm.QC
@@ -12,21 +13,30 @@
    {
        string strGuid = "";
        string strUpGuid = "";
        string  strType = "";//类别(普通信息,认证信息)
        string _webServiceName = "MesDefectCodeManager/";
        public Frm_MesDefectCodeShow(string _strGuid, string _strUpGuid)
        /// <summary>
        ///
        /// </summary>
        /// <param name="_strGuid">主键</param>
        /// <param name="_strUpGuid">父亲主键</param>
        /// <param name="_strType">类别</param>
        public Frm_MesDefectCodeShow(string _strGuid, string _strUpGuid, string _strType)
        {
            InitializeComponent();
            getSelect();
            this.strGuid = _strGuid;
            this.strUpGuid = _strUpGuid;
            this.strType = _strType;
            getSelect();
            //这是更新
            if (!string.IsNullOrEmpty(this.strGuid))
            {
                getMode(strGuid);
                this.Text = "更新【" + txt_defectName.Text + "】";
                txt_sType.Enabled = false;
                txt_defectCode.Enabled = false;
                txt_defectCode.ReadOnly = true;
                return;
            }
            //这是增加子项
@@ -35,7 +45,7 @@
                getMode(strUpGuid);
                this.Text = "增加【" + txt_defectName.Text + "】的子项目";
                txt_sType.Enabled = false;
                txt_defectCode.Enabled = true;
                txt_defectCode.ReadOnly = false;
                txt_defectCode.Text = "";
                txt_defectName.Text = "";
                return;
@@ -74,7 +84,8 @@
                SType = txt_sType.Text.Trim(),
                DefectName = txt_defectName.Text.Trim(),
                Pid = UtilityHelper.ToGuid(strUpGuid.Trim()),
                Type1 = txt_type1.Checked
                Type1 = txt_type1.Checked,
                DefectSort = strType,
            };
            try
            {
@@ -108,8 +119,11 @@
        /// </summary>
        private void getSelect()
        {
            System.Text.StringBuilder sbWhere = new StringBuilder();
            sbWhere.Append(" and a.defect_sort='" + strType + "'");
            var _obj = new
            {
                strWhere = sbWhere.ToString()
            };
            var strReturn = UtilityHelper.HttpPost("", _webServiceName + "SelectCategory", JsonConvert.SerializeObject(_obj));
            var dd = UtilityHelper.ReturnToList(strReturn);