lu
16 小时以前 d8737264b137b8f37fc3c902031b17eb2a3acc19
DevApp/Gs.DevApp/DevFrm/RkQC/Frm_Cqfa.cs
@@ -1,5 +1,4 @@
using DevExpress.XtraPivotGrid.Data;
using Gs.DevApp.Entity;
using Gs.DevApp.Entity;
using Gs.DevApp.ToolBox;
using Gs.DevApp.UserControl;
using Newtonsoft.Json;
@@ -44,13 +43,33 @@
            //移入
            btnIn.Click += (s, e) =>
            {
                if (lbGuid.Text.Length <= 0)
                {
                    Gs.DevApp.ToolBox.MsgHelper.ShowError("提示:请先保存方案!");
                    return;
                }
                string strItemsGuids = frm_CqfaItems2.GetSelect();
                if (string.IsNullOrEmpty(strItemsGuids))
                {
                    Gs.DevApp.ToolBox.MsgHelper.ShowError("提示:请先勾选需要移入的物料!");
                    return;
                }
                _toolOutIn(1, strItemsGuids);
            };
            //移出
            btnOut.Click += (s, e) =>
            {
                if (lbGuid.Text.Length <= 0)
                {
                    Gs.DevApp.ToolBox.MsgHelper.ShowError("提示:请先保存方案!");
                    return;
                }
                string strItemsGuids = frm_CqfaItems1.GetSelect();
                if (string.IsNullOrEmpty(strItemsGuids))
                {
                    Gs.DevApp.ToolBox.MsgHelper.ShowError("提示:请先勾选需要移出的物料!");
                    return;
                }
                _toolOutIn(0, strItemsGuids);
            };
        }
@@ -148,23 +167,24 @@
            try
            {
                var strJson = UtilityHelper.HttpPost("",
                    _webServiceName + "DeleteModelOrMx",
                    _webServiceName + "DeleteModel",
                    JsonConvert.SerializeObject(_obj));
                var _rtn = UtilityHelper.ReturnToDynamic(strJson);
                if (_rtn.rtnCode > 0)
                {
                    MsgHelper.ShowInformation("提示:" + _rtn.rtnMsg);
                    if (xtraTabControl1.SelectedTabPageIndex == 0)
                    { }
                    else
                        Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 2);
                    getPageList(this.pageBar1.CurrentPage);
                }
                MsgHelper.Warning("提示:" + _rtn.rtnMsg);
                else
                    MsgHelper.ShowError("提示:" + _rtn.rtnMsg);
            }
            catch (Exception ex)
            {
                MsgHelper.Warning("提示:" + ex.Message);
                MsgHelper.ShowError("提示:" + ex.Message);
            }
        }
@@ -213,7 +233,6 @@
                txt_fabm.ReadOnly = true;
                txt_fSubsidiary.Enabled = false;
            }
        }
        /// <summary>
        /// 新增事件
@@ -238,23 +257,15 @@
        private void ToolBarMenu1_btnSaveClick(object sender, EventArgs e)
        {
            toolBarMenu1.isSetBtn = false;
            string _fabm = txt_fabm.Text.Trim();
            string _famc = txt_famc.Text.Trim();
            string _yjrq = txt_yjrq.Text.Trim();
            string _bzqx = txt_bzqx.Text.Trim();
            string _fjxz = txt_fjxz.Text.Trim();
            string _bz = txt_bz.Text.Trim();
            string _fSubsidiary = txt_fSubsidiary.GetId();
            if (string.IsNullOrEmpty(_fSubsidiary))
            {
                MsgHelper.ShowError("组织不能为空!");
                txt_fSubsidiary.Focus();
                return;
            }
            if (string.IsNullOrEmpty(_famc))
            {
                MsgHelper.ShowError("方案编码不能为空!");
                txt_fabm.Focus();
                return;
            }
            if (string.IsNullOrEmpty(_famc))
@@ -275,20 +286,13 @@
                txt_bzqx.Focus();
                return;
            }
            if (string.IsNullOrEmpty(_fjxz))
            {
                MsgHelper.ShowError("复检限值(次)不能为空!");
                txt_fjxz.Focus();
                return;
            }
            var _obj = new
            {
                guid = Gs.DevApp.ToolBox.UtilityHelper.ToGuid(lbGuid.Text.Trim()),
                yjrq = (_yjrq),
                bzqx = (_bzqx),
                fjxz = (_fjxz),
                fjxz = (0),
                famc = _famc.Trim(),
                fabm = _fabm.Trim(),
                bz = _bz.Trim(),
                fSubsidiary = _fSubsidiary.Trim(),
            };
@@ -298,7 +302,6 @@
                    _webServiceName + "EditModel",
                    JsonConvert.SerializeObject(_obj));
                var _rtn = UtilityHelper.ReturnToDynamic(strJson);
                if (_rtn.rtnCode > 0)
                {
                    MsgHelper.ShowInformation("提示:" + _rtn.rtnMsg);
@@ -308,6 +311,7 @@
                    UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, false);
                    toolBarMenu1.currentAction = "";
                    Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 6);
                    getModel(lbGuid.Text);
                }
                else
                    MsgHelper.ShowError("提示:" + _rtn.rtnMsg);
@@ -371,7 +375,7 @@
            if (toolBarMenu1.currentAction == "edit") isEdit = true;
            if (string.IsNullOrEmpty(strGuid))
            {
                ToolBox.MsgHelper.Warning("请先选择你要操作的行!");
                ToolBox.MsgHelper.ShowError("请先选择你要操作的行!");
                return;
            }
            var _obj = new
@@ -479,7 +483,7 @@
                MsgHelper.Warning("请先选择你要操作的行!");
                return;
            }
            if (!MsgHelper.AskQuestion("你选择了【" + rowName + "】,确定" + strMsg + "吗?"))
            if (!MsgHelper.AskQuestion("确定把所选择的物料【"+ strMsg + "】方案【" + rowName + "】吗?"))
                return;
            var _obj = new
            {