Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Text;
|
---|
4 | using IndianHealthService.BMXNet.Model;
|
---|
5 |
|
---|
6 | namespace IndianHealthService.BMXNet.EHR.Model
|
---|
7 | {
|
---|
8 | internal class CiaObject
|
---|
9 | {
|
---|
10 | private string _Ien = "";
|
---|
11 |
|
---|
12 | public string Ien
|
---|
13 | {
|
---|
14 | get { return _Ien; }
|
---|
15 | set { _Ien = value; }
|
---|
16 | }
|
---|
17 |
|
---|
18 | private RemoteSession _remoteSession = null;
|
---|
19 |
|
---|
20 | public RemoteSession RemoteSession
|
---|
21 | {
|
---|
22 | get { return _remoteSession; }
|
---|
23 | set { _remoteSession = value; }
|
---|
24 | }
|
---|
25 |
|
---|
26 |
|
---|
27 |
|
---|
28 | public override bool Equals(object obj)
|
---|
29 | {
|
---|
30 | if (this.Ien == "" || this.Ien == null)
|
---|
31 | {
|
---|
32 |
|
---|
33 | return false;
|
---|
34 | }
|
---|
35 | else
|
---|
36 | {
|
---|
37 | CiaObject other = obj as CiaObject;
|
---|
38 |
|
---|
39 | if (other == null)
|
---|
40 | {
|
---|
41 | return false;
|
---|
42 | }
|
---|
43 |
|
---|
44 | if (this.GetType().IsAssignableFrom(other.GetType()) || this.GetType().IsAssignableFrom(other.GetType()))
|
---|
45 | {
|
---|
46 |
|
---|
47 | return this.Ien.Equals(other.Ien, StringComparison.InvariantCultureIgnoreCase);
|
---|
48 | }
|
---|
49 | else
|
---|
50 | {
|
---|
51 | return false;
|
---|
52 | }
|
---|
53 | }
|
---|
54 | }
|
---|
55 |
|
---|
56 | public override int GetHashCode()
|
---|
57 | {
|
---|
58 | return this.Ien.GetHashCode();
|
---|
59 | }
|
---|
60 |
|
---|
61 | }
|
---|
62 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.