基线 SVN r240
SVN-Revision: r240
This commit is contained in:
@@ -0,0 +1,115 @@
|
||||
/******************************
|
||||
* 说明:表格报表模版
|
||||
* 创建人:龚宇超
|
||||
* 创建日期:2017-11-20
|
||||
* 修改人:
|
||||
* 修改日期:
|
||||
* 修改备注:
|
||||
* 版本:1.0.0.0
|
||||
******************************/
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using Lskj.Control;
|
||||
using Lskj.Model;
|
||||
using Lskj.Control.Model;
|
||||
using Lskj.Util;
|
||||
using Lskj.Data;
|
||||
using Lskj.Business.Impl;
|
||||
using Lskj.Business;
|
||||
|
||||
namespace Lskj.Report
|
||||
{
|
||||
public partial class FrmMain : BaseForm
|
||||
{
|
||||
/// <summary>
|
||||
/// 报表动态链接库参数
|
||||
/// </summary>
|
||||
public DynamicReportModel Model;
|
||||
|
||||
public FrmMain()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>说明:窗口加载</para>
|
||||
/// <para>创建人:龚宇超</para>
|
||||
/// <para>创建日期:2017-11-21 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
|
||||
protected override void OnLoad(EventArgs e)
|
||||
{
|
||||
WaitForm.ShowForm();
|
||||
try
|
||||
{
|
||||
this.Model.Privilege = this.Model.Privilege.Equals("3") ? "1" : Model.ModuleId > 0 ? BaseImpl.GetUserPurviewsByMenuId(Model.ModuleId + "") + "" : BaseImpl.GetUserPurviewsByMenuCode(Model.ModuleCode) + "";
|
||||
|
||||
this.mControl.ModuleGridDetailObj.ModuleGridObj.VisibleOperPanel = false;
|
||||
this.mControl.Details = GetReportDetails();
|
||||
this.mControl.InitControls(Model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.Instance.WriteError(ex, ResourceKeys.BaseReport);
|
||||
//MessageUtil.Show(ex.Message + "\r\n" + ex.StackTrace);
|
||||
string Message = ErrorMessage.PromptErrorMessage(ex);
|
||||
MessageUtil.Show(Message,ex.Message);
|
||||
}
|
||||
finally
|
||||
{
|
||||
Lskj.Control.Model.AutoSizeChange.ControllInitializeSize(this);
|
||||
this.mControl.Visible = true;
|
||||
}
|
||||
|
||||
WaitForm.HideForm();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>说明:获取报表明细</para>
|
||||
/// <para>创建人:龚宇超</para>
|
||||
/// <para>创建日期:2017-11-22 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
/// <returns>List<GridDetailModel>.</returns>
|
||||
private List<GridDetailModel> GetReportDetails()
|
||||
{
|
||||
List<GridDetailModel> details = new List<GridDetailModel>();
|
||||
bool ProcessExists = (Lskj.Data.Caches.CacheSYSConfig.Instance().JudgeProcessExists()&&SystemInfo.Instance.isExecload);
|
||||
|
||||
if (ProcessExists)
|
||||
{
|
||||
DataTable table = Lskj.Data.Caches.CacheSYSConfig.Instance().GetBaseDetailPages();
|
||||
foreach (DataRow item in table.Rows)
|
||||
{
|
||||
DataTable gridColumns = Lskj.Data.Caches.CacheSYSConfig.Instance().GetReportDetailColumns(item["id"] + "");
|
||||
details.Add(new GridDetailModel(item, gridColumns, GridCustomColumnStruct.BaseDetailGridView));
|
||||
}
|
||||
}
|
||||
else {
|
||||
DataTable table = ReportImpl.GetReportDetailPages(Model.ModuleCode);
|
||||
foreach (DataRow item in table.Rows)
|
||||
{
|
||||
DataTable gridColumns = ReportImpl.GetReportDetailColumns(Model.ModuleCode, item["id"] + "");
|
||||
details.Add(new GridDetailModel(item, gridColumns, GridCustomColumnStruct.BaseDetailGridView));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
return details;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user