用户数据操作报告(frmOperateReport)窗体使用方法


用户数据操作报告(frmOperateReport)
开发框架提供的一个通用界面,用于展示前端操作或后台操作数据返回的结果信息,如下图所示:

使用方法1,显示DataTable结果信息:
C# Code:
//获取操作结果
//获取操作结果
DataTable reports = FMSHelper.UpdateMdmAllDocs(customerCode, CustomerName, MDMCode, MDMName);
frmOperateReport.ShowReport(reports);
//来源:C/S框架网 | www.csframework.com | QQ:23404761
frmOperateReport.ShowReport(reports);
//来源:C/S框架网 | www.csframework.com | QQ:23404761
C# Code:
public static void ShowReport(DataTable dtReport)
{
frmOperateReport.AddReport(dtReport);
frmOperateReport.ShowReport();
}
//来源:C/S框架网 | www.csframework.com | QQ:23404761
{
frmOperateReport.AddReport(dtReport);
frmOperateReport.ShowReport();
}
//来源:C/S框架网 | www.csframework.com | QQ:23404761
SQL返回的临时表结构:
SQL Code:
--返回操作结果
CREATE TABLE #Report(
IsError VARCHAR(1),
StepText NVARCHAR(100),
RefID VARCHAR(50),
Content NVARCHAR(100)
)
//来源:C/S框架网 | www.csframework.com | QQ:23404761
CREATE TABLE #Report(
IsError VARCHAR(1),
StepText NVARCHAR(100),
RefID VARCHAR(50),
Content NVARCHAR(100)
)
//来源:C/S框架网 | www.csframework.com | QQ:23404761
使用方法2,显示List<OperateReportItem>结果信息:
C# Code:
List<OperateReportItem> errItems = _BLLInstance.RemoveExistDetail(dsQK);
//显示报告
if (errItems.Count > 0)
{
frmOperateReport.ShowReport("请款明细检查结果", errItems);
}
//来源:C/S框架网 | www.csframework.com | QQ:23404761
//显示报告
if (errItems.Count > 0)
{
frmOperateReport.ShowReport("请款明细检查结果", errItems);
}
//来源:C/S框架网 | www.csframework.com | QQ:23404761
OperateReportItem类:
C# Code:
/// <summary>
/// 报告项,用于frmOperateReport界面
/// </summary>
public class OperateReportItem
{
public OperateReportItem()
{
}
public OperateReportItem(bool isError, string stepText, string refID, string content)
{
this.IsError = isError;
this.StepText = stepText;
this.RefID = refID;
this.Content = content;
}
public bool IsError { get; set; }
public string StepText { get; set; }
public string RefID { get; set; }
public string Content { get; set; }
}
//来源:C/S框架网 | www.csframework.com | QQ:23404761
/// 报告项,用于frmOperateReport界面
/// </summary>
public class OperateReportItem
{
public OperateReportItem()
{
}
public OperateReportItem(bool isError, string stepText, string refID, string content)
{
this.IsError = isError;
this.StepText = stepText;
this.RefID = refID;
this.Content = content;
}
public bool IsError { get; set; }
public string StepText { get; set; }
public string RefID { get; set; }
public string Content { get; set; }
}
//来源:C/S框架网 | www.csframework.com | QQ:23404761

扫一扫加微信


版权声明:本文为开发框架文库发布内容,转载请附上原文出处连接
NewDoc C/S框架网