-
Notifications
You must be signed in to change notification settings - Fork 0
/
LoanApplication.cs
133 lines (104 loc) · 2.85 KB
/
LoanApplication.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
using System;
using System.Runtime.Serialization;
using OrcaLogic;
using MISMO.Entities;
using OrcaLogic.Xml;
namespace MISMO.BusinessObjects
{
/// <summary>
/// Entity implementation for table 'LOAN_APPLICATION'.
/// </summary>
/// <remarks>
/// ** OK to Add modifications to this file **
/// </remarks>
[Serializable]
public class LoanApplication : LoanApplicationBase, IXmlFactoryElement
{
#region Constructors
/// <summary>
/// Default constructor.
/// </summary>
public LoanApplication() : base()
{
_mismoversionid = "2.3.1";
}
/// <summary>
/// Creates constructor that enables object to be populated by its identity items.
/// </summary>
public LoanApplication(System.Int64 id) : base(id)
{
_mismoversionid = "2.3.1";
}
#endregion Constructors
#region Properties
#endregion Properties
#region Method
/// <summary>
/// Gets the binary formatted serialized set of bytes for the current instance.
/// </summary>
/// <returns>A byte array of serialized loan information.</returns>
public virtual byte[] GetBytes()
{
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter bf = new System.Runtime.Serialization.Formatters.Binary.BinaryFormatter();
System.IO.MemoryStream ms = new System.IO.MemoryStream();
bf.AssemblyFormat = System.Runtime.Serialization.Formatters.FormatterAssemblyStyle.Simple;
bf.Serialize(ms, this);
byte[] retbytes = ms.ToArray();
ms.Close();
return retbytes;
}
/// <summary>
/// Gets the XML document representation for this loan application.
/// </summary>
/// <returns>An Xml document.</returns>
public virtual System.Xml.XmlDocument ToXml()
{
return OrcaLogic.Xml.XmlFactory.GenerateDocument(this);
}
#endregion Method
#region IXmlFactoryElement Members
bool IXmlFactoryElement.ProcessAttribute(ref System.Collections.DictionaryEntry attributeEntry)
{
return this.ProcessAttribute(ref attributeEntry);
}
protected virtual bool ProcessAttribute(ref System.Collections.DictionaryEntry attributeEntry)
{
if (!MISMO.XmlHelper.CanProcessAttribute(this, ref attributeEntry)) return false;
string key = attributeEntry.Key as string;
if (key != "MISMOVersionID") return false; // not supported
return true;
}
System.Collections.Specialized.NameValueCollection IXmlFactoryElement.AdditionalAttributes
{
get
{
return this.AdditionalAttributes;
}
}
protected virtual System.Collections.Specialized.NameValueCollection AdditionalAttributes
{
get { return null; }
}
/// <summary>
/// The name of the Xml element.
/// </summary>
string IXmlFactoryElement.ElementName
{
get
{
return this.ElementName;
}
}
/// <summary>
/// The name of the Xml element.
/// </summary>
protected virtual string ElementName
{
get
{
return "LOAN_APPLICATION";
}
}
#endregion
}
}