| | |
| | | using DevExpress.Office.Model; |
| | | using System; |
| | | using System.ComponentModel; |
| | | using DevExpress.XtraEditors; |
| | | using DevExpress.XtraLayout.Customization; |
| | | using Gs.DevApp.Entity; |
| | | using DevExpress.XtraWizard; |
| | | using Gs.DevApp.DevFrm.Sys; |
| | | using Gs.DevApp.ToolBox; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using System; |
| | | using System.Data; |
| | | using System.Windows.Controls; |
| | | |
| | | namespace Gs.DevApp.UserControl |
| | | { |
| | | public partial class ShowRptWizard : DevExpress.XtraEditors.XtraForm |
| | | public partial class ShowRptWizard : XtraForm |
| | | { |
| | | private readonly string _rptParameter; |
| | | |
| | | private string _rptParameter; |
| | | public ShowRptWizard(string rptParameter) |
| | | { |
| | | _rptParameter = rptParameter; |
| | |
| | | wizardControl1.FinishClick += WizardControl1_FinishClick; |
| | | } |
| | | |
| | | private void WizardControl1_FinishClick(object sender, System.ComponentModel.CancelEventArgs e) |
| | | private void WizardControl1_FinishClick(object sender, |
| | | CancelEventArgs e) |
| | | { |
| | | var _obj = new |
| | | { |
| | | rptParameter = this._rptParameter, |
| | | rptParameter = _rptParameter |
| | | // rptData = null,初始时不用设计模板 |
| | | }; |
| | | try |
| | | { |
| | | string strJson = UtilityHelper.HttpPost("", "Report/EdtTemplate", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); |
| | | var strJson = UtilityHelper.HttpPost("", "Report/EdtTemplate", |
| | | JsonConvert.SerializeObject(_obj)); |
| | | var _rtn = UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | Gs.DevApp.DevFrm.Sys.EasyRptDesign frm = new Gs.DevApp.DevFrm.Sys.EasyRptDesign(this._rptParameter); |
| | | var frm = new EasyRptDesign(_rptParameter); |
| | | frm.Show(); |
| | | } |
| | | else |
| | | { |
| | | ToolBox.MsgHelper.ShowError("提示:" + _rtn.rtnData["outMsg"].ToString()); |
| | | MsgHelper.ShowError("提示:" + |
| | | _rtn.rtnData["outMsg"].ToString()); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | ToolBox.MsgHelper.ShowError("提示:" + ex.Message.ToString()); |
| | | MsgHelper.ShowError("提示:" + ex.Message); |
| | | } |
| | | } |
| | | |
| | | private void WizardControl1_NextClick(object sender, DevExpress.XtraWizard.WizardCommandButtonClickEventArgs e) |
| | | private void WizardControl1_NextClick(object sender, |
| | | WizardCommandButtonClickEventArgs e) |
| | | { |
| | | if (this.wizardControl1.SelectedPage == this.welcomeWizardPage1) |
| | | if (wizardControl1.SelectedPage == welcomeWizardPage1) |
| | | { |
| | | this.lbParameter.Text = "该报表使用了如下参数:" + _rptParameter; |
| | | return; |
| | | lbParameter.Text = "该报表使用了如下参数:" + _rptParameter; |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |