person.js
3.23 KB
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
function c_person (personId, photographerId, ownerId, firstname, surname,
company, email, url, cameraId, wmWidth, wmHeight, wmXPos, wmYPos)
{
this.personId = this._personId = personId;
this.photographerId = this._photographerId = photographerId;
this.ownerId = this._ownerId = ownerId;
this.firstname = this._firstname = firstname;
this.surname = this._surname = surname;
this.company = this._company = company;
this.email = this._company = email;
this.url = this._url = url;
this.cameraId = this._cameraId = cameraId;
this.wmWidth = this._wmWidth = wmWidth;
this.wmHeight = this._wmHeight = wmHeight;
this.wmXPos = this._wmXPos = wmXPos;
this.wmYPos = this._wmYPos = wmYPos;
this.personForm = null;
this.connect = function (personForm)
{
this.personForm = personForm;
}
this.empty = function ()
{
if (this.personId != -1)
{
this.personId = this._personId = -1;
this.photographerId = this._photographerId = -1;
this.ownerId = this._ownerId = -1;
this.firstname = this._firstname = '';
this.surname = this._surname = '';
this.company = this._company = '';
this.email = this._email = '';
this.url = this._url = '';
this.cameraId = this._cameraId = -1;
this.wmWidth = this._wmWidth = '';
this.wmHeight = this._wmHeight = '';
this.wmXPos = this._wmXPos = '';
this.wmYPos = this._wmYPos = '';
if (this.personForm != null)
this.personForm.updateForm ();
}
}
this.reset = function ()
{
this.personId = this._personId;
this.photographerId = this._photographerId;
this.ownerId = this._ownerId;
this.firstname = this._firstname;
this.surname = this._surname;
this.company = this._company;
this.email = this._email;
this.url = this._url;
this.cameraId = this._cameraId;
this.wmWidth = this._wmWidth;
this.wmHeight = this._wmHeight;
this.wmXPos = this._wmXPos;
this.wmYPos = this._wmYPos;
if (this.personForm != null)
this.personForm.updateForm ();
}
this.update = function (p)
{
if (this.personId != p.personId)
{
this.personId = this._personId = p.personId;
this.photographerId = this._photographerId = p.photographerId;
this.ownerId = this._ownerId = p.ownerId;
this.firstname = this._firstname = p.firstname;
this.surname = this._surname = p.surname;
this.company = this._company = p.company;
this.email = this._email = p.email;
this.url = this._url = p.url;
this.cameraId = this._cameraId = p.cameraId;
this.wmWidth = this._wmWidth = p.wmWidth;
this.wmHeight = this._wmHeight = p.wmHeight;
this.wmXPos = this._wmXPos = p.wmXPos;
this.wmYPos = this._wmYPos = p.wmYPos;
if (this.personForm != null)
this.personForm.updateForm ();
}
}
}