啊鑫
2024-11-22 a985c4d4b80fbf3eb4abbe385adcd0536fd29eda
DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaMj.cs
@@ -53,7 +53,7 @@
        private void _setIno()
        {
            this.txt_itemId.KeyFile = "id";
            this.txt_suppNo.KeyFile = "suppNo";
            this.txt_suppId.KeyFile = "id";
            txt_itemId.EditChanged += (s, e) =>
            {
                txt_itemNo.Text = this.txt_itemId.GetCode();
@@ -61,30 +61,6 @@
                //var ItemName = this.txt_itemId.GetName();
                //GetCount(ItemId, ItemName);
            };
        }
        private int GetCount(string ItemId,string ItemName)
        {
            //string rowGuid = "", rowName = "";
            //(rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_itemNo, gridView1);
            //if (string.IsNullOrEmpty(rowGuid))
            //{
            //    ToolBox.MsgHelper.Warning("请先选择你要操作的行!");
            //    return;
            //}
            try
            {
                string strJson = UtilityHelper.HttpPost("", _webServiceName + "GetCount", JsonConvert.SerializeObject(ItemId));
                ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson);
                return _rtn.rtnCode;
            }
            catch (Exception ex)
            {
                ToolBox.MsgHelper.Warning("提示:" + ex.Message);
                return -1;
            }
        }
        /// <summary>
        /// 双击事件
@@ -231,7 +207,7 @@
        {
            toolBarMenu1.isSetBtn = false;
            string _ItemId = txt_itemId.GetId();
            string _suppNo = txt_suppNo.GetId();
            string _suppNo = txt_suppId.GetId();
            if (string.IsNullOrEmpty(_ItemId))
            {
                Gs.DevApp.ToolBox.MsgHelper.Warning("请选择物料!");
@@ -241,7 +217,7 @@
            if (string.IsNullOrEmpty(_suppNo))
            {
                Gs.DevApp.ToolBox.MsgHelper.Warning("请选择供应商!");
                txt_suppNo.Focus();
                txt_suppId.Focus();
                return;
            }
            var _obj = new MesQaMj
@@ -251,19 +227,6 @@
                ItemNo = txt_itemId.GetCode(),
                SuppId = _suppNo,
            };
            if (lbGuid.Text.Trim().Length == 0)
            {
                var ItemName = txt_itemNo.Text.Trim();
                var flag = GetCount(_ItemId, ItemName);
                if (flag > 0)
                {
                    UtilityHelper.JumpToTab(xtraTabControl1, 0);
                    MsgHelper.Warning("提示:" + ItemName + "这个物料已经维护了免检数据");
                    return;
                }
            }
            try
            {
                string strJson = UtilityHelper.HttpPost("", _webServiceName + "EditModel", JsonConvert.SerializeObject(_obj));