| | |
| | | btnZhiLiangFchk.ItemClick += BtnZhiLiangFchk_ItemClick; |
| | | btnCaiGouChk.ItemClick += BtnCaiGouChk_ItemClick; |
| | | btnCaiGouFchk.ItemClick += BtnCaiGouFchk_ItemClick; |
| | | btnBoHui.ItemClick += BtnBoHui_ItemClick; |
| | | var lst = new List<string>(); |
| | | foreach (BarItem item in barManager1.Items) |
| | | if (item is BarLargeButtonItem largeButtonItem) |
| | |
| | | lst.Add(item.Caption); |
| | | actions = lst; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 初始化按钮状态 |
| | |
| | | if (Parent != null) getNamespace(); |
| | | } |
| | | |
| | | |
| | | |
| | | private void BtnBoHui_ItemClick(object sender, ItemClickEventArgs e) |
| | | { |
| | | if (btnBoHuiClick != null) |
| | | btnBoHuiClick(this, e); |
| | | //if (string.IsNullOrEmpty(guidKey)) |
| | | //{ |
| | | // MsgHelper.Warning("请先选择你要操作的行!"); |
| | | // return; |
| | | //} |
| | | |
| | | //if (string.IsNullOrEmpty(chkParameter)) |
| | | //{ |
| | | // MsgHelper.ShowError("没有指定驳回参数,请联系开发人员获取支持!"); |
| | | // return; |
| | | //} |
| | | |
| | | //if (!MsgHelper.AskQuestion("你选择了1条数据,确定驳回重检吗?")) |
| | | // return; |
| | | //_ckService("5"); |
| | | } |
| | | private void BtnCaiGouFchk_ItemClick(object sender, ItemClickEventArgs e) |
| | | { |
| | | if (btnCaiGouFchkClick != null) |
| | | btnCaiGouFchkClick(this, e); |
| | | if (string.IsNullOrEmpty(guidKey)) |
| | | { |
| | | MsgHelper.Warning("请先选择你要操作的行!"); |
| | | return; |
| | | } |
| | | //if (string.IsNullOrEmpty(guidKey)) |
| | | //{ |
| | | // MsgHelper.Warning("请先选择你要操作的行!"); |
| | | // return; |
| | | //} |
| | | |
| | | if (string.IsNullOrEmpty(chkParameter)) |
| | | { |
| | | MsgHelper.ShowError("没有指定审核参数,请联系开发人员获取支持!"); |
| | | return; |
| | | } |
| | | //if (string.IsNullOrEmpty(chkParameter)) |
| | | //{ |
| | | // MsgHelper.ShowError("没有指定审核参数,请联系开发人员获取支持!"); |
| | | // return; |
| | | //} |
| | | |
| | | if (!MsgHelper.AskQuestion("你选择了1条数据,确定采购反审核吗?")) |
| | | return; |
| | | _ckService("-2"); |
| | | //if (!MsgHelper.AskQuestion("你选择了1条数据,确定采购反审核吗?")) |
| | | // return; |
| | | //_ckService("-2"); |
| | | } |
| | | |
| | | private void BtnCaiGouChk_ItemClick(object sender, ItemClickEventArgs e) |
| | | { |
| | | if (btnCaiGouChkClick != null) |
| | | btnCaiGouChkClick(this, e); |
| | | if (string.IsNullOrEmpty(guidKey)) |
| | | { |
| | | MsgHelper.Warning("请先选择你要操作的行!"); |
| | | return; |
| | | } |
| | | //if (string.IsNullOrEmpty(guidKey)) |
| | | //{ |
| | | // MsgHelper.Warning("请先选择你要操作的行!"); |
| | | // return; |
| | | //} |
| | | |
| | | if (string.IsNullOrEmpty(chkParameter)) |
| | | { |
| | | MsgHelper.ShowError("没有指定审核参数,请联系开发人员获取支持!"); |
| | | return; |
| | | } |
| | | //if (string.IsNullOrEmpty(chkParameter)) |
| | | //{ |
| | | // MsgHelper.ShowError("没有指定审核参数,请联系开发人员获取支持!"); |
| | | // return; |
| | | //} |
| | | |
| | | if (!MsgHelper.AskQuestion("你选择了1条数据,确定采购审核吗?")) |
| | | return; |
| | | _ckService("2"); |
| | | //if (!MsgHelper.AskQuestion("你选择了1条数据,确定采购审核吗?")) |
| | | // return; |
| | | //_ckService("2"); |
| | | } |
| | | |
| | | private void BtnZhiLiangFchk_ItemClick(object sender, ItemClickEventArgs e) |
| | | { |
| | | if (btnZhiLiangFchkClick != null) |
| | | btnZhiLiangFchkClick(this, e); |
| | | if (string.IsNullOrEmpty(guidKey)) |
| | | { |
| | | MsgHelper.Warning("请先选择你要操作的行!"); |
| | | return; |
| | | } |
| | | //if (string.IsNullOrEmpty(guidKey)) |
| | | //{ |
| | | // MsgHelper.Warning("请先选择你要操作的行!"); |
| | | // return; |
| | | //} |
| | | |
| | | if (string.IsNullOrEmpty(chkParameter)) |
| | | { |
| | | MsgHelper.ShowError("没有指定审核参数,请联系开发人员获取支持!"); |
| | | return; |
| | | } |
| | | //if (string.IsNullOrEmpty(chkParameter)) |
| | | //{ |
| | | // MsgHelper.ShowError("没有指定审核参数,请联系开发人员获取支持!"); |
| | | // return; |
| | | //} |
| | | |
| | | if (!MsgHelper.AskQuestion("你选择了1条数据,确定质量反审核吗?")) |
| | | return; |
| | | _ckService("-3"); |
| | | //if (!MsgHelper.AskQuestion("你选择了1条数据,确定质量反审核吗?")) |
| | | // return; |
| | | //_ckService("-3"); |
| | | } |
| | | |
| | | private void BtnZhiLiangChk_ItemClick(object sender, ItemClickEventArgs e) |
| | | { |
| | | if (btnZhiLiangChkClick != null) |
| | | btnZhiLiangChkClick(this, e); |
| | | if (string.IsNullOrEmpty(guidKey)) |
| | | { |
| | | MsgHelper.Warning("请先选择你要操作的行!"); |
| | | return; |
| | | } |
| | | //if (string.IsNullOrEmpty(guidKey)) |
| | | //{ |
| | | // MsgHelper.Warning("请先选择你要操作的行!"); |
| | | // return; |
| | | //} |
| | | |
| | | if (string.IsNullOrEmpty(chkParameter)) |
| | | { |
| | | MsgHelper.ShowError("没有指定审核参数,请联系开发人员获取支持!"); |
| | | return; |
| | | } |
| | | //if (string.IsNullOrEmpty(chkParameter)) |
| | | //{ |
| | | // MsgHelper.ShowError("没有指定审核参数,请联系开发人员获取支持!"); |
| | | // return; |
| | | //} |
| | | |
| | | if (!MsgHelper.AskQuestion("你选择了1条数据,确定质量审核吗?")) |
| | | return; |
| | | _ckService("3"); |
| | | //if (!MsgHelper.AskQuestion("你选择了1条数据,确定质量审核吗?")) |
| | | // return; |
| | | //_ckService("3"); |
| | | } |
| | | |
| | | private void BtnFchk_ItemClick(object sender, ItemClickEventArgs e) |
| | |
| | | btnFjianYanClick(this, e); |
| | | else |
| | | return; |
| | | if (string.IsNullOrEmpty(guidKey)) |
| | | { |
| | | MsgHelper.Warning("请先选择你要操作的行!"); |
| | | return; |
| | | } |
| | | //if (string.IsNullOrEmpty(guidKey)) |
| | | //{ |
| | | // MsgHelper.Warning("请先选择你要操作的行!"); |
| | | // return; |
| | | //} |
| | | |
| | | if (string.IsNullOrEmpty(chkParameter)) |
| | | { |
| | | MsgHelper.ShowError("没有指定检验参数,请联系开发人员获取支持!"); |
| | | return; |
| | | } |
| | | //if (string.IsNullOrEmpty(chkParameter)) |
| | | //{ |
| | | // MsgHelper.ShowError("没有指定检验参数,请联系开发人员获取支持!"); |
| | | // return; |
| | | //} |
| | | |
| | | if (!MsgHelper.AskQuestion("你选择了1条数据,确定反检验吗?")) |
| | | return; |
| | | _ckService(0.ToString()); |
| | | //if (!MsgHelper.AskQuestion("你选择了1条数据,确定撤回检验吗?")) |
| | | // return; |
| | | //_ckService(0.ToString()); |
| | | } |
| | | |
| | | private void BtnJianYan_ItemClick(object sender, ItemClickEventArgs e) |
| | |
| | | else |
| | | return; |
| | | |
| | | if (string.IsNullOrEmpty(guidKey)) |
| | | { |
| | | MsgHelper.Warning("请先选择你要操作的行!"); |
| | | return; |
| | | } |
| | | //if (string.IsNullOrEmpty(guidKey)) |
| | | //{ |
| | | // MsgHelper.Warning("请先选择你要操作的行!"); |
| | | // return; |
| | | //} |
| | | |
| | | if (string.IsNullOrEmpty(chkParameter)) |
| | | { |
| | | MsgHelper.ShowError("没有指定检验参数,请联系开发人员获取支持!"); |
| | | return; |
| | | } |
| | | //if (string.IsNullOrEmpty(chkParameter)) |
| | | //{ |
| | | // MsgHelper.ShowError("没有指定检验参数,请联系开发人员获取支持!"); |
| | | // return; |
| | | //} |
| | | |
| | | if (!MsgHelper.AskQuestion("你选择了1条数据,确定提交检验吗?")) |
| | | return; |
| | | var _obj = new |
| | | { |
| | | guid = guidKey, |
| | | parameter = chkParameter |
| | | }; |
| | | _ckService(1.ToString()); |
| | | //if (!MsgHelper.AskQuestion("你选择了1条数据,确定提交检验吗?")) |
| | | // return; |
| | | //var _obj = new |
| | | //{ |
| | | // guid = guidKey, |
| | | // parameter = chkParameter |
| | | //}; |
| | | //_ckService(1.ToString()); |
| | | } |
| | | |
| | | private async void BtnIn_ItemClick(object sender, ItemClickEventArgs e) |
| | |
| | | |
| | | private void BtnReport_ItemClick(object sender, ItemClickEventArgs e) |
| | | { |
| | | if (btnReportClick != null) |
| | | btnReportClick(this, e); |
| | | else |
| | | return; |
| | | |
| | | if (rptParameter == "return false") |
| | | return; |
| | | if (string.IsNullOrEmpty(rptParameter)) |
| | | { |
| | | MsgHelper.ShowError("没有指定报表参数,请联系技术开发人员!"); |
| | | return; |
| | | } |
| | | |
| | | var _bl = false; |
| | | _bl = _ckRptService(); |
| | | if (_bl) |
| | | { |
| | | var frm = new RptPreview(rptParameter); |
| | | frm.Show(); |
| | | var frm = new RptPreview(guidKey, rptParameter); |
| | | frm.ShowDialog(); |
| | | return; |
| | | } |
| | | |
| | |
| | | |
| | | private void BtnDesign_ItemClick(object sender, ItemClickEventArgs e) |
| | | { |
| | | if (btnDesignClick != null) |
| | | btnDesignClick(this, e); |
| | | else |
| | | return; |
| | | |
| | | if (string.IsNullOrEmpty(rptParameter)) |
| | | { |
| | | MsgHelper.ShowError("没有指定报表参数,请联系技术开发人员!"); |
| | | return; |
| | | } |
| | | |
| | | var _bl = false; |
| | | _bl = _ckRptService(); |
| | | //如果已经有模板了,直接打开设置模板 |
| | | if (_bl) |
| | | { |
| | | var frm = new EasyRptDesign(rptParameter); |
| | | frm.Show(); |
| | | var frm = new EasyRptDesign(guidKey, rptParameter); |
| | | frm.ShowDialog(); |
| | | return; |
| | | } |
| | | |
| | | //否则向导设计模板 |
| | | var rptWizard = new ShowRptWizard(rptParameter); |
| | | var rptWizard = new ShowRptWizard(guidKey, rptParameter); |
| | | rptWizard.ShowDialog(); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | ///具有联动关系的按钮(提交检验), |
| | | if (item.Caption == "提交检验") |
| | | { |
| | | var ld1 = dt.AsEnumerable().Any( |
| | | row => row.Field<string>("name") == "提交检验" |
| | | ); |
| | | if (ld1) |
| | | { |
| | | btnJianYan.Visibility = btnFjianYan.Visibility = |
| | | btnLoad.Visibility = BarItemVisibility.Always; |
| | | btnJianYan.Visibility = BarItemVisibility.Always; |
| | | _enabledList.Add(item.Name); |
| | | continue; |
| | | } |
| | | } |
| | | //if (item.Caption == "提交检验") |
| | | //{ |
| | | // var ld1 = dt.AsEnumerable().Any( |
| | | // row => row.Field<string>("name") == "提交检验" |
| | | // ); |
| | | // if (ld1) |
| | | // { |
| | | // btnJianYan.Visibility = btnFjianYan.Visibility = |
| | | // btnLoad.Visibility = BarItemVisibility.Always; |
| | | // btnJianYan.Visibility = BarItemVisibility.Always; |
| | | // _enabledList.Add(item.Name); |
| | | // continue; |
| | | // } |
| | | //} |
| | | |
| | | //按钮是否在权限表中 |
| | | var exists = dt.AsEnumerable().Any(row => |
| | |
| | | { |
| | | var _obj = new |
| | | { |
| | | rptParameter |
| | | guid = guidKey, |
| | | rptParameter, |
| | | isDesign = 1 |
| | | }; |
| | | var strJson = UtilityHelper.HttpPost("", "Report/GetTemplate", |
| | | var strJson = UtilityHelper.HttpPost("", "Report/GetRptData", |
| | | JsonConvert.SerializeObject(_obj)); |
| | | var _rtn = UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) return true; |
| | |
| | | /// </summary> |
| | | public event EventHandler btnZhiLiangFchkClick; |
| | | |
| | | /// <summary> |
| | | /// 驳回 |
| | | /// </summary> |
| | | public event EventHandler btnBoHuiClick; |
| | | |
| | | /// <summary> |
| | | /// 打印 |
| | | /// </summary> |
| | | public event EventHandler btnPrintClick; |
| | | |
| | | /// <summary> |
| | | /// 设置报表 |
| | | /// </summary> |
| | | public event EventHandler btnDesignClick; |
| | | |
| | | /// <summary> |
| | | /// 报表 |
| | | /// </summary> |
| | | public event EventHandler btnReportClick; |
| | | #endregion |
| | | |
| | | #region 公共属性 |
| | |
| | | public string xlsInService { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 审核参数,表名,字段名,如:MES_HOLIDAY,check_date,check_status,check_by,存储过程名 |
| | | /// 审核参数,表名,字段名,如:MES_HOLIDAY(表名),check_date(时间),check_status(状态),check_by(审核人),存储过程名 |
| | | /// </summary> |
| | | public string chkParameter { get; set; } |
| | | |