| | |
| | | using DevExpress.Utils.DirectXPaint; |
| | | using DevExpress.XtraBars; |
| | | using DevExpress.XtraLayout.Customization; |
| | | using DevExpress.XtraReports.Design; |
| | | using Gs.DevApp.Entity; |
| | | using Gs.DevApp.ToolBox; |
| | | using Newtonsoft.Json; |
| | |
| | | /// </summary> |
| | | public event EventHandler btnFChkClick; |
| | | |
| | | |
| | | /// <summary> |
| | | /// 检验 |
| | | /// </summary> |
| | | public event EventHandler btnJianYanClick; |
| | | /// <summary> |
| | | /// 反检验 |
| | | /// </summary> |
| | | public event EventHandler btnFjianYanClick; |
| | | |
| | | #endregion |
| | | |
| | | #region 公共属性 |
| | |
| | | this.btnIn.ItemClick += BtnIn_ItemClick; |
| | | this.btnChk.ItemClick += BtnChk_ItemClick; |
| | | this.btnFchk.ItemClick += BtnFchk_ItemClick; |
| | | this.btnJianYan.ItemClick += BtnJianYan_ItemClick; |
| | | this.btnFjianYan.ItemClick += BtnFjianYan_ItemClick; |
| | | List<string> lst = new List<string>(); |
| | | foreach (BarItem item in barManager1.Items) |
| | | { |
| | |
| | | } |
| | | this.actions = lst; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 初始化按钮状态 |
| | |
| | | } |
| | | if (!MsgHelper.AskQuestion("你选择了1条数据,确定反审核吗?")) |
| | | return; |
| | | var _obj = new |
| | | { |
| | | guid = this.guidKey, |
| | | parameter = this.chkParameter |
| | | }; |
| | | string strJson = UtilityHelper.HttpPost("", "General/GeneralFCheck", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnData["outMsg"].ToString()); |
| | | } |
| | | else |
| | | { |
| | | ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg); |
| | | } |
| | | _ckService(0.ToString()); |
| | | } |
| | | |
| | | |
| | | private void BtnChk_ItemClick(object sender, ItemClickEventArgs e) |
| | | { |
| | | if (btnChkClick != null) |
| | |
| | | } |
| | | if (!MsgHelper.AskQuestion("你选择了1条数据,确定审核吗?")) |
| | | return; |
| | | _ckService(1.ToString()); |
| | | } |
| | | |
| | | private void BtnFjianYan_ItemClick(object sender, ItemClickEventArgs e) |
| | | { |
| | | if (btnFjianYanClick != null) |
| | | { |
| | | btnFjianYanClick(this, e); |
| | | } |
| | | else |
| | | return; |
| | | |
| | | if (string.IsNullOrEmpty(this.guidKey)) |
| | | { |
| | | ToolBox.MsgHelper.Warning("请先选择你要操作的行!"); |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(this.chkParameter)) |
| | | { |
| | | ToolBox.MsgHelper.ShowError("没有指定检验参数,请联系开发人员获取支持!"); |
| | | return; |
| | | } |
| | | if (!MsgHelper.AskQuestion("你选择了1条数据,确定反检验吗?")) |
| | | return; |
| | | _ckService(0.ToString()); |
| | | } |
| | | |
| | | private void BtnJianYan_ItemClick(object sender, ItemClickEventArgs e) |
| | | { |
| | | if (btnJianYanClick != null) |
| | | { |
| | | btnJianYanClick(this, e); |
| | | } |
| | | else |
| | | return; |
| | | |
| | | if (string.IsNullOrEmpty(this.guidKey)) |
| | | { |
| | | ToolBox.MsgHelper.Warning("请先选择你要操作的行!"); |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(this.chkParameter)) |
| | | { |
| | | ToolBox.MsgHelper.ShowError("没有指定检验参数,请联系开发人员获取支持!"); |
| | | return; |
| | | } |
| | | if (!MsgHelper.AskQuestion("你选择了1条数据,确定提交检验吗?")) |
| | | return; |
| | | var _obj = new |
| | | { |
| | | guid = this.guidKey, |
| | | parameter = this.chkParameter |
| | | }; |
| | | string strJson = UtilityHelper.HttpPost("", "General/GeneralCheck", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnData["outMsg"].ToString()); |
| | | } |
| | | else |
| | | { |
| | | ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg); |
| | | } |
| | | _ckService(1.ToString()); |
| | | } |
| | | |
| | | private async void BtnIn_ItemClick(object sender, ItemClickEventArgs e) |
| | | { |
| | | if (string.IsNullOrEmpty(this.xlsInService)) |
| | |
| | | ); |
| | | if (ld1 == true) |
| | | { |
| | | |
| | | btnEsc.Visibility = btnSave.Visibility = btnLoad.Visibility = BarItemVisibility.Always; |
| | | btnAdd.Visibility = BarItemVisibility.Always; |
| | | _enabledList.Add(item.Name); |
| | |
| | | { |
| | | item.Visibility = BarItemVisibility.Always; |
| | | //准备启用 |
| | | _enabledList.Add(item.Name); |
| | | continue; |
| | | } |
| | | } |
| | | ///具有联动关系的按钮(提交检验), |
| | | if (item.Caption == "提交检验") |
| | | { |
| | | bool ld1 = dt.AsEnumerable().Any(row => row.Field<string>("name") == "提交检验" |
| | | ); |
| | | if (ld1 == true) |
| | | { |
| | | btnJianYan.Visibility = btnFjianYan.Visibility = btnLoad.Visibility = BarItemVisibility.Always; |
| | | btnJianYan.Visibility = BarItemVisibility.Always; |
| | | _enabledList.Add(item.Name); |
| | | continue; |
| | | } |
| | |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | private void _ckService(string _ckValue) |
| | | { |
| | | var _obj = new |
| | | { |
| | | guid = this.guidKey, |
| | | parameter = this.chkParameter, |
| | | ckValue = _ckValue |
| | | }; |
| | | string strJson = UtilityHelper.HttpPost("", "General/GeneralCheck", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); |
| | | ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnData["outMsg"].ToString()); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | |
| | | } |
| | | else |
| | | { |
| | | |
| | | } |
| | | } |
| | | } |
| | | } |