person.js
1.76 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
function c_person (personId, photographerId, ownerId, firstname, surname,
company, email, url, cameraId, wmWidth, wmHeight, wmXPos, wmYPos)
{
this.personId = personId;
this.photographerId = photographerId;
this.ownerId = ownerId;
this.firstname = firstname;
this.surname = surname;
this.company = company;
this.email = email;
this.url = url;
this.cameraId = cameraId;
this.wmWidth = wmWidth;
this.wmHeight = wmHeight;
this.wmXPos = wmXPos;
this.wmYPos = wmYPos;
this.personForm = null;
this.connect = function (personForm)
{
this.personForm = personForm;
}
this.reset = function ()
{
if (this.personId != -1)
{
this.personId = -1;
this.photographerId = -1;
this.ownerId = -1;
this.firstname = '';
this.surname = '';
this.company = '';
this.email = '';
this.url = '';
this.cameraId = -1;
this.wmWidth = '';
this.wmHeight = '';
this.wmXPos = '';
this.wmYPos = '';
if (this.personForm != null)
this.personForm.updateForm ();
}
}
this.update = function (p)
{
if (this.personId != p.personId)
{
this.personId = p.personId;
this.photographerId = p.photographerId;
this.ownerId = p.ownerId;
this.firstname = p.firstname;
this.surname = p.surname;
this.company = p.company;
this.email = p.email;
this.url = p.url;
this.cameraId = p.cameraId;
this.wmWidth = p.wmWidth;
this.wmHeight = p.wmHeight;
this.wmXPos = p.wmXPos;
this.wmYPos = p.wmYPos;
if (this.personForm != null)
this.personForm.updateForm ();
}
}
}