/
XtraReport1.cs
59 lines (57 loc) · 3.1 KB
/
XtraReport1.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
using CustomReportParameterType.Services;
using DevExpress.XtraReports.Parameters;
using System.Collections.Generic;
public partial class XtraReport1 : DevExpress.XtraReports.UI.XtraReport
{
public XtraReport1()
{
InitializeComponent();
var staticListLookUpSettings1 = new StaticListLookUpSettings();
var staticListLookUpSettings2 = new StaticListLookUpSettings();
//
// customMailParameterLookup
//
customMailParameterLookup.Description = "Custom Email Parameter";
customMailParameterLookup.Name = "customMailParameterLookup";
customMailParameterLookup.Type = typeof(CustomParameterType);
var parameterLookUpValue1 = new CustomParameterType { Value = "MyFirtsMail@example.com" };
var parameterLookUpValue2 = new CustomParameterType { Value = "MySecondMail@example.com" };
staticListLookUpSettings1.LookUpValues.AddRange(new List<LookUpValue> {
new LookUpValue(parameterLookUpValue1, "First Mail Value"),
new LookUpValue(parameterLookUpValue2, "Second Mail Value")
});
customMailParameterLookup.ValueSourceSettings = staticListLookUpSettings1;
//
// customMailParameterText
//
customMailParameterText.Description = "Additional Custom Email Parameter";
customMailParameterText.Name = "customMailParameterText";
customMailParameterText.Type = typeof(CustomParameterType);
customMailParameterText.Value = new CustomParameterType { Value = "SampleMail@example.com" };
//
// customMailParameterMultivalue
//
customMailParameterMultivalue.Description = "Multi-value Email Parameter";
customMailParameterMultivalue.MultiValue = true;
customMailParameterMultivalue.Name = "customMailParameterMultivalue";
customMailParameterMultivalue.Type = typeof(CustomParameterType);
customMailParameterMultivalue.Value = new List<CustomParameterType> {
new CustomParameterType { Value = "FirstSampleMail@example.com" },
new CustomParameterType { Value = "SecondSampleMail@example.com" }
};
//
// customMailParameterMultivalueLookup
//
customMailParameterMultivalueLookup.Description = "Predefined multi-value Email parameter";
customMailParameterMultivalueLookup.MultiValue = true;
customMailParameterMultivalueLookup.Name = "customMailParameterMultivalueLookup";
customMailParameterMultivalueLookup.Type = typeof(CustomParameterType);
var parameterLookUpValue3 = new CustomParameterType { Value = "MyThirdMail@example.com" };
var parameterLookUpValue4 = new CustomParameterType { Value = "MyFourthMail@example.com" };
staticListLookUpSettings2.LookUpValues.AddRange(new List<LookUpValue> {
new LookUpValue(parameterLookUpValue3, "Third Mail Value"),
new LookUpValue(parameterLookUpValue4, "Fourth Mail Value")
});
customMailParameterMultivalueLookup.ValueSourceSettings = staticListLookUpSettings2;
}
}