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