lu
4 天以前 dd0af4a5532c251fd655024ba475f72eaf9c93a0
DevApp/Gs.DevApp/DevFrm/BasicData/Frm_MesWorkshopLine.cs
@@ -102,7 +102,7 @@
            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_lineNo, gridView1, "lineNo");
            if (string.IsNullOrEmpty(rowGuid))
            {
                ToolBox.MsgHelper.Warning("请先选择你要操作的行!");
                ToolBox.MsgHelper.ShowError("请先选择你要操作的行!");
                return;
            }
            if (!MsgHelper.AskQuestion("你选择了【" + rowName + "】,确定删除吗?"))
@@ -116,17 +116,19 @@
                ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson);
                if (_rtn.rtnCode > 0)
                {
                    ToolBox.MsgHelper.ShowInformation("提示:" + _rtn.rtnMsg);
                    if (xtraTabControl1.SelectedTabPageIndex == 0)
                    { }
                    else
                        Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 2);
                    getPageList(this.pageBar1.CurrentPage);
                }
                ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg);
                else
                ToolBox.MsgHelper.ShowError("提示:" + _rtn.rtnMsg);
            }
            catch (Exception ex)
            {
                ToolBox.MsgHelper.Warning("提示:" + ex.Message);
                ToolBox.MsgHelper.ShowError("提示:" + ex.Message);
            }
        }
@@ -176,6 +178,8 @@
            {
                UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, true);
            }
            //2025/07/12加上修改状态下不能修改
            txt_dptId.IsReadly = true;
        }
        /// <summary>
        /// 新增事件
@@ -198,25 +202,25 @@
            toolBarMenu1.isSetBtn = false;
            if (string.IsNullOrEmpty(txt_dptId.GetId().Trim()))
            {
                Gs.DevApp.ToolBox.MsgHelper.Warning("请选择所在部门!");
                Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择所在部门!");
                txt_dptId.Focus();
                return;
            }
            if (string.IsNullOrEmpty(txt_lineNo.Text.Trim()))
            {
                Gs.DevApp.ToolBox.MsgHelper.Warning("产线编号不能为空!");
                Gs.DevApp.ToolBox.MsgHelper.ShowError("产线编号不能为空!");
                txt_lineNo.Focus();
                return;
            }
            if (string.IsNullOrEmpty(txt_name.Text.Trim()))
            {
                Gs.DevApp.ToolBox.MsgHelper.Warning("产线名称不能为空!");
                Gs.DevApp.ToolBox.MsgHelper.ShowError("产线名称不能为空!");
                txt_name.Focus();
                return;
            }
            if (string.IsNullOrEmpty(txt_lineType.Text.Trim()))
            {
                Gs.DevApp.ToolBox.MsgHelper.Warning("产线类别不能为空!");
                Gs.DevApp.ToolBox.MsgHelper.ShowError("产线类别不能为空!");
                txt_lineType.Focus();
                return;
            }
@@ -227,26 +231,30 @@
                Name = txt_name.Text.Trim(),
                LineNo = txt_lineNo.Text.Trim(),
                Remark = txt_remark.Text.Trim(),
                LineType = txt_lineType.Text.Trim(),
                isZxbg = txt_isZxbg.Checked
                LineType = txt_lineType.Checked.ToString(),//过站时强制水检
                isZxbg = txt_isZxbg.Checked //过站时强制电检
            };
            try
            {
                string strJson = UtilityHelper.HttpPost("", _webServiceName + "EditModel", JsonConvert.SerializeObject(_obj));
                ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson);
                ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg);
                if (_rtn.rtnCode > 0)
                {
                    ToolBox.MsgHelper.ShowInformation("提示:" + _rtn.rtnMsg);
                    lbGuid.Text = _rtn.rtnData;
                    toolBarMenu1.isSetBtn = true;
                    UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, false);
                    toolBarMenu1.currentAction = "";
                    Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 6);
                }
                else
                {
                    ToolBox.MsgHelper.ShowError("提示:" + _rtn.rtnMsg);
                }
            }
            catch (Exception ex)
            {
                ToolBox.MsgHelper.Warning("提示:" + ex.Message);
                ToolBox.MsgHelper.ShowError("提示:" + ex.Message);
            }
        }
@@ -257,7 +265,7 @@
        /// <param name="pageSize">每页几条</param>
        private void getPageList(int curPage)
        {
            var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
            gcMain1.DataSource = null; var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
            var pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "org.FNumber asc ,c.departmentcode asc,a.line_no",
            "asc", "", _sbSqlWhere.ToString());
            var json = JsonConvert.SerializeObject(pgq);
@@ -291,7 +299,7 @@
            }
            catch (Exception ex)
            {
                MsgHelper.Warning("提示:" + ex.Message);
                MsgHelper.ShowError("提示:" + ex.Message);
            }
        }
        /// <summary>
@@ -307,7 +315,7 @@
            if (toolBarMenu1.currentAction == "edit") isEdit = true;
            if (string.IsNullOrEmpty(strGuid))
            {
                ToolBox.MsgHelper.Warning("请先选择你要操作的行!");
                ToolBox.MsgHelper.ShowError("请先选择你要操作的行!");
                return;
            }
            var _obj = new
@@ -325,11 +333,11 @@
                    UtilityHelper.SetValueByObj(this.layoutMx1.Controls, dy, isEdit);
                }
                else
                    ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg);
                    ToolBox.MsgHelper.ShowError("提示:" + _rtn.rtnMsg);
            }
            catch (Exception ex)
            {
                ToolBox.MsgHelper.Warning("提示:" + ex.Message);
                ToolBox.MsgHelper.ShowError("提示:" + ex.Message);
            }
        }
    }