啊鑫
2024-12-09 2a8c7b4e3ebe5691fbbe84d8cf285be3f72b7c30
DevApp/Gs.DevApp/DevFrm/BasicData/Frm_MesWorkshop.cs
@@ -31,9 +31,10 @@
            toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick;
            toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick;
            gcMain.MouseDoubleClick += GcMain_MouseDoubleClick;
            Gs.DevApp.ToolBox.UtilityHelper.SetGridSear(gridView1, picCheckBox, this, "checkStatus", "");
            Gs.DevApp.ToolBox.UtilityHelper.SetGridSearMx(gvMx1);
            getPageList(1);
            pageBar1.PagerEvent += PageBar1_PagerEvent;
            Gs.DevApp.ToolBox.UtilityHelper.SetGridSear(gridView1, picCheckBox, this, "checkStatus", "");
        }
        private void GridView1_ColumnFilterChanged(object sender, EventArgs e)
@@ -120,8 +121,6 @@
        /// <param name="pageSize">每页几条</param>
        private void getPageList(int curPage)
        {
            var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
            var pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "a.create_date",
            "asc", "", _sbSqlWhere.ToString());
@@ -159,7 +158,6 @@
            }
        }
        private void getModel(string strGuid, bool isEdit, int tabIdx)
        {
            if (string.IsNullOrEmpty(strGuid))
@@ -224,11 +222,7 @@
        /// <exception cref="NotImplementedException"></exception>
        private void ToolBarMenu1_btnFChkClick(object sender, EventArgs e)
        {
            toolBarMenu1.guidKey = "";
            string rowGuid, rowName;
            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
                lbGuid, txt_departmentname, gridView1, "departmentcode");
            toolBarMenu1.guidKey = rowGuid;
            _toolCk(0);
        }
        /// <summary>
        ///     取消事件
@@ -246,11 +240,7 @@
        /// <param name="e"></param>
        private void ToolBarMenu1_btnChkClick(object sender, EventArgs e)
        {
            toolBarMenu1.guidKey = "";
            string rowGuid, rowName;
            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
                lbGuid, txt_departmentname, gridView1, "departmentcode");
            toolBarMenu1.guidKey = rowGuid;
            _toolCk(1);
        }
        /// <summary>
        ///     修改事件
@@ -267,7 +257,6 @@
                MsgHelper.Warning("请先选择你要操作的行!");
                return;
            }
            getModel(rowGuid, true, 1);
        }
@@ -367,5 +356,60 @@
                }
            }
        }
        /// <summary>
        /// 工具条事件
        /// </summary>
        /// <param name="inFieldValue"></param>
        private void _toolCk(int _inFieldValue)
        {
            string strMsg = "";
            switch (_inFieldValue)
            {
                case 1:
                    strMsg = "审核";
                    break;
                case 0:
                    strMsg = "反审核";
                    break;
            };
            toolBarMenu1.guidKey = "";
            string rowGuid, rowName;
            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_departmentname, gridView1, "departmentname");
            if (string.IsNullOrEmpty(rowGuid))
            {
                MsgHelper.Warning("请先选择你要操作的行!");
                return;
            }
            if (!MsgHelper.AskQuestion("你选择了【" + rowName + "】,确定" + strMsg + "吗?"))
                return;
            var _obj = new
            {
                guid = rowGuid,
                ckValue = _inFieldValue,
                parameter = "SYS_DEPARTMENT,check_date,check_status,check_by"
            };
            try
            {
                var strJson = UtilityHelper.HttpPost("", "General/GeneralCheck",
                    JsonConvert.SerializeObject(_obj));
                var _rtn = UtilityHelper.ReturnToDynamic(strJson);
                MsgHelper.Warning(_rtn.rtnData.outMsg.ToString());
                if (_rtn.rtnCode > 0)
                {
                    if (xtraTabControl1.SelectedTabPageIndex == 1)
                        getModel(lbGuid.Text.Trim(), false, 999);
                    else
                        getPageList(1);
                }
            }
            catch (Exception ex)
            {
                MsgHelper.Warning("提示:" + ex.Message);
            }
        }
    }
}