本文整理汇总了C#中ReportType类的典型用法代码示例。如果您正苦于以下问题:C# ReportType类的具体用法?C# ReportType怎么用?C# ReportType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ReportType类属于命名空间,在下文中一共展示了ReportType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RDLCPrinter
/// <summary>
/// Initialize repot object with default setting
/// Copies = 1
/// ReportType = Printer
/// Path = 0
/// </summary>
public RDLCPrinter(LocalReport report)
{
_report = report;
_Copies = 1;
_ReportType = ReportType.Printer;
_path = "";
}
示例2: SendMessage
private void SendMessage(ReportType type, MessageLevel level, string message)
{
var encodedMessage = Convert.ToBase64String(Encoding.UTF8.GetBytes(message));
var report = "{0}|{1}|{2}".FormatWith(type, level, encodedMessage);
_output.WriteLine(report);
_output.Flush();
}
示例3: Report
public Report(ReportType reportType)
{
try
{
this.reporttype = reportType;
dal = new Dal();
switch (this.reporttype)
{
case ReportType.IncomeExpenses:
this.reporttitle = "Income & Expenses";
updateEntries();
break;
case ReportType.ProductSales:
this.reporttitle = "Product Sales";
updateEntries();
break;
}
}
catch (Exception ex)
{
throw new Exception("Unable to load report " + reportType.ToString(), ex);
}
}
示例4: SendMessage
public static void SendMessage(this StreamWriter writer, ReportType type, MessageLevel level, string message)
{
var encodedMessage = Convert.ToBase64String(Encoding.UTF8.GetBytes(message));
var report = "{0}|{1}|{2}".FormatWith(type, level, encodedMessage);
writer.WriteLine(report);
writer.Flush();
}
示例5: SaveReportTemplate
public ReportTemplateWrapper SaveReportTemplate(string name, string period, int periodItem, int hour, bool autoGenerated, ReportType reportType,
int tag, int project, TaskStatus? status, Guid departament, Guid userId, ReportTimeInterval reportTimeInterval,
ApiDateTime fromDate, ApiDateTime toDate, int viewType, bool noResponsible)
{
ProjectSecurity.DemandAuthentication();
if (name == null || name.Trim().Length == 0) throw new ArgumentNullException("name");
var filter = new TaskFilter
{
TagId = tag,
DepartmentId = departament,
UserId = userId,
TimeInterval = reportTimeInterval,
FromDate = fromDate,
ToDate = toDate,
ViewType = viewType,
NoResponsible = noResponsible
};
if (project != 0)
filter.ProjectIds.Add(project);
if (status != null)
filter.TaskStatuses.Add((TaskStatus)status);
var template = new ReportTemplate(reportType) { Filter = filter };
SaveOrUpdateTemplate(template, name, period, periodItem, hour, autoGenerated);
return new ReportTemplateWrapper(template);
}
示例6: BuildReport
public static string BuildReport(ReportType reportType, TaskFilter filter, ReportViewType viewType, int templateID)
{
//prepare filter
if (templateID != 0 && !filter.FromDate.Equals(DateTime.MinValue))
{
var interval = filter.ToDate.DayOfYear - filter.FromDate.DayOfYear;
switch (reportType)
{
case ReportType.TasksByUsers:
case ReportType.TasksByProjects:
{
filter.FromDate = TenantUtil.DateTimeNow().Date.AddDays(-interval);
filter.ToDate = TenantUtil.DateTimeNow().Date;
}
break;
case ReportType.MilestonesNearest:
{
filter.FromDate = TenantUtil.DateTimeNow().Date;
filter.ToDate = TenantUtil.DateTimeNow().Date.AddDays(interval);
}
break;
}
}
//exec
var report = Report.CreateNewReport(reportType, filter);
var data = report.BuildReport().ToList();
if (!data.Any())
report = Report.CreateNewReport(ReportType.EmptyReport, filter);
return ReportTransformer.Transform(data.ToList(), report, filter.ViewType, viewType, templateID);
}
示例7: DefinePropertiesOfDevice
private static string DefinePropertiesOfDevice(ReportType type)
{
string deviceInfo = null;
switch (type)
{
case ReportType.pdf:
deviceInfo = "<DeviceInfo>" +
" <OutputFormat>PDF</OutputFormat>" +
" <PageWidth>8.5in</PageWidth>" +
" <PageHeight>11in</PageHeight>" +
" <MarginTop>0.5in</MarginTop>" +
" <MarginLeft>1in</MarginLeft>" +
" <MarginRight>1in</MarginRight>" +
" <MarginBottom>0.5in</MarginBottom>" +
"</DeviceInfo>";
break;
case ReportType.image:
deviceInfo = "<DeviceInfo>" +
" <OutputFormat>jpeg</OutputFormat>" +
" <PageWidth>8.5in</PageWidth>" +
" <PageHeight>11in</PageHeight>" +
" <MarginTop>0.5in</MarginTop>" +
" <MarginLeft>1in</MarginLeft>" +
" <MarginRight>1in</MarginRight>" +
" <MarginBottom>0.5in</MarginBottom>" +
"</DeviceInfo>";
break;
}
return deviceInfo;
}
示例8: ReportFiles
public ReportFiles(DataTable dataTable, string reportName, ReportType reportType)
{
_dt = dataTable;
_reportName = reportName;
_reportType = reportType;
}
示例9: Context
protected override void Context()
{
base.Context();
sampleDateTime = new DateTime(2012, 01, 02);
sampleReportType = ReportType.Cost;
}
示例10: Report
public void Report(ReportType reportType, ScenarioReportingContext reportingContext)
{
// only output current test info if running in R# -- it's not useful in command line builds
if (reportType == ReportType.CurrentTest)
{
var executingProcessName = Process.GetCurrentProcess().ProcessName;
if (executingProcessName.IndexOf("JetBrains.ReSharper", StringComparison.InvariantCultureIgnoreCase) == -1)
{
return;
}
}
int indentationLevel = 0;
// avoid repeating the same feature over and over
var featureKey = GetKey(reportingContext.FeatureReport);
if (featureKey != null && featureKey == _previousFeatureKey)
{
indentationLevel = 1;
reportingContext.FeatureReport.Clear();
}
Trace.WriteLine(reportingContext.CreateReportWithStandardSpacing(indentationLevel));
_previousFeatureKey = featureKey;
}
示例11: Report
public static extern void Report(
ReportType type,
string reportContext,
string fileName,
int lineNo,
DDS.ErrorCode reportCode,
string description);
示例12: MetadataReportObjectCore
///////////////////////////////////////////////////////////////////////////////////////////////////
////////////BUILD FROM V2.1 SCHEMA //////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////
#region Constructors and Destructors
/// <summary>
/// Initializes a new instance of the <see cref="MetadataReportObjectCore" /> class.
/// </summary>
/// <param name="parent"> The parent. </param>
/// <param name="report"> The dataStructureObject. </param>
public MetadataReportObjectCore(IMetadataSet parent, ReportType report)
: base(SdmxStructureType.GetFromEnum(SdmxStructureEnumType.MetadataReport), parent)
{
this._reportedAttributes = new List<IReportedAttributeObject>();
this.id = report.id;
if (report.Target != null)
{
this._target = new TargetObjectCore(this, report.Target);
}
if (report.AttributeSet != null)
{
if (ObjectUtil.ValidCollection(report.AttributeSet.ReportedAttribute))
{
this._reportedAttributes.Clear();
foreach (ReportedAttributeType each in report.AttributeSet.ReportedAttribute)
{
this._reportedAttributes.Add(new ReportedAttributeObjectObjectCore(this, each));
}
}
}
this.Validate();
}
示例13: ReportItem
public ReportItem(ReportType type = ReportType.Information, long? count = null, string eventname = null, string data = null)
: this()
{
this.Type = type;
this.Count = count;
this.EventName = eventname;
this.Data = data;
}
示例14: GetReportByDateAndType
public Report GetReportByDateAndType(DateTime reportDate, ReportType reportType)
{
getReportByDateAndType.ReportDate = reportDate;
getReportByDateAndType.ReportType = reportType;
var reports = getReportByDateAndType.Execute(session);
return reports.First();
}
示例15: SendMessage
private void SendMessage(ReportType type, MessageLevel level, string message)
{
var encodedMessage = Convert.ToBase64String(Encoding.UTF8.GetBytes(message));
var report = $"{type}|{level}|{encodedMessage}";
_output.WriteLine(report);
_output.Flush();
}