Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Text;
|
---|
4 | using IndianHealthService.BMXNet.Model;
|
---|
5 |
|
---|
6 | namespace IndianHealthService.BMXNet.WinForm.Model
|
---|
7 | {
|
---|
8 | internal class WinObject
|
---|
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 | public override bool Equals(object obj)
|
---|
27 | {
|
---|
28 | if (this.Ien == "" || this.Ien == null)
|
---|
29 | {
|
---|
30 |
|
---|
31 | return false;
|
---|
32 | }
|
---|
33 | else
|
---|
34 | {
|
---|
35 | WinObject other = obj as WinObject;
|
---|
36 |
|
---|
37 | if (other == null)
|
---|
38 | {
|
---|
39 | return false;
|
---|
40 | }
|
---|
41 |
|
---|
42 | if (this.GetType().IsAssignableFrom(other.GetType()) || this.GetType().IsAssignableFrom(other.GetType()))
|
---|
43 | {
|
---|
44 |
|
---|
45 | return this.Ien.Equals(other.Ien, StringComparison.InvariantCultureIgnoreCase);
|
---|
46 | }
|
---|
47 | else
|
---|
48 | {
|
---|
49 | return false;
|
---|
50 | }
|
---|
51 | }
|
---|
52 | }
|
---|
53 |
|
---|
54 | public override int GetHashCode()
|
---|
55 | {
|
---|
56 | return this.Ien.GetHashCode();
|
---|
57 | }
|
---|
58 | }
|
---|
59 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.