| | |
| | | btnEdit.ItemClick += BtnEdit_ItemClick; |
| | | btnLoad.ItemClick += BtnLoad_ItemClick; |
| | | btnSave.ItemClick += BtnSave_ItemClick; |
| | | btnKG.ItemClick += BtnKG_ItemClick; |
| | | btnEsc.ItemClick += BtnEsc_ItemClick; |
| | | btnRole.ItemClick += BtnRole_ItemClick; |
| | | btnQuery.ItemClick += BtnQuery_ItemClick; |
| | | btnReport.ItemClick += BtnReport_ItemClick; |
| | | btnDesign.ItemClick += BtnDesign_ItemClick; |
| | |
| | | btnZhiLiangFchk.ItemClick += BtnZhiLiangFchk_ItemClick; |
| | | btnCaiGouChk.ItemClick += BtnCaiGouChk_ItemClick; |
| | | btnCaiGouFchk.ItemClick += BtnCaiGouFchk_ItemClick; |
| | | btnBoHui.ItemClick += BtnBoHui_ItemClick; |
| | | btnJieAn.ItemClick += BtnJieAn_ItemClick; |
| | | btnFjieAn.ItemClick += BtnFjieAn_ItemClick; |
| | | btnTzbl.ItemClick += BtnTzbl_ItemClick; |
| | | btnKg.ItemClick += BtnKg_ItemClick; |
| | | btnZhongTai.ItemClick += BtnbZhongTai_ItemClick; |
| | | btnWg.ItemClick += BtnWg_ItemClick; |
| | | btnHelp.ItemClick += BtnHelp_ItemClick; |
| | | var lst = new List<string>(); |
| | | foreach (BarItem item in barManager1.Items) |
| | | if (item is BarLargeButtonItem largeButtonItem) |
| | | if (!string.IsNullOrEmpty(item.Caption)) |
| | | if (!string.IsNullOrEmpty(item.Caption) && item.Caption != "保存" && item.Caption != "刷新") |
| | | lst.Add(item.Caption); |
| | | actions = lst; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 初始化按钮状态 |
| | |
| | | if (Parent != null) getNamespace(); |
| | | } |
| | | |
| | | private bool _isCk(int _type) { |
| | | Form parentForm = this.FindForm(); |
| | | if (parentForm != null) |
| | | { |
| | | if (_type == 1) |
| | | { |
| | | PictureBox specificControl = (PictureBox)parentForm.Controls.Find("picCheckBox", true).FirstOrDefault(); |
| | | if (specificControl != null) |
| | | { |
| | | if (specificControl.Tag.ToString() == "已审核") |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowInformation("该单据已被审核,无法进行操作!"); |
| | | return true; |
| | | } |
| | | } |
| | | } |
| | | if (_type == 0) |
| | | { |
| | | PictureBox specificControl = (PictureBox)parentForm.Controls.Find("picCheckBox", true).FirstOrDefault(); |
| | | if (specificControl != null) |
| | | { |
| | | if (specificControl.Tag.ToString() == "未审核") |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowInformation("该单据未被审核,无法进行操作!"); |
| | | return true; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | 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) |
| | | { |
| | | bool bl = _isCk(0); |
| | | if (bl) return; |
| | | if (btnFChkClick != null) |
| | | { |
| | | btnFChkClick(this, e); |
| | | else |
| | | return; |
| | | |
| | | if (string.IsNullOrEmpty(guidKey)) |
| | | { |
| | | MsgHelper.Warning("请先选择你要操作的行!"); |
| | | return; |
| | | } |
| | | |
| | | if (string.IsNullOrEmpty(chkParameter)) |
| | | { |
| | | MsgHelper.ShowError("没有指定审核参数,请联系开发人员获取支持!"); |
| | | return; |
| | | } |
| | | |
| | | if (!MsgHelper.AskQuestion("你选择了1条数据,确定反审核吗?")) |
| | | return; |
| | | _ckService(0.ToString()); |
| | | return; |
| | | } |
| | | |
| | | private void BtnChk_ItemClick(object sender, ItemClickEventArgs e) |
| | | { |
| | | bool bl = _isCk(1); |
| | | if (bl) return; |
| | | if (btnChkClick != null) |
| | | { |
| | | btnChkClick(this, e); |
| | | } |
| | | return; |
| | | } |
| | | private void BtnFjieAn_ItemClick(object sender, ItemClickEventArgs e) |
| | | { |
| | | if (btnFjieAnClick != null) |
| | | btnFjieAnClick(this, e); |
| | | else |
| | | return; |
| | | } |
| | | |
| | | if (string.IsNullOrEmpty(guidKey)) |
| | | { |
| | | MsgHelper.Warning("请先选择你要操作的行!"); |
| | | private void BtnJieAn_ItemClick(object sender, ItemClickEventArgs e) |
| | | { |
| | | if (btnJieAnClick != null) |
| | | btnJieAnClick(this, e); |
| | | else |
| | | return; |
| | | } |
| | | |
| | | if (string.IsNullOrEmpty(chkParameter)) |
| | | { |
| | | MsgHelper.ShowError("没有指定审核参数,请联系开发人员获取支持!"); |
| | | return; |
| | | } |
| | | |
| | | if (!MsgHelper.AskQuestion("你选择了1条数据,确定审核吗?")) |
| | | return; |
| | | _ckService(1.ToString()); |
| | | } |
| | | |
| | | |
| | |
| | | MsgHelper.Warning("请先选择你要操作的行!"); |
| | | return; |
| | | } |
| | | UserControl.ShowLogcs frm = new ShowLogcs(); |
| | | UserControl.ShowLogcs frm = new ShowLogcs(this.guidKey); |
| | | frm.ShowDialog(); |
| | | } |
| | | |
| | |
| | | |
| | | private void BtnFjianYan_ItemClick(object sender, ItemClickEventArgs e) |
| | | { |
| | | bool bl = _isCk(0); |
| | | if (bl) return; |
| | | if (btnFjianYanClick != null) |
| | | 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) |
| | | { |
| | | bool bl = _isCk(1); |
| | | if (bl) return; |
| | | if (btnJianYanClick != null) |
| | | btnJianYanClick(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; |
| | | 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(); |
| | | } |
| | | |
| | |
| | | lst.Add(btnEdit.Name); |
| | | lst.Add(btnLoad.Name); |
| | | lst.Add(btnDel.Name); |
| | | lst.Add(btnRole.Name); |
| | | lst.Add(btnQuery.Name); |
| | | lst.Add(btnReport.Name); |
| | | lst.Add(btnDesign.Name); |
| | | lst.Add(btnChk.Name); |
| | | lst.Add(btnFchk.Name); |
| | | lst.Add(btnLoad.Name); |
| | | lst.Add(btnJianYan.Name); |
| | | lst.Add(btnFjianYan.Name); |
| | | lst.Add(btnOut.Name); |
| | | lst.Add(btnIn.Name); |
| | | lst.Add(btnLog.Name); |
| | | lst.Add(btnPiZhun.Name); |
| | | lst.Add(btnHelp.Name); |
| | | lst.Add(btnBoHui.Name); |
| | | _enabledBtn(lst); |
| | | this.currentAction = "esc"; |
| | | if (btnEscClick != null) btnEscClick(this, e); |
| | | } |
| | | } |
| | | |
| | | private void BtnKG_ItemClick(object sender, ItemClickEventArgs e) |
| | | { |
| | | if (btnKGClick != null) btnKGClick(this, e); |
| | | } |
| | | |
| | | |
| | | private void BtnSave_ItemClick(object sender, ItemClickEventArgs e) |
| | | { |
| | |
| | | lst.Add(btnAdd.Name); |
| | | lst.Add(btnEdit.Name); |
| | | lst.Add(btnEsc.Name); |
| | | lst.Add(btnChk.Name); |
| | | lst.Add(btnFchk.Name); |
| | | lst.Add(btnDel.Name); |
| | | lst.Add(btnJianYan.Name); |
| | | lst.Add(btnFjianYan.Name); |
| | | lst.Add(btnQuery.Name); |
| | | lst.Add(btnLog.Name); |
| | | lst.Add(btnZhiLiangChk.Name); |
| | | lst.Add(btnZhiLiangFchk.Name); |
| | | lst.Add(btnPiZhun.Name); |
| | | lst.Add(btnBoHui.Name); |
| | | lst.Add(btnDesign.Name); |
| | | lst.Add(btnReport.Name); |
| | | lst.Add(btnKg.Name); |
| | | lst.Add(btnWg.Name); |
| | | lst.Add(btnZhongTai.Name); |
| | | lst.Add(btnHelp.Name); |
| | | lst.Add(btnLoad.Name); |
| | | _enabledBtn(lst); |
| | | } |
| | | } |
| | |
| | | |
| | | private void BtnEdit_ItemClick(object sender, ItemClickEventArgs e) |
| | | { |
| | | bool bl = _isCk(1); |
| | | if (bl) return; |
| | | var lst = new List<string>(); |
| | | lst.Add(btnSave.Name); |
| | | lst.Add(btnEsc.Name); |
| | | lst.Add(btnHelp.Name); |
| | | _enabledBtn(lst); |
| | | this.currentAction = "edit"; |
| | | if (btnEdtClick != null) btnEdtClick(this, e); |
| | | |
| | | } |
| | | |
| | | private void BtnDel_ItemClick(object sender, ItemClickEventArgs e) |
| | | { |
| | | bool bl = _isCk(1); |
| | | if (bl) return; |
| | | if (btnDelClick != null) btnDelClick(this, e); |
| | | |
| | | // btnEsc.Enabled = false; |
| | | this.currentAction = ""; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | var lst = new List<string>(); |
| | | lst.Add(btnSave.Name); |
| | | lst.Add(btnEsc.Name); |
| | | lst.Add(btnHelp.Name); |
| | | _enabledBtn(lst); |
| | | this.currentAction = "add"; |
| | | if (btnAddClick != null) btnAddClick(this, e); |
| | | Form parentForm = this.FindForm(); |
| | | if (parentForm != null) |
| | | { |
| | | PictureBox specificControl =(PictureBox) parentForm.Controls.Find("picCheckBox", true).FirstOrDefault(); |
| | | if (specificControl != null) |
| | | { |
| | | specificControl.Image = global::Gs.DevApp.Properties.Resources.ico_noCheck; |
| | | specificControl.Tag = "未审核"; |
| | | } |
| | | } |
| | | } |
| | | |
| | | private void BtnRole_ItemClick(object sender, ItemClickEventArgs e) |
| | |
| | | //setBtn(lst); |
| | | if (btnRoleClick != null) btnRoleClick(this, e); |
| | | } |
| | | |
| | | private void BtnWg_ItemClick(object sender, ItemClickEventArgs e) |
| | | { |
| | | if (btnWgClick != null) btnWgClick(this, e); |
| | | } |
| | | |
| | | |
| | | |
| | | private void BtnbZhongTai_ItemClick(object sender, ItemClickEventArgs e) |
| | | { |
| | | if (btnZhongTaiClick != null) btnZhongTaiClick(this, e); |
| | | } |
| | | |
| | | private void BtnKg_ItemClick(object sender, ItemClickEventArgs e) |
| | | { |
| | | |
| | | if (btnKgClick != null) btnKgClick(this, e); |
| | | } |
| | | |
| | | private void BtnTzbl_ItemClick(object sender, ItemClickEventArgs e) |
| | | { |
| | | if (btnTzblClick != null) btnTzblClick(this, e); |
| | | } |
| | | private void BtnHelp_ItemClick(object sender, ItemClickEventArgs e) |
| | | { |
| | | var _formNamespace = ""; |
| | | Control parentControl = this; |
| | | while (parentControl.Parent != null) |
| | | { |
| | | if (parentControl.Parent is Form parentForm) |
| | | { |
| | | var formType = parentForm.GetType(); |
| | | _formNamespace = formType.FullName; |
| | | break; |
| | | } |
| | | parentControl = parentControl.Parent; |
| | | } |
| | | string strReturn = UtilityHelper.HttpPost("", |
| | | "MenuAction/GetHelpFile", |
| | | JsonConvert.SerializeObject(_formNamespace)); |
| | | var _rtnJson = UtilityHelper.ReturnToDynamic(strReturn); |
| | | if (_rtnJson.rtnCode > 0) |
| | | { |
| | | var urlPath = _rtnJson.rtnData.ToString(); |
| | | Gs.DevApp.UserControl.ShowFile frm = new ShowFile(urlPath); |
| | | frm.ShowDialog(); |
| | | return; |
| | | } |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowInformation(_rtnJson.rtnMsg); |
| | | |
| | | } |
| | | |
| | | |
| | | private void _enabledBtn(List<string> lstBtn) |
| | | { |
| | |
| | | _formNamespace = formType.FullName; |
| | | break; |
| | | } |
| | | |
| | | parentControl = parentControl.Parent; |
| | | } |
| | | |
| | | var _obj = new |
| | | { |
| | | userGuid = LoginInfoModel.CurrentUser.LoginUserGuid, |
| | | orgGuid = LoginInfoModel.CurrentUser.LoginOrgGuid, |
| | | formNamespace = _formNamespace |
| | | }; |
| | | var strReturn = ""; |
| | |
| | | } |
| | | |
| | | ///具有联动关系的按钮(提交检验), |
| | | 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 => |
| | |
| | | } |
| | | |
| | | //默认启用的按钮 |
| | | // _enabledList.Add(btnDesign.Name); |
| | | _enabledList.Add(btnLoad.Name); |
| | | _enabledList.Add(btnHelp.Name); |
| | | _enabledBtn(_enabledList); |
| | | } |
| | | catch (Exception ex) |
| | |
| | | { |
| | | 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; |
| | |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | return true; |
| | | } |
| | | |
| | | return false; |
| | | } |
| | | |
| | | private void _ckService(string _ckValue) |
| | | { |
| | | var _obj = new |
| | | { |
| | | guid = guidKey, |
| | | parameter = chkParameter, |
| | | ckValue = _ckValue |
| | | }; |
| | | var strJson = UtilityHelper.HttpPost("", "General/GeneralCheck", |
| | | JsonConvert.SerializeObject(_obj)); |
| | | var _rtn = UtilityHelper.ReturnToDynamic(strJson); |
| | | MsgHelper.Warning("提示:" + _rtn.rtnData["outMsg"].ToString()); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | } |
| | | } |
| | | |
| | | #region 公共事件 |
| | | |
| | |
| | | /// </summary> |
| | | public event EventHandler btnEscClick; |
| | | |
| | | /// <summary> |
| | | /// 开工 |
| | | /// </summary> |
| | | public event EventHandler btnKGClick; |
| | | |
| | | /// <summary> |
| | | /// 权限 |
| | |
| | | /// </summary> |
| | | public event EventHandler btnZhiLiangFchkClick; |
| | | |
| | | /// <summary> |
| | | /// 驳回 |
| | | /// </summary> |
| | | public event EventHandler btnBoHuiClick; |
| | | |
| | | /// <summary> |
| | | /// 设置报表 |
| | | /// </summary> |
| | | public event EventHandler btnDesignClick; |
| | | |
| | | /// <summary> |
| | | /// 报表 |
| | | /// </summary> |
| | | public event EventHandler btnReportClick; |
| | | |
| | | /// <summary> |
| | | /// 结案 |
| | | /// </summary> |
| | | public event EventHandler btnJieAnClick; |
| | | |
| | | /// <summary> |
| | | /// 反结案 |
| | | /// </summary> |
| | | public event EventHandler btnFjieAnClick; |
| | | |
| | | |
| | | /// <summary> |
| | | /// 开工 |
| | | /// </summary> |
| | | public event EventHandler btnKgClick; |
| | | |
| | | /// <summary> |
| | | /// 通知备料 |
| | | /// </summary> |
| | | public event EventHandler btnTzblClick; |
| | | |
| | | /// <summary> |
| | | /// 状态 |
| | | /// </summary> |
| | | public event EventHandler btnZhongTaiClick; |
| | | |
| | | /// <summary> |
| | | /// 手动完工 |
| | | /// </summary> |
| | | public event EventHandler btnWgClick; |
| | | |
| | | |
| | | #endregion |
| | | |
| | |
| | | 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; } |
| | | |
| | | /// <summary> |
| | | /// 当前状态 |
| | | /// </summary> |
| | | public string currentAction { get; set; } |
| | | #endregion |
| | | |
| | | |