2848 lines
79 KiB
XML
2848 lines
79 KiB
XML
<views>
|
||
<version>7</version>
|
||
<view id="20001" root="true" orientation="portrait">
|
||
<x>0</x>
|
||
<y>0</y>
|
||
<width>100</width>
|
||
<height>100</height>
|
||
<bgcolor>#CDD9FD</bgcolor>
|
||
|
||
<action event="onBack">
|
||
<![CDATA[
|
||
|
||
viewManager.exitApp();
|
||
]]>
|
||
</action>
|
||
|
||
<action event="onLoad">
|
||
<![CDATA[
|
||
if (persistentStore.isElementAvailable("username", 0)) {
|
||
var editText;
|
||
|
||
editText = new ASSOEdit("1");
|
||
editText.setText(persistentStore.getStringElement("username"));
|
||
}
|
||
|
||
if (persistentStore.isElementAvailable("password")) {
|
||
var editText;
|
||
|
||
editText = new ASSOEdit("2");
|
||
editText.setText(persistentStore.getStringElement("password"));
|
||
}
|
||
]]>
|
||
</action>
|
||
|
||
<image id="2">
|
||
<x>0</x>
|
||
<y>0</y>
|
||
<width>100</width>
|
||
<height>10</height>
|
||
<name>hansetrans.png</name>
|
||
</image>
|
||
|
||
<textview>
|
||
<x>3</x>
|
||
<y>25</y>
|
||
<width>100</width>
|
||
<height>7</height>
|
||
<bgcolor>#CDD9FD</bgcolor>
|
||
<textsize>2.5%</textsize>
|
||
<textcolor>black</textcolor>
|
||
<text>Bitte melden Sie sich an:</text>
|
||
</textview>
|
||
|
||
<edittext id="1">
|
||
<x>3</x>
|
||
<y>33</y>
|
||
<width>94</width>
|
||
<height>65px</height>
|
||
<hint>Benutzername</hint>
|
||
<text></text>
|
||
<bgcolor>ltgray</bgcolor>
|
||
<textsize>2%</textsize>
|
||
<textcolor>black</textcolor>
|
||
</edittext>
|
||
|
||
<edittext id="2">
|
||
<x>3</x>
|
||
<y>48</y>
|
||
<width>94</width>
|
||
<height>65px</height>
|
||
<hint>Passwort</hint>
|
||
<bgcolor>ltgray</bgcolor>
|
||
<textsize>2%</textsize>
|
||
<textcolor>black</textcolor>
|
||
<text></text>
|
||
<password>true</password>
|
||
</edittext>
|
||
|
||
<button>
|
||
<x>10</x>
|
||
<y>70</y>
|
||
<width>80</width>
|
||
<height>60px</height>
|
||
<text>Anmelden</text>
|
||
<action event="onClick">
|
||
<![CDATA[
|
||
var message;
|
||
var result;
|
||
var login;
|
||
var username;
|
||
var password;
|
||
var loginData;
|
||
|
||
username = new ASSOEdit("1");
|
||
password = new ASSOEdit("2");
|
||
|
||
message = new ASSOMessage();
|
||
message.setId("login");
|
||
message.addNode("username", username.getText());
|
||
message.addNode("password", password.getText());
|
||
message.addNode("imei", "1234567890");
|
||
|
||
result = messageManager.send(message);
|
||
|
||
loginData = new ASSOLogin("login");
|
||
loginData.fromXML(result);
|
||
|
||
if (loginData.getErrorNumber() == "0") {
|
||
var initalData;
|
||
|
||
persistentStore.saveStringElement("username", username.getText(), 0);
|
||
persistentStore.saveStringElement("password", password.getText(), 60 * 60 * 2);
|
||
|
||
globalData.putData("login_hqid", loginData.getHQId());
|
||
|
||
message = new ASSOMessage();
|
||
message.setId("getApEnvironment");
|
||
message.addNode("hqid", globalData.getData("login_hqid"));
|
||
|
||
result = messageManager.send(message);
|
||
|
||
initialData = new ASSOAppInitialData();
|
||
initialData.fromXML(result);
|
||
|
||
viewManager.showMessage("login ok");
|
||
|
||
viewManager.pushView("20002");
|
||
} else {
|
||
viewManager.showMessage(loginData.getErrorDescription());
|
||
}
|
||
]]>
|
||
</action>
|
||
</button>
|
||
</view>
|
||
|
||
<view id="20002" root="false" orientation="portrait">
|
||
<x>0</x>
|
||
<y>0</y>
|
||
<width>100</width>
|
||
<height>100</height>
|
||
<bgcolor>#CDD9FD</bgcolor>
|
||
|
||
<action event="onBack">
|
||
<![CDATA[
|
||
viewManager.popView();
|
||
]]>
|
||
</action>
|
||
|
||
<image id="2">
|
||
<x>0</x>
|
||
<y>0</y>
|
||
<width>100</width>
|
||
<height>10</height>
|
||
<name>hansetrans.png</name>
|
||
</image>
|
||
|
||
<button>
|
||
<x>10</x>
|
||
<y>23</y>
|
||
<width>80</width>
|
||
<height>80px</height>
|
||
<text>Kalender</text>
|
||
<action event="onClick">
|
||
<![CDATA[
|
||
viewManager.pushView("20003");
|
||
]]>
|
||
</action>
|
||
</button>
|
||
|
||
<button>
|
||
<x>10</x>
|
||
<y>43</y>
|
||
<width>80</width>
|
||
<height>80px</height>
|
||
<text>Berichte</text>
|
||
<action event="onClick">
|
||
viewManager.pushView("20008");
|
||
</action>
|
||
</button>
|
||
|
||
<button>
|
||
<x>10</x>
|
||
<y>63</y>
|
||
<width>80</width>
|
||
<height>80px</height>
|
||
<text>Kunden</text>
|
||
<action event="onClick">
|
||
viewManager.pushView("20012");
|
||
</action>
|
||
</button>
|
||
</view>
|
||
|
||
<view id="20003" root="false" orientation="portrait">
|
||
<x>0</x>
|
||
<y>0</y>
|
||
<width>100</width>
|
||
<height>100</height>
|
||
<bgcolor>#CDD9FD</bgcolor>
|
||
|
||
<action event="onBack">
|
||
<![CDATA[
|
||
globalData.removeData("calendar_selectedday");
|
||
|
||
viewManager.popView();
|
||
]]>
|
||
</action>
|
||
|
||
<image id="2">
|
||
<x>0</x>
|
||
<y>0</y>
|
||
<width>100</width>
|
||
<height>8</height>
|
||
<name>hansetrans.png</name>
|
||
</image>
|
||
|
||
<calendar id="100">
|
||
<x>2</x>
|
||
<y>10</y>
|
||
<width>96</width>
|
||
<height>75</height>
|
||
<bgcolor>#EEEEEE</bgcolor>
|
||
<textsize>2%</textsize>
|
||
<textcolor>black</textcolor>
|
||
<headline_selectedcolor>yellow</headline_selectedcolor>
|
||
<action event="onLoad">
|
||
<![CDATA[
|
||
var appointmentDataHolder;
|
||
|
||
appointmentDataHolder = new ASSOAppointmentDataHolder("APL");
|
||
|
||
if (globalData.dataAvailable("calendar_prevent_reload") == "false") {
|
||
appointmentDataHolder.loadCalendarForMonth(year, month);
|
||
|
||
//viewManager.showMessage("calendar data reloaded");
|
||
} else {
|
||
globalData.removeData("calendar_prevent_reload");
|
||
}
|
||
|
||
if (globalData.dataAvailable("calendar_selectedday") == "true") {
|
||
var calendar;
|
||
var selectedDay;
|
||
|
||
selectedDay = globalData.getData("calendar_selectedday");
|
||
|
||
calendar = new ASSOCalendar("100");
|
||
calendar.setSelectedDay(selectedDay);
|
||
}
|
||
]]>
|
||
</action>
|
||
|
||
<action event="onHeadlineClicked">
|
||
var appointmentData;
|
||
var appointmentId;
|
||
|
||
appointmentData = new ASSOAppointmentDataHolder("APL");
|
||
appointmentId = appointmentData.getAppointmentIdForDayAndIndex(year, month, day, row);
|
||
|
||
globalData.putData("appointmentid", appointmentId);
|
||
|
||
viewManager.pushView("20004");
|
||
</action>
|
||
|
||
<action event="onNextMonth">
|
||
var appointmentDataHolder;
|
||
|
||
appointmentDataHolder = new ASSOAppointmentDataHolder("APL");
|
||
appointmentDataHolder.loadCalendarForMonth(year, month);
|
||
|
||
//viewManager.showMessage("calendar data reloaded");
|
||
</action>
|
||
|
||
<action event="onPreviousMonth">
|
||
var appointmentDataHolder;
|
||
|
||
appointmentDataHolder = new ASSOAppointmentDataHolder("APL");
|
||
appointmentDataHolder.loadCalendarForMonth(year, month);
|
||
|
||
//viewManager.showMessage("calendar data reloaded");
|
||
</action>
|
||
|
||
<action event="onCellClicked">
|
||
globalData.putData("calendar_selectedday", day);
|
||
</action>
|
||
</calendar>
|
||
|
||
<button>
|
||
<x>1</x>
|
||
<y>88</y>
|
||
<width>97</width>
|
||
<height>60px</height>
|
||
<text>Neuer Termin</text>
|
||
<action event="onClick">
|
||
<![CDATA[
|
||
var calendar;
|
||
|
||
calendar = new ASSOCalendar(100);
|
||
globalData.putData("selected_day", calendar.getSelectedDay());
|
||
globalData.putData("selected_month", calendar.getSelectedMonth());
|
||
globalData.putData("selected_year", calendar.getSelectedYear());
|
||
|
||
viewManager.pushView("20005");
|
||
]]>
|
||
</action>
|
||
</button>
|
||
</view>
|
||
|
||
<view id="20004" root="false" orientation="portrait" name="terminanzeige">
|
||
<x>0</x>
|
||
<y>0</y>
|
||
<width>100</width>
|
||
<height>100</height>
|
||
<bgcolor>#CDD9FD</bgcolor>
|
||
|
||
<action event="onBack">
|
||
<![CDATA[
|
||
globalData.removeData("appointmentid");
|
||
globalData.removeData("current_customer");
|
||
|
||
viewManager.popView();
|
||
]]>
|
||
</action>
|
||
|
||
<action event="onLoad">
|
||
<![CDATA[
|
||
var appointmentData;
|
||
var textView;
|
||
var customerList;
|
||
var message;
|
||
var result;
|
||
var customerList;
|
||
var text;
|
||
|
||
appointmentData = new ASSOAppointment("APL", globalData.getData("appointmentid"));
|
||
|
||
textView = new ASSOText(1);
|
||
textView.setText(appointmentData.getExecdateString());
|
||
|
||
textView = new ASSOText(13);
|
||
textView.setText(appointmentData.getExectimeString());
|
||
|
||
textView = new ASSOText(7);
|
||
textView.setText(appointmentData.getEnddateString());
|
||
|
||
textView = new ASSOText(14);
|
||
textView.setText(appointmentData.getEndtimeString());
|
||
|
||
textView = new ASSOText(2);
|
||
textView.setText("" + appointmentData.getAppCat1String());
|
||
|
||
textView = new ASSOText(8);
|
||
textView.setText("" + appointmentData.getAppCat2String());
|
||
|
||
textView = new ASSOText(9);
|
||
textView.setText("" + appointmentData.getAppCat3String());
|
||
|
||
textView = new ASSOText(10);
|
||
textView.setText("" + appointmentData.getAppCat4String());
|
||
|
||
textView = new ASSOText(3);
|
||
textView.setText("Ersteller: " + appointmentData.getUserFirstname() + " " + appointmentData.getUserName());
|
||
|
||
textView = new ASSOText(6);
|
||
textView.setText(appointmentData.getText());
|
||
|
||
if (appointmentData.getEID() != null) {
|
||
var customer;
|
||
|
||
message = new ASSOMessage();
|
||
message.setId("getCustomerList");
|
||
message.addNode("search", appointmentData.getEID());
|
||
message.addNode("hqid", globalData.getData("login_hqid"));
|
||
|
||
message.addNode
|
||
|
||
// senden der nachricht
|
||
result = messageManager.send(message);
|
||
|
||
customerList = new ASSOCustomerList("customerlist");
|
||
customerList.fromXML(result);
|
||
|
||
customer = new ASSOCustomer("customerlist", appointmentData.getEID());
|
||
|
||
globalData.putData("current_customer", customer);
|
||
|
||
textView = new ASSOText(5);
|
||
textView.setText("Kunde: " + customer.getEID());
|
||
|
||
textView = new ASSOText(11);
|
||
textView.setText(customer.getCustomerName());
|
||
|
||
textView = new ASSOText(12);
|
||
textView.setText(customer.getComp2());
|
||
} else {
|
||
textView = new ASSOText(5);
|
||
textView.setText("Kein Kunde eingetragen");
|
||
|
||
textView = new ASSOText(11);
|
||
textView.setText("");
|
||
|
||
textView = new ASSOText(12);
|
||
textView.setText("");
|
||
}
|
||
|
||
//viewManager.showMessage("AppointmentID: " + appointmentData.getId())
|
||
]]>
|
||
</action>
|
||
|
||
<image>
|
||
<x>0</x>
|
||
<y>0</y>
|
||
<width>100</width>
|
||
<height>8</height>
|
||
<name>hansetrans.png</name>
|
||
</image>
|
||
|
||
<textview id="1">
|
||
<x>3</x>
|
||
<y>9</y>
|
||
<width>45</width>
|
||
<height>6</height>
|
||
<bgcolor>#DDDDDD</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
</textview>
|
||
|
||
<textview id="13">
|
||
<x>33</x>
|
||
<y>9</y>
|
||
<width>45</width>
|
||
<height>6</height>
|
||
<bgcolor>#EEEEEE</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
</textview>
|
||
|
||
<textview id="7">
|
||
<x>52</x>
|
||
<y>9</y>
|
||
<width>45</width>
|
||
<height>6</height>
|
||
<bgcolor>#DDDDDD</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
</textview>
|
||
|
||
<textview id="14">
|
||
<x>81</x>
|
||
<y>9</y>
|
||
<width>16</width>
|
||
<height>6</height>
|
||
<bgcolor>#EEEEEE</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
</textview>
|
||
|
||
<textview>
|
||
<x>47</x>
|
||
<y>9</y>
|
||
<width>5</width>
|
||
<height>6</height>
|
||
<bgcolor>#CDD9FD</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
<text> - </text>
|
||
</textview>
|
||
|
||
<textview id="2">
|
||
<x>3</x>
|
||
<y>16</y>
|
||
<width>94</width>
|
||
<height>5</height>
|
||
<bgcolor>#DDDDDD</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
</textview>
|
||
|
||
<textview id="8">
|
||
<x>3</x>
|
||
<y>21</y>
|
||
<width>94</width>
|
||
<height>5</height>
|
||
<bgcolor>#EEEEEE</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
</textview>
|
||
|
||
<textview id="9">
|
||
<x>3</x>
|
||
<y>26</y>
|
||
<width>94</width>
|
||
<height>5</height>
|
||
<bgcolor>#DDDDDD</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
</textview>
|
||
|
||
<textview id="10">
|
||
<x>3</x>
|
||
<y>31</y>
|
||
<width>94</width>
|
||
<height>5</height>
|
||
<bgcolor>#EEEEEE</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
</textview>
|
||
|
||
<textview id="3">
|
||
<x>3</x>
|
||
<y>37</y>
|
||
<width>94</width>
|
||
<height>5</height>
|
||
<bgcolor>#DDDDDD</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
</textview>
|
||
|
||
<sortedlist id="4">
|
||
<x>3</x>
|
||
<y>43</y>
|
||
<width>94</width>
|
||
<height>11</height>
|
||
<bgcolor>#EEEEEE</bgcolor>
|
||
<sortby direction="b">1</sortby>
|
||
<action event="onGetNumberOfRows">
|
||
var sortedList;
|
||
var appointmentData;
|
||
|
||
sortedList = new ASSOSortedList(4);
|
||
appointmentData = new ASSOAppointment("APL", globalData.getData("appointmentid"));
|
||
|
||
sortedList.setNumberOfRows(appointmentData.getNumberOfParticipants() + 1);
|
||
</action>
|
||
<rows>
|
||
<listrow id="4">
|
||
<x>0</x>
|
||
<y>0</y>
|
||
<width>100</width>
|
||
<height>40</height>
|
||
<bgcolor>yellow</bgcolor>
|
||
<views>
|
||
<view id="321">
|
||
<height>100</height>
|
||
<views>
|
||
<textview sortid="1">
|
||
<action event="onLoad">
|
||
<![CDATA[
|
||
var appointmentData;
|
||
|
||
appointmentData = new ASSOAppointment("APL", globalData.getData("appointmentid"));
|
||
|
||
if (appointmentData.getNumberOfParticipants() == 0) {
|
||
textView.setText("Keine Teilnehmer eingetragen");
|
||
} else {
|
||
if (sortedList.getCurrentRow() == 0) {
|
||
textView.setText("Teilnehmer:");
|
||
} else {
|
||
var appointmentData;
|
||
var sortedList;
|
||
|
||
sortedList = new ASSOSortedList(4);
|
||
appointmentData = new ASSOAppointment("APL", globalData.getData("appointmentid"));
|
||
|
||
textView.setText(appointmentData.getParticipantByIndex(sortedList.getCurrentRow() - 1));
|
||
}
|
||
}
|
||
]]>
|
||
</action>
|
||
<width>100</width>
|
||
<height>100</height>
|
||
<text>Text 1</text>
|
||
<bgcolor>#EEEEEE</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
</textview>
|
||
</views>
|
||
</view>
|
||
</views>
|
||
</listrow>
|
||
</rows>
|
||
</sortedlist>
|
||
|
||
<textview id="5">
|
||
<x>3</x>
|
||
<y>56</y>
|
||
<width>80</width>
|
||
<height>5</height>
|
||
<bgcolor>#DDDDDD</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
<text>EID</text>
|
||
<hint>Kein Kunde vorhanden </hint>
|
||
</textview>
|
||
|
||
<textview id="11">
|
||
<x>3</x>
|
||
<y>61</y>
|
||
<width>80</width>
|
||
<height>5</height>
|
||
<bgcolor>#DDDDDD</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
<lines>1</lines>
|
||
</textview>
|
||
|
||
<textview id="12">
|
||
<x>3</x>
|
||
<y>66</y>
|
||
<width>80</width>
|
||
<height>5</height>
|
||
<bgcolor>#DDDDDD</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
<lines>1</lines>
|
||
</textview>
|
||
|
||
<button>
|
||
<x>85</x>
|
||
<y>56</y>
|
||
<width>13</width>
|
||
<height>16</height>
|
||
<text>B</text>
|
||
<action event="onClick">
|
||
if (globalData.dataAvailable("current_customer") == "true") {
|
||
var customer;
|
||
|
||
customer = globalData.getData("current_customer");
|
||
globalData.putData("customer_eid", customer.getEID());
|
||
}
|
||
|
||
viewManager.pushView("20008");
|
||
</action>
|
||
</button>
|
||
|
||
<textview id="6">
|
||
<x>3</x>
|
||
<y>73</y>
|
||
<width>94</width>
|
||
<height>15</height>
|
||
<bgcolor>#EEEEEE</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
</textview>
|
||
|
||
<button>
|
||
<action event="onClick">
|
||
<![CDATA[
|
||
viewManager.pushView("20005");
|
||
]]>
|
||
</action>
|
||
<x>2</x>
|
||
<y>89</y>
|
||
<width>96</width>
|
||
<height>60px</height>
|
||
<text>Ändern</text>
|
||
</button>
|
||
</view>
|
||
|
||
<view id="20005" root="false" orientation="portrait" name="termin anlegen/ändern">
|
||
<x>0</x>
|
||
<y>0</y>
|
||
<width>100</width>
|
||
<height>100</height>
|
||
<bgcolor>#CDD9FD</bgcolor>
|
||
|
||
<action event="onBack">
|
||
<![CDATA[
|
||
globalData.putData("calendar_prevent_reload", "true");
|
||
globalData.removeData("currentappointment");
|
||
globalData.removeData("selected_participants");
|
||
globalData.removeData("customer_eid");
|
||
globalData.removeData("remove_customer");
|
||
|
||
viewManager.removePersistentData();
|
||
|
||
viewManager.popView();
|
||
]]>
|
||
</action>
|
||
|
||
<action event="onCreate">
|
||
<![CDATA[
|
||
if (globalData.dataAvailable("appointmentid") == "true") {
|
||
var appointmentData;
|
||
var participantList;
|
||
var i;
|
||
|
||
appointmentData = new ASSOAppointment("APL", globalData.getData("appointmentid"));
|
||
|
||
globalData.putData("currentappointment", appointmentData);
|
||
|
||
if (globalData.dataAvailable("selected_participants") == "false") {
|
||
participantList = new ASSOParticipantList("selected_participants");
|
||
participantList.clear();
|
||
|
||
for (i=0; i<appointmentData.getNumberOfParticipants(); i++) {
|
||
participantList.addParticipantById("participantlist", appointmentData.getParticipantIdByIndex(i));
|
||
}
|
||
|
||
//viewManager.showMessage("selected_participants overwritten");
|
||
} else {
|
||
//viewManager.showMessage("selected_participants found");
|
||
}
|
||
}
|
||
]]>
|
||
</action>
|
||
|
||
<textview>
|
||
<x>2</x>
|
||
<y>1</y>
|
||
<width>100</width>
|
||
<height>7</height>
|
||
<bgcolor>transparent</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
<text>Start</text>
|
||
</textview>
|
||
|
||
<datepicker id="1">
|
||
<action event="onLoad">
|
||
<![CDATA[
|
||
if (datepicker.isPersistentDataAvailable() == "false") {
|
||
if (globalData.dataAvailable("currentappointment") == "true") {
|
||
var appointmentData;
|
||
|
||
appointmentData = globalData.getData("currentappointment");
|
||
|
||
datepicker.setDay(appointmentData.getExecdateDay());
|
||
datepicker.setMonth(appointmentData.getExecdateMonth());
|
||
datepicker.setYear(appointmentData.getExecdateYear());
|
||
|
||
datepicker.setText(appointmentData.getExecdateDay() + "." + appointmentData.getExecdateMonth() + "." + appointmentData.getExecdateYear());
|
||
} else {
|
||
var day;
|
||
var month;
|
||
var year;
|
||
|
||
day = globalData.getData("selected_day");
|
||
month = globalData.getData("selected_month");
|
||
year = globalData.getData("selected_year");
|
||
|
||
datepicker.setDay(day);
|
||
datepicker.setMonth(month);
|
||
datepicker.setYear(year);
|
||
|
||
datepicker.setText(day + "." + month + "." + year);
|
||
}
|
||
} else {
|
||
}
|
||
]]>
|
||
</action>
|
||
|
||
<action event="onSetDate">
|
||
var otherPicker;
|
||
|
||
datepicker.setText(day + "." + month + "." + year);
|
||
|
||
otherPicker = new ASSODatePicker("3");
|
||
otherPicker.setDay(day);
|
||
otherPicker.setMonth(month);
|
||
otherPicker.setYear(year);
|
||
|
||
otherPicker.setText(day + "." + month + "." + year);
|
||
</action>
|
||
|
||
<x>1</x>
|
||
<y>6</y>
|
||
<width>30</width>
|
||
<height>7</height>
|
||
<bgcolor>ltgray</bgcolor>
|
||
<textsize>2%</textsize>
|
||
<textcolor>black</textcolor>
|
||
<title>7.11.2011</title>
|
||
</datepicker>
|
||
|
||
<timepicker id="2">
|
||
<action event="onLoad">
|
||
<![CDATA[
|
||
if (timepicker.isPersistentDataAvailable() == "false") {
|
||
if (globalData.dataAvailable("currentappointment") == "true") {
|
||
var appointmentData;
|
||
|
||
appointmentData = globalData.getData("currentappointment");
|
||
|
||
timepicker.setHour(appointmentData.getExecdateHour());
|
||
timepicker.setMinute(appointmentData.getExecdateMinute());
|
||
|
||
timepicker.setText(appointmentData.getExecdateHour() + ":" + appointmentData.getExecdateMinute());
|
||
} else {
|
||
timepicker.setHour(13);
|
||
timepicker.setMinute(30);
|
||
|
||
timepicker.setText("13:30");
|
||
}
|
||
}
|
||
]]>
|
||
</action>
|
||
|
||
<action event="onSetTime">
|
||
var otherPicker;
|
||
|
||
timepicker.setText(util.strpad(hour, 2) + ":" + util.strpad(minute, 2));
|
||
|
||
otherPicker = new ASSOTimePicker("4");
|
||
otherPicker.setHour(hour);
|
||
otherPicker.setMinute(minute);
|
||
|
||
otherPicker.setText(util.strpad(hour, 2) + ":" + util.strpad(minute, 2));
|
||
</action>
|
||
|
||
<x>30</x>
|
||
<y>6</y>
|
||
<width>20</width>
|
||
<height>7</height>
|
||
<bgcolor>ltgray</bgcolor>
|
||
<textsize>2%</textsize>
|
||
<textcolor>black</textcolor>
|
||
<title>13:30</title>
|
||
</timepicker>
|
||
|
||
<textview>
|
||
<x>52</x>
|
||
<y>1</y>
|
||
<width>100</width>
|
||
<height>7</height>
|
||
<bgcolor>transparent</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
<text>Ende</text>
|
||
</textview>
|
||
|
||
<datepicker id="3">
|
||
<action event="onLoad">
|
||
<![CDATA[
|
||
if (datepicker.isPersistentDataAvailable() == "false") {
|
||
if (globalData.dataAvailable("currentappointment") == "true") {
|
||
var appointmentData;
|
||
|
||
appointmentData = globalData.getData("currentappointment");
|
||
|
||
datepicker.setDay(appointmentData.getEnddateDay());
|
||
datepicker.setMonth(appointmentData.getEnddateMonth());
|
||
datepicker.setYear(appointmentData.getEnddateYear());
|
||
|
||
datepicker.setText(appointmentData.getEnddateDay() + "." + appointmentData.getEnddateMonth() + "." + appointmentData.getEnddateYear());
|
||
} else {
|
||
var day;
|
||
var month;
|
||
var year;
|
||
|
||
day = globalData.getData("selected_day");
|
||
month = globalData.getData("selected_month");
|
||
year = globalData.getData("selected_year");
|
||
|
||
datepicker.setDay(day);
|
||
datepicker.setMonth(month);
|
||
datepicker.setYear(year);
|
||
|
||
datepicker.setText(day + "." + month + "." + year);
|
||
}
|
||
} else {
|
||
}
|
||
]]>
|
||
</action>
|
||
|
||
<action event="onSetDate">
|
||
datepicker.setText(day + "." + month + "." + year);
|
||
</action>
|
||
|
||
<x>51</x>
|
||
<y>6</y>
|
||
<width>30</width>
|
||
<height>7</height>
|
||
<bgcolor>ltgray</bgcolor>
|
||
<textsize>2%</textsize>
|
||
<textcolor>black</textcolor>
|
||
<title>2.</title>
|
||
</datepicker>
|
||
|
||
<timepicker id="4">
|
||
<action event="onLoad">
|
||
<![CDATA[
|
||
if (timepicker.isPersistentDataAvailable() == "false") {
|
||
if (globalData.dataAvailable("currentappointment") == "true") {
|
||
var appointmentData;
|
||
|
||
appointmentData = globalData.getData("currentappointment");
|
||
|
||
timepicker.setHour(appointmentData.getEnddateHour());
|
||
timepicker.setMinute(appointmentData.getEnddateMinute());
|
||
|
||
timepicker.setText(appointmentData.getEnddateHour() + ":" + appointmentData.getEnddateMinute());
|
||
} else {
|
||
timepicker.setHour(14);
|
||
timepicker.setMinute(30);
|
||
|
||
timepicker.setText("14:30");
|
||
}
|
||
}
|
||
]]>
|
||
</action>
|
||
|
||
<action event="onSetTime">
|
||
timepicker.setText(util.strpad(hour, 2) + ":" + util.strpad(minute, 2));
|
||
</action>
|
||
|
||
<x>80</x>
|
||
<y>6</y>
|
||
<width>20</width>
|
||
<height>7</height>
|
||
<bgcolor>ltgray</bgcolor>
|
||
<textsize>2%</textsize>
|
||
<textcolor>black</textcolor>
|
||
<title>14:30</title>
|
||
</timepicker>
|
||
|
||
<spinner id="5">
|
||
<x>2</x>
|
||
<y>14</y>
|
||
<width>96</width>
|
||
<height>9</height>
|
||
<bgcolor>white</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
<action event="onCreate">
|
||
<![CDATA[
|
||
var categories;
|
||
var numberOfEntries;
|
||
|
||
categories = new ASSOAppCategories1("appcat1");
|
||
|
||
numberOfEntries = categories.getNumberOfCategories();
|
||
spinner.setNumberOfEntries(numberOfEntries);
|
||
|
||
for (var i = 0; i < numberOfEntries; i++) {
|
||
var text;
|
||
|
||
text = categories.getCategoryByIndex(i);
|
||
|
||
spinner.addEntry(text);
|
||
}
|
||
]]>
|
||
</action>
|
||
|
||
<action event="onLoad">
|
||
<![CDATA[
|
||
if (spinner.isPersistentDataAvailable() == "false") {
|
||
if (globalData.dataAvailable("currentappointment") == "true") {
|
||
var appointmentData;
|
||
|
||
appointmentData = globalData.getData("currentappointment");
|
||
|
||
spinner.setSelectedItemIndex(appointmentData.getAppCat1() - 1);
|
||
}
|
||
}
|
||
]]>
|
||
</action>
|
||
</spinner>
|
||
|
||
<spinner id="6">
|
||
<x>2</x>
|
||
<y>23</y>
|
||
<width>96</width>
|
||
<height>9</height>
|
||
<bgcolor>white</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
<action event="onCreate">
|
||
<![CDATA[
|
||
var categories;
|
||
var numberOfEntries;
|
||
|
||
categories = new ASSOAppCategories2("appcat2");
|
||
|
||
numberOfEntries = categories.getNumberOfCategories();
|
||
spinner.setNumberOfEntries(numberOfEntries);
|
||
|
||
for (var i = 0; i < numberOfEntries; i++) {
|
||
var text;
|
||
|
||
text = categories.getCategoryByIndex(i);
|
||
|
||
spinner.addEntry(text);
|
||
}
|
||
]]>
|
||
</action>
|
||
|
||
<action event="onLoad">
|
||
<![CDATA[
|
||
if (spinner.isPersistentDataAvailable() == "false") {
|
||
if (globalData.dataAvailable("currentappointment") == "true") {
|
||
var appointmentData;
|
||
|
||
appointmentData = globalData.getData("currentappointment");
|
||
|
||
spinner.setSelectedItemIndex(appointmentData.getAppCat2() - 1);
|
||
}
|
||
}
|
||
]]>
|
||
</action>
|
||
</spinner>
|
||
|
||
<spinner id="7">
|
||
<x>2</x>
|
||
<y>32</y>
|
||
<width>96</width>
|
||
<height>9</height>
|
||
<bgcolor>white</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
<action event="onCreate">
|
||
<![CDATA[
|
||
var categories;
|
||
var numberOfEntries;
|
||
|
||
categories = new ASSOAppCategories3("appcat3");
|
||
|
||
numberOfEntries = categories.getNumberOfCategories();
|
||
spinner.setNumberOfEntries(numberOfEntries);
|
||
|
||
for (var i = 0; i < numberOfEntries; i++) {
|
||
var text;
|
||
|
||
text = categories.getCategoryByIndex(i);
|
||
|
||
spinner.addEntry(text);
|
||
}
|
||
]]>
|
||
</action>
|
||
|
||
<action event="onLoad">
|
||
<![CDATA[
|
||
if (spinner.isPersistentDataAvailable() == "false") {
|
||
if (globalData.dataAvailable("currentappointment") == "true") {
|
||
var appointmentData;
|
||
|
||
appointmentData = globalData.getData("currentappointment");
|
||
|
||
spinner.setSelectedItemIndex(appointmentData.getAppCat3() - 1);
|
||
}
|
||
}
|
||
]]>
|
||
</action>
|
||
</spinner>
|
||
|
||
<spinner id="8">
|
||
<x>2</x>
|
||
<y>41</y>
|
||
<width>96</width>
|
||
<height>9</height>
|
||
<bgcolor>white</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
<action event="onCreate">
|
||
<![CDATA[
|
||
var categories;
|
||
var numberOfEntries;
|
||
|
||
categories = new ASSOAppCategories4("appcat4");
|
||
|
||
numberOfEntries = categories.getNumberOfCategories();
|
||
spinner.setNumberOfEntries(numberOfEntries);
|
||
|
||
for (var i = 0; i < numberOfEntries; i++) {
|
||
var text;
|
||
|
||
text = categories.getCategoryByIndex(i);
|
||
|
||
spinner.addEntry(text);
|
||
}
|
||
]]>
|
||
</action>
|
||
|
||
<action event="onLoad">
|
||
<![CDATA[
|
||
if (spinner.isPersistentDataAvailable() == "false") {
|
||
if (globalData.dataAvailable("currentappointment") == "true") {
|
||
var appointmentData;
|
||
|
||
appointmentData = globalData.getData("currentappointment");
|
||
|
||
spinner.setSelectedItemIndex(appointmentData.getAppCat4() - 1);
|
||
}
|
||
}
|
||
]]>
|
||
</action>
|
||
</spinner>
|
||
|
||
<button>
|
||
<x>2</x>
|
||
<y>50</y>
|
||
<width>96</width>
|
||
<height>7</height>
|
||
<text>Teilnehmer auswählen</text>
|
||
<action event="onClick">
|
||
<![CDATA[
|
||
// daten persistieren
|
||
viewManager.persistData();
|
||
|
||
viewManager.pushView("20007");
|
||
]]>
|
||
</action>
|
||
</button>
|
||
|
||
<edittext id="10">
|
||
<action event="onLoad">
|
||
<![CDATA[
|
||
if (globalData.dataAvailable("currentappointment") == "true") {
|
||
var appointmentData;
|
||
|
||
appointmentData = globalData.getData("currentappointment");
|
||
|
||
edittext.setText(appointmentData.getText());
|
||
}
|
||
]]>
|
||
</action>
|
||
|
||
<x>2</x>
|
||
<y>58</y>
|
||
<width>96</width>
|
||
<height>20</height>
|
||
<bgcolor>ltgray</bgcolor>
|
||
<hint>Text</hint>
|
||
<textsize>2%</textsize>
|
||
<textcolor>black</textcolor>
|
||
</edittext>
|
||
|
||
<edittext id="11">
|
||
<action event="onLoad">
|
||
<![CDATA[
|
||
if (globalData.dataAvailable("currentappointment") == "true" && globalData.dataAvailable("customer_eid") == "false") {
|
||
var appointmentData;
|
||
|
||
appointmentData = globalData.getData("currentappointment");
|
||
|
||
if (appointmentData.getEID() != null) {
|
||
edittext.setText(appointmentData.getEID());
|
||
}
|
||
|
||
if (globalData.dataAvailable("remove_customer") == "true") {
|
||
edittext.setText("");
|
||
}
|
||
|
||
} else {
|
||
if (globalData.dataAvailable("customer_eid") == "true") {
|
||
edittext.setText(globalData.getData("customer_eid"));
|
||
}
|
||
}
|
||
]]>
|
||
</action>
|
||
<x>2</x>
|
||
<y>79</y>
|
||
<width>63</width>
|
||
<height>8</height>
|
||
<bgcolor>ltgray</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
<hint>Kundensuchbegriff</hint>
|
||
</edittext>
|
||
|
||
<button>
|
||
<x>68</x>
|
||
<y>79</y>
|
||
<width>30</width>
|
||
<height>9</height>
|
||
<text>Suche</text>
|
||
<action event="onClick">
|
||
<![CDATA[
|
||
var message;
|
||
var edittext;
|
||
var result;
|
||
var customerList;
|
||
|
||
// daten persistieren
|
||
viewManager.persistData();
|
||
|
||
// entfernen (sofern vorhanden) des zu ändernden termins
|
||
globalData.removeData("currentappointment");
|
||
|
||
// erstellen der suchnachricht
|
||
edittext = new ASSOEdit(11);
|
||
|
||
message = new ASSOMessage();
|
||
message.setId("getCustomerList");
|
||
message.addNode("search", edittext.getText());
|
||
message.addNode("hqid", globalData.getData("login_hqid"));
|
||
|
||
// senden der nachricht
|
||
result = messageManager.send(message);
|
||
|
||
customerList = new ASSOCustomerList("customerlist");
|
||
customerList.fromXML(result);
|
||
|
||
if (customerList.getErrorNumber() == "0") {
|
||
viewManager.pushView("20006");
|
||
} else {
|
||
viewManager.showMessage(customerList.getErrorDescription());
|
||
}
|
||
]]>
|
||
</action>
|
||
</button>
|
||
|
||
<button>
|
||
<x>2</x>
|
||
<y>90</y>
|
||
<width>96</width>
|
||
<height>60px</height>
|
||
<action event="onCreate">
|
||
<![CDATA[
|
||
if (globalData.dataAvailable("currentappointment") == "true") {
|
||
button.setText("Termin ändern");
|
||
} else {
|
||
button.setText("Termin anlegen");
|
||
}
|
||
]]>
|
||
</action>
|
||
|
||
<action event="onClick">
|
||
<![CDATA[
|
||
var bemerkung;
|
||
|
||
function sendMessageInternal() {
|
||
var login;
|
||
var categories;
|
||
var datepicker;
|
||
var timepicker;
|
||
var execdatetime;
|
||
var enddatetime;
|
||
var message;
|
||
var kunde;
|
||
var bemerkung;
|
||
var spinner;
|
||
var appCat1Id;
|
||
var appCat2Id;
|
||
var appCat3Id;
|
||
var appCat4Id;
|
||
var selectedParticipants;
|
||
|
||
login = new ASSOLogin("login");
|
||
|
||
datepicker = new ASSODatePicker("1");
|
||
timepicker = new ASSOTimePicker("2");
|
||
execdatetime = datepicker.getSelectedYear() + datepicker.getSelectedMonth() + datepicker.getSelectedDay();
|
||
execdatetime += timepicker.getSelectedHour() + timepicker.getSelectedMinute() + "00";
|
||
|
||
datepicker = new ASSODatePicker("3");
|
||
timepicker = new ASSOTimePicker("4");
|
||
enddatetime = datepicker.getSelectedYear() + datepicker.getSelectedMonth() + datepicker.getSelectedDay();
|
||
enddatetime += timepicker.getSelectedHour() + timepicker.getSelectedMinute() + "00";
|
||
|
||
spinner = new ASSOSpinner("5");
|
||
categories = new ASSOAppCategories1("appcat1");
|
||
appCat1Id = categories.getIdByIndex(spinner.getSelectedItemIndex());
|
||
|
||
spinner = new ASSOSpinner("6");
|
||
categories = new ASSOAppCategories2("appcat2");
|
||
appCat2Id = categories.getIdByIndex(spinner.getSelectedItemIndex());
|
||
|
||
spinner = new ASSOSpinner("7");
|
||
categories = new ASSOAppCategories3("appcat3");
|
||
appCat3Id = categories.getIdByIndex(spinner.getSelectedItemIndex());
|
||
|
||
spinner = new ASSOSpinner("8");
|
||
categories = new ASSOAppCategories4("appcat4");
|
||
appCat4Id = categories.getIdByIndex(spinner.getSelectedItemIndex());
|
||
|
||
selectedParticipants = new ASSOParticipantList("selected_participants");
|
||
|
||
bemerkung = new ASSOEdit("10");
|
||
kunde = new ASSOEdit("11");
|
||
|
||
message = new ASSOMessage;
|
||
message.setId("actionAppointment");
|
||
|
||
if (globalData.dataAvailable("currentappointment") == "false") {
|
||
message.addNode("actionmode", "insert");
|
||
message.addNode("apid", "");
|
||
} else {
|
||
var appointmentData;
|
||
|
||
appointmentData = globalData.getData("currentappointment");
|
||
|
||
message.addNode("actionmode", "update");
|
||
message.addNode("apid", appointmentData.getId());
|
||
}
|
||
|
||
message.addNode("aptext", bemerkung.getText());
|
||
message.addNode("execdatetime", execdatetime);
|
||
message.addNode("enddatetime", enddatetime);
|
||
message.addNode("usrid", login.getUserId());
|
||
message.addNode("hqid", globalData.getData("login_hqid"));
|
||
message.addNode("csid", "");
|
||
|
||
if (globalData.dataAvailable("remove_customer") == "false") {
|
||
message.addNode("cseid", kunde.getText());
|
||
} else {
|
||
message.addNode("cseid", "");
|
||
}
|
||
message.addNode("participants", selectedParticipants.getIdString());
|
||
message.addNode("apcat1", appCat1Id);
|
||
message.addNode("apcat2", appCat2Id);
|
||
message.addNode("apcat3", appCat3Id);
|
||
message.addNode("apcat4", appCat4Id);
|
||
|
||
messageManager.send(message);
|
||
}
|
||
|
||
bemerkung = new ASSOEdit("10");
|
||
|
||
if (bemerkung.getTextLength() > 0) {
|
||
sendMessageInternal();
|
||
|
||
globalData.removeData("calendar_prevent_reload")
|
||
globalData.removeData("selected_participants");
|
||
globalData.removeData("currentappointment");
|
||
globalData.removeData("customer_eid");
|
||
globalData.removeData("appointmentid");
|
||
|
||
viewManager.removePersistentData();
|
||
|
||
viewManager.popToView("20003");
|
||
} else {
|
||
viewManager.showMessage("Es muss ein Text eingegeben werden.");
|
||
}
|
||
]]>
|
||
</action>
|
||
</button>
|
||
</view>
|
||
|
||
<view id="20006" root="false" orientation="portrait" name="kundensuche">
|
||
<x>0</x>
|
||
<y>0</y>
|
||
<width>100</width>
|
||
<height>100</height>
|
||
<bgcolor>#CDD9FD</bgcolor>
|
||
|
||
<action event="onBack">
|
||
<![CDATA[
|
||
viewManager.popView();
|
||
]]>
|
||
</action>
|
||
|
||
<textview>
|
||
<x>5</x>
|
||
<y>2</y>
|
||
<width>100</width>
|
||
<height>7</height>
|
||
<bgcolor>#CDD9FD</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
<text>Bitte Kunden auswählen:</text>
|
||
</textview>
|
||
|
||
<sortedlist id="1">
|
||
<x>5</x>
|
||
<y>10</y>
|
||
<width>90</width>
|
||
<height>80</height>
|
||
<bgcolor>transparent</bgcolor>
|
||
<sortby direction="ab">1</sortby>
|
||
<action event="onGetNumberOfRows">
|
||
var sortedList;
|
||
var customerList;
|
||
|
||
sortedList = new ASSOSortedList(1);
|
||
customerList = new ASSOCustomerList("customerlist");
|
||
|
||
sortedList.setNumberOfRows(customerList.getNumberOfCustomer() + 1);
|
||
</action>
|
||
|
||
<action event="onRowClicked">
|
||
var customerList;
|
||
var sortedList;
|
||
|
||
customerList = new ASSOCustomerList("customerlist");
|
||
|
||
if (row == 0) {
|
||
globalData.removeData("customer_name");
|
||
globalData.removeData("customer_eid");
|
||
globalData.removeData("current_customer");
|
||
|
||
globalData.putData("remove_customer", true);
|
||
} else {
|
||
globalData.putData("customer_name", customerList.getCustomerNameByIndex(row - 1));
|
||
globalData.putData("customer_eid", customerList.getCustomerEIDByIndex(row - 1));
|
||
|
||
globalData.removeData("remove_customer");
|
||
}
|
||
|
||
viewManager.popView();
|
||
</action>
|
||
|
||
<rows>
|
||
<listrow>
|
||
<x>0</x>
|
||
<y>0</y>
|
||
<width>100</width>
|
||
<height>10</height>
|
||
<bgcolor>transparent</bgcolor>
|
||
<views>
|
||
<view id="321">
|
||
<height>100</height>
|
||
<views>
|
||
<textview sortid="1">
|
||
<action event="onLoad">
|
||
<![CDATA[
|
||
var customerList;
|
||
var sortedList;
|
||
|
||
sortedList = new ASSOSortedList(1);
|
||
customerList = new ASSOCustomerList("customerlist");
|
||
|
||
if (sortedList.getCurrentRow() == 0) {
|
||
textView.setText("Keinen Kunden auswählen");
|
||
} else {
|
||
textView.setText(customerList.getCustomerNameByIndex(sortedList.getCurrentRow() - 1));
|
||
}
|
||
]]>
|
||
</action>
|
||
<width>100</width>
|
||
<height>100</height>
|
||
<bgcolor>transparent</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
</textview>
|
||
</views>
|
||
</view>
|
||
</views>
|
||
</listrow>
|
||
</rows>
|
||
</sortedlist>
|
||
</view>
|
||
|
||
<view id="20007" root="false" orientation="portrait">
|
||
<x>0</x>
|
||
<y>0</y>
|
||
<width>100</width>
|
||
<height>100</height>
|
||
<bgcolor>#CDD9FD</bgcolor>
|
||
|
||
<action event="onBack">
|
||
<![CDATA[
|
||
viewManager.popView();
|
||
]]>
|
||
</action>
|
||
|
||
<textview>
|
||
<x>5</x>
|
||
<y>2</y>
|
||
<width>100</width>
|
||
<height>7</height>
|
||
<bgcolor>transparent</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
<text>Bitte Teilnehmer auswählen:</text>
|
||
</textview>
|
||
|
||
<textscrollview id="9">
|
||
<action event="onLoad">
|
||
<![CDATA[
|
||
var appointmentData;
|
||
var participantList;
|
||
var selectedParticipantList;
|
||
var i;
|
||
|
||
participantList = new ASSOParticipantList("participantlist");
|
||
selectedParticipantList = new ASSOParticipantList("selected_participants");
|
||
|
||
textscrollview.setSelectedParticipants(selectedParticipantList);
|
||
|
||
textscrollview.setNumberOfRows(participantList.getNumberOfParticipants());
|
||
|
||
for (i=0; i<participantList.getNumberOfParticipants(); i++) {
|
||
textscrollview.addTextRow(participantList.getParticipantNameByIndex(i));
|
||
}
|
||
|
||
]]>
|
||
</action>
|
||
|
||
<action event="onRowClicked">
|
||
</action>
|
||
|
||
<x>5</x>
|
||
<y>8</y>
|
||
<width>90</width>
|
||
<height>80</height>
|
||
<bgcolor>white</bgcolor>
|
||
</textscrollview>
|
||
|
||
<button>
|
||
<x>2</x>
|
||
<y>90</y>
|
||
<width>96</width>
|
||
<height>10</height>
|
||
<text>Teilnehmer speichern</text>
|
||
|
||
<action event="onClick">
|
||
<![CDATA[
|
||
var textscrollview;
|
||
var participantList;
|
||
var i;
|
||
|
||
textscrollview = new ASSOTextScrollView("9");
|
||
|
||
participantList = new ASSOParticipantList("selected_participants");
|
||
participantList.clear();
|
||
|
||
for (i=0; i<textscrollview.getNumberOfSelectedRows(); i++) {
|
||
participantList.addParticipantByIndex("participantlist", textscrollview.getSelectedRowNumberByIndex(i));
|
||
}
|
||
|
||
//viewManager.showMessage("selected_participants written");
|
||
|
||
viewManager.popView();
|
||
]]>
|
||
</action>
|
||
</button>
|
||
</view>
|
||
|
||
<view id="20008" root="false" orientation="portrait">
|
||
<x>0</x>
|
||
<y>0</y>
|
||
<width>100</width>
|
||
<height>100</height>
|
||
<bgcolor>#CDD9FD</bgcolor>
|
||
|
||
<action event="onBack">
|
||
<![CDATA[
|
||
globalData.removeData("reports");
|
||
globalData.removeData("current_customer");
|
||
globalData.removeData("customer_eid");
|
||
globalData.removeData("customer_name");
|
||
|
||
viewManager.removePersistentData();
|
||
|
||
viewManager.popView();
|
||
]]>
|
||
</action>
|
||
|
||
<action event="onLoad">
|
||
<![CDATA[
|
||
var sortedList;
|
||
|
||
if (globalData.dataAvailable("clear_reports") == "true") {
|
||
globalData.removeData("reports");
|
||
|
||
globalData.removeData("clear_reports");
|
||
}
|
||
|
||
sortedList = new ASSOSortedList("5");
|
||
sortedList.refreshView();
|
||
|
||
if (globalData.dataAvailable("customer_eid") == "true") {
|
||
var customerList;
|
||
var customer;
|
||
|
||
customerList = new ASSOCustomerList("customerlist");
|
||
customer = new ASSOCustomer("customerlist", globalData.getData("customer_eid"));
|
||
|
||
globalData.putData("current_customer", customer);
|
||
|
||
globalData.removeData("customer_eid");
|
||
}
|
||
]]>
|
||
</action>
|
||
|
||
<textview>
|
||
<x>2</x>
|
||
<y>1</y>
|
||
<width>100</width>
|
||
<height>7</height>
|
||
<bgcolor>transparent</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
<text>Von</text>
|
||
</textview>
|
||
|
||
<datepicker id="1">
|
||
<action event="onLoad">
|
||
<![CDATA[
|
||
if (datepicker.isPersistentDataAvailable() == "false") {
|
||
var calendar;
|
||
var day;
|
||
var month;
|
||
var year;
|
||
|
||
calendar = util.getCalendar();
|
||
util.addDay(calendar, -7);
|
||
|
||
day = util.getCalendarDay(calendar);
|
||
month = util.getCalendarMonth(calendar);
|
||
year = util.getCalendarYear(calendar);
|
||
|
||
datepicker.setDay(day);
|
||
datepicker.setMonth(month);
|
||
datepicker.setYear(year);
|
||
|
||
datepicker.setText(util.strpad(day, 2) + "." + util.strpad(month,2) + "." + year);
|
||
}
|
||
]]>
|
||
</action>
|
||
|
||
<action event="onSetDate">
|
||
datepicker.setText(util.strpad(day,2) + "." + util.strpad(month,2) + "." + year);
|
||
</action>
|
||
|
||
<x>1</x>
|
||
<y>6</y>
|
||
<width>30</width>
|
||
<height>7</height>
|
||
<bgcolor>ltgray</bgcolor>
|
||
<textsize>2%</textsize>
|
||
<textcolor>black</textcolor>
|
||
<title>7.11.2011</title>
|
||
</datepicker>
|
||
|
||
<timepicker id="2">
|
||
<action event="onLoad">
|
||
<![CDATA[
|
||
if (timepicker.isPersistentDataAvailable() == "false") {
|
||
timepicker.setHour(0);
|
||
timepicker.setMinute(0);
|
||
|
||
timepicker.setText("00:00");
|
||
}
|
||
]]>
|
||
</action>
|
||
|
||
<action>
|
||
timepicker.setText(util.strpad(hour,2) + ":" + util.strpad(minute,2));
|
||
</action>
|
||
<x>30</x>
|
||
<y>6</y>
|
||
<width>20</width>
|
||
<height>7</height>
|
||
<bgcolor>ltgray</bgcolor>
|
||
<textsize>2%</textsize>
|
||
<textcolor>black</textcolor>
|
||
<title>13:30</title>
|
||
</timepicker>
|
||
|
||
<textview>
|
||
<x>52</x>
|
||
<y>1</y>
|
||
<width>100</width>
|
||
<height>7</height>
|
||
<bgcolor>transparent</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
<text>Bis</text>
|
||
</textview>
|
||
|
||
<datepicker id="3">
|
||
<action event="onLoad">
|
||
<![CDATA[
|
||
if (datepicker.isPersistentDataAvailable() == "false") {
|
||
var day;
|
||
var month;
|
||
var year;
|
||
|
||
day = util.getCurrentDay();
|
||
month = util.getCurrentMonth();
|
||
year = util.getCurrentYear();
|
||
|
||
datepicker.setDay(day);
|
||
datepicker.setMonth(month);
|
||
datepicker.setYear(year);
|
||
|
||
datepicker.setText(util.strpad(day, 2) + "." + util.strpad(month,2) + "." + year);
|
||
} else {
|
||
}
|
||
]]>
|
||
</action>
|
||
|
||
<action event="onSetDate">
|
||
datepicker.setText(day + "." + month + "." + year);
|
||
</action>
|
||
|
||
<x>51</x>
|
||
<y>6</y>
|
||
<width>30</width>
|
||
<height>7</height>
|
||
<bgcolor>ltgray</bgcolor>
|
||
<textsize>2%</textsize>
|
||
<textcolor>black</textcolor>
|
||
<title>2.</title>
|
||
</datepicker>
|
||
|
||
<timepicker id="4">
|
||
<action event="onLoad">
|
||
<![CDATA[
|
||
if (timepicker.isPersistentDataAvailable() == "false") {
|
||
timepicker.setHour(23);
|
||
timepicker.setMinute(59);
|
||
|
||
timepicker.setText("23:59");
|
||
}
|
||
]]>
|
||
</action>
|
||
|
||
<action event="onSetTime">
|
||
timepicker.setText(util.strpad(hour, 2) + ":" + util.strpad(minute, 2));
|
||
</action>
|
||
|
||
<x>80</x>
|
||
<y>6</y>
|
||
<width>20</width>
|
||
<height>7</height>
|
||
<bgcolor>ltgray</bgcolor>
|
||
<textsize>2%</textsize>
|
||
<textcolor>black</textcolor>
|
||
<title>14:30</title>
|
||
</timepicker>
|
||
|
||
<spinner id="6">
|
||
<x>2</x>
|
||
<y>13</y>
|
||
<width>96</width>
|
||
<height>9</height>
|
||
<bgcolor>white</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
<action event="onCreate">
|
||
<![CDATA[
|
||
var reportTypes;
|
||
var numberOfEntries;
|
||
|
||
reportTypes = new ASSOReportTypes("reporttypes");
|
||
|
||
numberOfEntries = reportTypes.getNumberOfReports();
|
||
spinner.setNumberOfEntries(numberOfEntries + 1);
|
||
|
||
spinner.addEntry("Alle");
|
||
|
||
for (var i = 0; i < numberOfEntries; i++) {
|
||
var text;
|
||
|
||
text = reportTypes.getReportNameByIndex(i);
|
||
|
||
spinner.addEntry(text);
|
||
}
|
||
]]>
|
||
</action>
|
||
|
||
<action event="onLoad">
|
||
<![CDATA[
|
||
if (spinner.isPersistentDataAvailable() == "false") {
|
||
if (globalData.dataAvailable("currentappointment") == "true") {
|
||
var appointmentData;
|
||
|
||
appointmentData = globalData.getData("currentappointment");
|
||
|
||
spinner.setSelectedItemIndex(appointmentData.getAppCat1() - 1);
|
||
}
|
||
}
|
||
]]>
|
||
</action>
|
||
</spinner>
|
||
|
||
<edittext id="11">
|
||
<action event="onLoad">
|
||
<![CDATA[
|
||
if (globalData.dataAvailable("currentappointment") == "true" && globalData.dataAvailable("customer_eid") == "false") {
|
||
var appointmentData;
|
||
|
||
appointmentData = globalData.getData("currentappointment");
|
||
|
||
edittext.setText(appointmentData.getEID());
|
||
} else {
|
||
if (globalData.dataAvailable("customer_eid") == "true") {
|
||
edittext.setText(globalData.getData("customer_eid"));
|
||
}
|
||
}
|
||
|
||
if (globalData.dataAvailable("remove_customer") == "true") {
|
||
edittext.setText("");
|
||
}
|
||
]]>
|
||
</action>
|
||
<x>2</x>
|
||
<y>22</y>
|
||
<width>63</width>
|
||
<height>8</height>
|
||
<bgcolor>ltgray</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
<hint>Kundensuchbegriff</hint>
|
||
</edittext>
|
||
|
||
<button>
|
||
<x>68</x>
|
||
<y>22</y>
|
||
<width>30</width>
|
||
<height>9</height>
|
||
<text>Suche</text>
|
||
|
||
<action event="onClick">
|
||
<![CDATA[
|
||
var message;
|
||
var edittext;
|
||
var result;
|
||
var customerList;
|
||
|
||
// daten persistieren
|
||
viewManager.persistData();
|
||
|
||
// reports löschen
|
||
globalData.putData("clear_reports", "true");
|
||
|
||
// entfernen (sofern vorhanden) des zu ändernden termins
|
||
globalData.removeData("currentappointment");
|
||
|
||
// erstellen der suchnachricht
|
||
edittext = new ASSOEdit(11);
|
||
|
||
message = new ASSOMessage();
|
||
message.setId("getCustomerList");
|
||
message.addNode("search", edittext.getText());
|
||
message.addNode("hqid", globalData.getData("login_hqid"));
|
||
|
||
|
||
// senden der nachricht
|
||
result = messageManager.send(message);
|
||
|
||
customerList = new ASSOCustomerList("customerlist");
|
||
customerList.fromXML(result);
|
||
|
||
if (customerList.getErrorNumber() == "0") {
|
||
viewManager.pushView("20006");
|
||
} else {
|
||
viewManager.showMessage(customerList.getErrorDescription());
|
||
}
|
||
]]>
|
||
</action>
|
||
</button>
|
||
|
||
<button>
|
||
<x>2</x>
|
||
<y>31</y>
|
||
<width>96</width>
|
||
<height>10</height>
|
||
<text>Aktualisieren</text>
|
||
|
||
<action event="onClick">
|
||
var sortedList;
|
||
var message;
|
||
var edittext;
|
||
var result;
|
||
var reportsList;
|
||
var customer;
|
||
var reports;
|
||
var datepicker;
|
||
var timepicker;
|
||
var fromDate;
|
||
var toDate;
|
||
var reportTypes;
|
||
var spinner;
|
||
|
||
datepicker = new ASSODatePicker("1");
|
||
timepicker = new ASSOTimePicker("2");
|
||
|
||
fromDate = datepicker.getSelectedYear() + "-" + datepicker.getSelectedMonth() + "-" + datepicker.getSelectedDay() + " " + util.strpad(timepicker.getSelectedHour(), 2) + ":" + util.strpad(timepicker.getSelectedMinute(),2) + ":00";
|
||
|
||
datepicker = new ASSODatePicker("3");
|
||
timepicker = new ASSOTimePicker("4");
|
||
|
||
toDate = datepicker.getSelectedYear() + "-" + datepicker.getSelectedMonth() + "-" + util.strpad(datepicker.getSelectedDay(),2) + " " + timepicker.getSelectedHour() + ":" + timepicker.getSelectedMinute() + ":59";
|
||
|
||
spinner = new ASSOSpinner("6");
|
||
|
||
reportTypes = new ASSOReportTypes("reporttypes");
|
||
|
||
message = new ASSOMessage();
|
||
message.setId("getReportList");
|
||
message.addNode("fromdaterange", fromDate);
|
||
message.addNode("todaterange", toDate);
|
||
message.addNode("hqid", globalData.getData("login_hqid"));
|
||
message.addNode("rpobjtype", "cs");
|
||
|
||
if (spinner.getSelectedItemIndex() > 0) {
|
||
reportTypeId = reportTypes.getReportIdByIndex(spinner.getSelectedItemIndex() - 1);
|
||
|
||
message.addNode("rptype", reportTypeId);
|
||
}
|
||
|
||
if (globalData.dataAvailable("current_customer") == "true") {
|
||
customer = globalData.getData("current_customer");
|
||
|
||
message.addNode("rpobjid", customer.getId());
|
||
|
||
} else {
|
||
message.addNode("rpobjid", "");
|
||
}
|
||
|
||
// senden der nachricht
|
||
result = messageManager.send(message);
|
||
|
||
globalData.removeData("reports");
|
||
|
||
reportsList = new ASSOReportsDataHolder("reports");
|
||
reportsList.fromXML(result);
|
||
|
||
reports = new ASSOReportsDataHolder("reports");
|
||
|
||
viewManager.showMessage(reports.getNumberOfReports() + " Berichte geladen");
|
||
|
||
sortedList = new ASSOSortedList("5");
|
||
sortedList.refreshView();
|
||
</action>
|
||
</button>
|
||
|
||
<sortedlist id="5">
|
||
<x>2</x>
|
||
<y>41</y>
|
||
<width>96</width>
|
||
<height>48</height>
|
||
<bgcolor>#CDD9FD</bgcolor>
|
||
<sortby direction="ab">1</sortby>
|
||
<action event="onGetNumberOfRows">
|
||
sortedList = new ASSOSortedList(5);
|
||
|
||
if (globalData.dataAvailable("reports") == "true") {
|
||
var sortedList;
|
||
var reports;
|
||
|
||
reports = new ASSOReportsDataHolder("reports");
|
||
|
||
sortedList.setNumberOfRows(reports.getNumberOfReports());
|
||
} else {
|
||
sortedList.setNumberOfRows(0);
|
||
}
|
||
</action>
|
||
|
||
<action event="onRowClicked">
|
||
var reports;
|
||
var sortedList;
|
||
var report;
|
||
|
||
viewManager.persistData();
|
||
|
||
reports = new ASSOReportsDataHolder("reports");
|
||
|
||
report = new ASSOReport("reports", reports.getReportIdByIndex(row));
|
||
|
||
globalData.putData("current_report", report);
|
||
|
||
viewManager.pushView("20009");
|
||
</action>
|
||
|
||
<rows>
|
||
<listrow>
|
||
<x>0</x>
|
||
<y>0</y>
|
||
<width>100</width>
|
||
<height>33</height>
|
||
<bgcolor>black</bgcolor>
|
||
<views>
|
||
<view id="321">
|
||
<height>100</height>
|
||
<views>
|
||
<textview>
|
||
<action event="onLoad">
|
||
<![CDATA[
|
||
var reports;
|
||
var sortedList;
|
||
var report;
|
||
|
||
sortedList = new ASSOSortedList(5);
|
||
reports = new ASSOReportsDataHolder("reports");
|
||
|
||
report = new ASSOReport("reports", reports.getReportIdByIndex(sortedList.getCurrentRow()));
|
||
|
||
textView.setText(report.getId());
|
||
]]>
|
||
</action>
|
||
<x>2</x>
|
||
<width>30</width>
|
||
<height>25</height>
|
||
<bgcolor>transparent</bgcolor>
|
||
<textsize>2%</textsize>
|
||
<textcolor>black</textcolor>
|
||
</textview>
|
||
<textview>
|
||
<action event="onLoad">
|
||
<![CDATA[
|
||
var reports;
|
||
var sortedList;
|
||
var report;
|
||
|
||
sortedList = new ASSOSortedList(5);
|
||
reports = new ASSOReportsDataHolder("reports");
|
||
|
||
report = new ASSOReport("reports", reports.getReportIdByIndex(sortedList.getCurrentRow()));
|
||
|
||
textView.setText(report.getCreateTimeString());
|
||
]]>
|
||
</action>
|
||
<x>30</x>
|
||
<width>70</width>
|
||
<height>30</height>
|
||
<bgcolor>transparent</bgcolor>
|
||
<textsize>2%</textsize>
|
||
<textcolor>black</textcolor>
|
||
</textview>
|
||
<textview>
|
||
<action event="onLoad">
|
||
<![CDATA[
|
||
var reports;
|
||
var sortedList;
|
||
var report;
|
||
|
||
sortedList = new ASSOSortedList(5);
|
||
reports = new ASSOReportsDataHolder("reports");
|
||
|
||
report = new ASSOReport("reports", reports.getReportIdByIndex(sortedList.getCurrentRow()));
|
||
|
||
textView.setText(report.getText());
|
||
]]>
|
||
</action>
|
||
<x>2</x>
|
||
<y>30</y>
|
||
<width>70</width>
|
||
<height>70</height>
|
||
<bgcolor>transparent</bgcolor>
|
||
<textsize>2%</textsize>
|
||
<textcolor>black</textcolor>
|
||
<lines>3</lines>
|
||
</textview>
|
||
</views>
|
||
</view>
|
||
</views>
|
||
</listrow>
|
||
</rows>
|
||
</sortedlist>
|
||
|
||
<button>
|
||
<x>2</x>
|
||
<y>90</y>
|
||
<width>96</width>
|
||
<height>10</height>
|
||
<text>Bericht anlegen</text>
|
||
|
||
<action event="onLoad">
|
||
if (globalData.dataAvailable("customer_eid") == "true" || globalData.dataAvailable("current_customer") == "true") {
|
||
button.setEnabled(true);
|
||
} else {
|
||
button.setEnabled(false);
|
||
}
|
||
</action>
|
||
|
||
<action event="onClick">
|
||
<![CDATA[
|
||
globalData.removeData("current_report");
|
||
|
||
viewManager.persistData();
|
||
|
||
viewManager.pushView("20011");
|
||
]]>
|
||
</action>
|
||
</button>
|
||
</view>
|
||
|
||
<view id="20009" root="false" orientation="portrait" name="bericht ansehen">
|
||
<x>0</x>
|
||
<y>0</y>
|
||
<width>100</width>
|
||
<height>100</height>
|
||
<bgcolor>#CDD9FD</bgcolor>
|
||
|
||
<action event="onBack">
|
||
<![CDATA[
|
||
viewManager.popView();
|
||
]]>
|
||
</action>
|
||
|
||
<action event="onLoad">
|
||
<![CDATA[
|
||
if (globalData.dataAvailable("current_report") == "true") {
|
||
var report;
|
||
var textview;
|
||
var login;
|
||
var button;
|
||
|
||
report = globalData.getData("current_report");
|
||
|
||
login = new ASSOLogin("login");
|
||
|
||
if (report.isConfidential() == true) {
|
||
var checkbox;
|
||
|
||
checkbox = new ASSOCheckbox("3");
|
||
checkbox.setChecked(true);
|
||
}
|
||
|
||
textview = new ASSOText("1");
|
||
textview.setText(report.getId() + " " + report.getCreateTimeString());
|
||
|
||
textview = new ASSOText("2");
|
||
textview.setText(report.getFirstname() + " " + report.getName());
|
||
|
||
textview = new ASSOText("4");
|
||
textview.setText(report.getText());
|
||
|
||
button = new ASSOButton("5");
|
||
|
||
if (report.getUserId() == login.getUserId()) {
|
||
viewManager.showMessage("user OK!");
|
||
button.setEnabled(true);
|
||
} else {
|
||
button.setEnabled(true);
|
||
viewManager.showMessage("anderer user!");
|
||
}
|
||
viewManager.showMessage("report available");
|
||
} else {
|
||
viewManager.showMessage("current report not found");
|
||
}
|
||
]]>
|
||
</action>
|
||
|
||
<textview>
|
||
<x>2</x>
|
||
<y>2</y>
|
||
<width>96</width>
|
||
<height>7</height>
|
||
<bgcolor>transparent</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
<text>Bericht:</text>
|
||
</textview>
|
||
|
||
<textview id="1">
|
||
<x>2</x>
|
||
<y>10</y>
|
||
<width>96</width>
|
||
<height>7</height>
|
||
<bgcolor>#DDDDDD</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
<text>Datum</text>
|
||
</textview>
|
||
|
||
<textview id="2">
|
||
<x>2</x>
|
||
<y>17</y>
|
||
<width>96</width>
|
||
<height>7</height>
|
||
<bgcolor>#EEEEEE</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
<text>Ersteller</text>
|
||
</textview>
|
||
|
||
<checkbox id="3">
|
||
<x>2</x>
|
||
<y>24</y>
|
||
<width>96</width>
|
||
<height>10</height>
|
||
<bgcolor>#DDDDDD</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
<text>Bericht vertraulich</text>
|
||
<enabled>false</enabled>
|
||
</checkbox>
|
||
|
||
<textview id="4">
|
||
<x>2</x>
|
||
<y>34</y>
|
||
<width>96</width>
|
||
<height>21</height>
|
||
<bgcolor>#EEEEEE</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
<text>Text</text>
|
||
<lines>40</lines>
|
||
</textview>
|
||
|
||
<button id="5">
|
||
<x>2</x>
|
||
<y>90</y>
|
||
<width>96</width>
|
||
<height>10</height>
|
||
<text>Bericht ändern</text>
|
||
|
||
<action event="onClick">
|
||
<![CDATA[
|
||
viewManager.pushView("20010");
|
||
]]>
|
||
</action>
|
||
</button>
|
||
</view>
|
||
|
||
<view id="20010" root="false" orientation="portrait" name="bericht ändern">
|
||
<x>0</x>
|
||
<y>0</y>
|
||
<width>100</width>
|
||
<height>100</height>
|
||
<bgcolor>#CDD9FD</bgcolor>
|
||
|
||
<action event="onBack">
|
||
<![CDATA[
|
||
viewManager.popView();
|
||
]]>
|
||
</action>
|
||
|
||
<action event="onLoad">
|
||
<![CDATA[
|
||
var report;
|
||
var edit;
|
||
var textview;
|
||
var button;
|
||
|
||
report = globalData.getData("current_report");
|
||
|
||
textview = new ASSOText("0");
|
||
textview.setText("Bericht ändern");
|
||
|
||
textview = new ASSOText("1");
|
||
textview.setText(report.getCreateTimeDay() + "." + report.getCreateTimeMonth() + "." + report.getCreateTimeYear());
|
||
|
||
textview = new ASSOText("2");
|
||
textview.setText(report.getCreateTimeHour() + ":" + report.getCreateTimeMinute());
|
||
|
||
if (report.isConfidential() == true) {
|
||
var checkbox;
|
||
|
||
checkbox = new ASSOCheckbox("4");
|
||
checkbox.setChecked(true);
|
||
}
|
||
|
||
textview = new ASSOText("3");
|
||
textview.setText(report.getFirstname() + " " + report.getName());
|
||
|
||
edit = new ASSOEdit("5");
|
||
edit.setText(report.getText());
|
||
|
||
button = new ASSOButton("6");
|
||
button.setText("Bericht ändern");
|
||
|
||
viewManager.showMessage("report available");
|
||
]]>
|
||
</action>
|
||
|
||
<textview id="0">
|
||
<x>2</x>
|
||
<y>3</y>
|
||
<width>100</width>
|
||
<height>7</height>
|
||
<bgcolor>transparent</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
<text>Reportdetails ändern:</text>
|
||
</textview>
|
||
|
||
<textview id="1">
|
||
<x>2</x>
|
||
<y>9</y>
|
||
<width>30</width>
|
||
<height>6</height>
|
||
<bgcolor>#DDDDDD</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
</textview>
|
||
|
||
<textview id="2">
|
||
<x>30</x>
|
||
<y>9</y>
|
||
<width>25</width>
|
||
<height>6</height>
|
||
<bgcolor>#EEEEEE</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
</textview>
|
||
|
||
<textview id="3">
|
||
<x>2</x>
|
||
<y>15</y>
|
||
<width>100</width>
|
||
<height>7</height>
|
||
<bgcolor>#EEEEEE</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
<hint>Ersteller</hint>
|
||
</textview>
|
||
|
||
<checkbox id="4">
|
||
<x>2</x>
|
||
<y>22</y>
|
||
<width>100</width>
|
||
<height>10</height>
|
||
<bgcolor>#DDDDDD</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
<text>Ist vertraulich</text>
|
||
</checkbox>
|
||
|
||
<edittext id="5">
|
||
<x>2</x>
|
||
<y>31</y>
|
||
<width>100</width>
|
||
<height>21</height>
|
||
<bgcolor>#EEEEEE</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
<hint>Text</hint>
|
||
<lines>3</lines>
|
||
</edittext>
|
||
|
||
<button id="6">
|
||
<x>2</x>
|
||
<y>90</y>
|
||
<width>96</width>
|
||
<height>10</height>
|
||
|
||
<action event="onClick">
|
||
<![CDATA[
|
||
var report;
|
||
var message;
|
||
var text;
|
||
var result;
|
||
var customer;
|
||
var checkbox;
|
||
var login;
|
||
|
||
text = new ASSOEdit("5");
|
||
checkbox = new ASSOCheckbox("4");
|
||
|
||
report = globalData.getData("current_report");
|
||
|
||
message = new ASSOMessage();
|
||
message.setId("actionReport");
|
||
message.addNode("actionmode", "update");
|
||
message.addNode("rpid", report.getId());
|
||
message.addNode("rpobjtype", "cs");
|
||
message.addNode("hqid", globalData.getData("login_hqid"));
|
||
message.addNode("rptext", text.getText());
|
||
if (checkbox.isChecked() == true) {
|
||
message.addNode("rpconfidential", "1");
|
||
} else {
|
||
message.addNode("rpconfidential", "0");
|
||
}
|
||
|
||
// senden der nachricht
|
||
result = messageManager.send(message);
|
||
|
||
viewManager.popToView("20008");
|
||
]]>
|
||
</action>
|
||
</button>
|
||
</view>
|
||
|
||
<view id="20011" root="false" orientation="portrait" name="bericht anlegen">
|
||
<x>0</x>
|
||
<y>0</y>
|
||
<width>100</width>
|
||
<height>100</height>
|
||
<bgcolor>#CDD9FD</bgcolor>
|
||
|
||
<action event="onBack">
|
||
<![CDATA[
|
||
viewManager.popView();
|
||
]]>
|
||
</action>
|
||
|
||
<action event="onLoad">
|
||
<![CDATA[
|
||
var textview;
|
||
var loginData;
|
||
|
||
textview = new ASSOText("0");
|
||
textview.setText("Bericht anlegen");
|
||
|
||
button = new ASSOButton("6");
|
||
button.setText("Bericht anlegen");
|
||
|
||
loginData = new ASSOLogin("login");
|
||
|
||
textview = new ASSOText("3");
|
||
textview.setText(loginData.getUserFirstname() + " " + loginData.getUserName());
|
||
]]>
|
||
</action>
|
||
|
||
<textview id="0">
|
||
<x>2</x>
|
||
<y>1</y>
|
||
<width>100</width>
|
||
<height>7</height>
|
||
<bgcolor>transparent</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
</textview>
|
||
|
||
<spinner id="1">
|
||
<x>1</x>
|
||
<y>6</y>
|
||
<width>98</width>
|
||
<height>9</height>
|
||
<bgcolor>white</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
<action event="onCreate">
|
||
<![CDATA[
|
||
var reportTypes;
|
||
var numberOfEntries;
|
||
|
||
reportTypes = new ASSOReportTypes("reporttypes");
|
||
|
||
numberOfEntries = reportTypes.getNumberOfReports();
|
||
spinner.setNumberOfEntries(numberOfEntries);
|
||
|
||
for (var i = 0; i < numberOfEntries; i++) {
|
||
var text;
|
||
|
||
text = reportTypes.getReportNameByIndex(i);
|
||
|
||
spinner.addEntry(text);
|
||
}
|
||
]]>
|
||
</action>
|
||
|
||
<action event="onLoad">
|
||
<![CDATA[
|
||
if (spinner.isPersistentDataAvailable() == "false") {
|
||
if (globalData.dataAvailable("currentappointment") == "true") {
|
||
var appointmentData;
|
||
|
||
appointmentData = globalData.getData("currentappointment");
|
||
|
||
spinner.setSelectedItemIndex(appointmentData.getAppCat1());
|
||
}
|
||
}
|
||
]]>
|
||
</action>
|
||
</spinner>
|
||
|
||
<textview id="3">
|
||
<x>2</x>
|
||
<y>15</y>
|
||
<width>96</width>
|
||
<height>7</height>
|
||
<bgcolor>#EEEEEE</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
<hint>Ersteller</hint>
|
||
</textview>
|
||
|
||
<checkbox id="4">
|
||
<x>2</x>
|
||
<y>22</y>
|
||
<width>96</width>
|
||
<height>10</height>
|
||
<bgcolor>#DDDDDD</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
<text>Ist vertraulich</text>
|
||
</checkbox>
|
||
|
||
<edittext id="5">
|
||
<x>2</x>
|
||
<y>31</y>
|
||
<width>96</width>
|
||
<height>21</height>
|
||
<bgcolor>#EEEEEE</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
<hint>Text</hint>
|
||
<lines>3</lines>
|
||
</edittext>
|
||
|
||
<button id="6">
|
||
<x>2</x>
|
||
<y>90</y>
|
||
<width>96</width>
|
||
<height>10</height>
|
||
|
||
<action event="onClick">
|
||
<![CDATA[
|
||
var message;
|
||
var text;
|
||
var result;
|
||
var customer;
|
||
var checkbox;
|
||
var login;
|
||
var spinner;
|
||
var reportTypes;
|
||
|
||
customer = globalData.getData("current_customer");
|
||
|
||
login = new ASSOLogin("login");
|
||
text = new ASSOEdit("5");
|
||
checkbox = new ASSOCheckbox("4");
|
||
|
||
spinner = new ASSOSpinner("1");
|
||
|
||
reportTypes = new ASSOReportTypes("reporttypes");
|
||
reportTypeId = reportTypes.getReportIdByIndex(spinner.getSelectedItemIndex());
|
||
|
||
message = new ASSOMessage();
|
||
message.setId("actionReport");
|
||
message.addNode("actionmode", "insert");
|
||
message.addNode("rpobjtype", "cs");
|
||
message.addNode("hqid", globalData.getData("login_hqid"));
|
||
message.addNode("rpobjid", customer.getId());
|
||
message.addNode("rptext", text.getText());
|
||
message.addNode("rptype", reportTypeId);
|
||
if (checkbox.isChecked() == true) {
|
||
message.addNode("rpconfidential", "1");
|
||
} else {
|
||
message.addNode("rpconfidential", "0");
|
||
}
|
||
message.addNode("usrid", login.getUserId());
|
||
|
||
// senden der nachricht
|
||
result = messageManager.send(message);
|
||
|
||
viewManager.showMessage("reportsList loaded");
|
||
|
||
viewManager.popView();
|
||
]]>
|
||
</action>
|
||
</button>
|
||
</view>
|
||
|
||
<view id="20012" root="false" orientation="portrait" name="kundensuche">
|
||
<x>0</x>
|
||
<y>0</y>
|
||
<width>100</width>
|
||
<height>100</height>
|
||
<bgcolor>#CDD9FD</bgcolor>
|
||
|
||
<action event="onBack">
|
||
<![CDATA[
|
||
viewManager.removePersistentData();
|
||
globalData.removeData("customerlist");
|
||
globalData.removeData("customer_eid");
|
||
|
||
viewManager.popView();
|
||
]]>
|
||
</action>
|
||
|
||
<textview>
|
||
<x>2</x>
|
||
<y>1</y>
|
||
<width>100</width>
|
||
<height>7</height>
|
||
<bgcolor>transparent</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
<text>Kundensuche</text>
|
||
</textview>
|
||
|
||
<edittext id="1">
|
||
<action event="onLoad">
|
||
</action>
|
||
|
||
<x>2</x>
|
||
<y>9</y>
|
||
<width>63</width>
|
||
<height>8</height>
|
||
<bgcolor>ltgray</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
<hint>Kundensuchbegriff</hint>
|
||
</edittext>
|
||
|
||
<button>
|
||
<x>68</x>
|
||
<y>9</y>
|
||
<width>30</width>
|
||
<height>9</height>
|
||
<text>Suche</text>
|
||
<action event="onClick">
|
||
<![CDATA[
|
||
var message;
|
||
var edittext;
|
||
var result;
|
||
var customerList;
|
||
|
||
// daten persistieren
|
||
viewManager.persistData();
|
||
|
||
// erstellen der suchnachricht
|
||
edittext = new ASSOEdit(1);
|
||
|
||
message = new ASSOMessage();
|
||
message.setId("getCustomerList");
|
||
message.addNode("search", edittext.getText());
|
||
message.addNode("hqid", globalData.getData("login_hqid"));
|
||
|
||
// senden der nachricht
|
||
result = messageManager.send(message);
|
||
|
||
customerList = new ASSOCustomerList("customerlist");
|
||
customerList.fromXML(result);
|
||
|
||
if (customerList.getErrorNumber() == "0") {
|
||
var sortedList;
|
||
|
||
sortedList = new ASSOSortedList("2");
|
||
sortedList.refreshView();
|
||
|
||
viewManager.showMessage(customerList.getNumberOfCustomer() + " Kunden geladen");
|
||
} else {
|
||
viewManager.showMessage("Keine passenden Kunden gefunden");
|
||
}
|
||
]]>
|
||
</action>
|
||
</button>
|
||
|
||
<sortedlist id="2">
|
||
<x>3</x>
|
||
<y>20</y>
|
||
<width>94</width>
|
||
<height>75</height>
|
||
<bgcolor>#EEEEEE</bgcolor>
|
||
<sortby direction="b">1</sortby>
|
||
<action event="onGetNumberOfRows">
|
||
var customerList;
|
||
|
||
customerList = new ASSOCustomerList("customerlist");
|
||
|
||
if (customerList != null) {
|
||
var sortedList;
|
||
|
||
sortedList = new ASSOSortedList(2);
|
||
|
||
sortedList.setNumberOfRows(customerList.getNumberOfCustomer());
|
||
}
|
||
</action>
|
||
|
||
<action event="onRowClicked">
|
||
var customerList;
|
||
var sortedList;
|
||
|
||
customerList = new ASSOCustomerList("customerlist");
|
||
|
||
globalData.putData("customer_eid", customerList.getCustomerEIDByIndex(row));
|
||
|
||
viewManager.pushView("20013");
|
||
</action>
|
||
|
||
<rows>
|
||
<listrow>
|
||
<x>0</x>
|
||
<y>0</y>
|
||
<width>100</width>
|
||
<height>10</height>
|
||
<bgcolor>yellow</bgcolor>
|
||
<views>
|
||
<view id="321">
|
||
<height>100</height>
|
||
<views>
|
||
<textview sortid="1">
|
||
<action event="onLoad">
|
||
<![CDATA[
|
||
var customerList;
|
||
var sortedList;
|
||
|
||
sortedList = new ASSOSortedList(2);
|
||
customerList = new ASSOCustomerList("customerlist");
|
||
|
||
textView.setText(customerList.getCustomerNameByIndex(sortedList.getCurrentRow()));
|
||
]]>
|
||
</action>
|
||
<width>100</width>
|
||
<height>100</height>
|
||
<text>Text 1</text>
|
||
<bgcolor>#EEEEEE</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
</textview>
|
||
</views>
|
||
</view>
|
||
</views>
|
||
</listrow>
|
||
</rows>
|
||
</sortedlist>
|
||
</view>
|
||
|
||
<view id="20013" root="false" orientation="portrait" name="kundendetails">
|
||
<x>0</x>
|
||
<y>0</y>
|
||
<width>100</width>
|
||
<height>100</height>
|
||
<bgcolor>#CDD9FD</bgcolor>
|
||
|
||
<action event="onBack">
|
||
<![CDATA[
|
||
globalData.removeData("customer_eid");
|
||
globalData.removeData("customer_eid_1");
|
||
|
||
viewManager.popView();
|
||
]]>
|
||
</action>
|
||
|
||
<action event="onLoad">
|
||
<![CDATA[
|
||
var message;
|
||
var textview;
|
||
var result;
|
||
var customerSpecial;
|
||
|
||
if (globalData.dataAvailable("customer_eid") == "true") {
|
||
globalData.putData("customer_eid_1", globalData.getData("customer_eid"));
|
||
}
|
||
|
||
message = new ASSOMessage();
|
||
message.setId("getCustomerSpecial");
|
||
message.addNode("cseid", globalData.getData("customer_eid_1"));
|
||
message.addNode("hqid", globalData.getData("login_hqid"));
|
||
|
||
// senden der nachricht
|
||
result = messageManager.send(message);
|
||
|
||
customerSpecial = new ASSOCustomerSpecial("customerspecial");
|
||
customerSpecial.fromXML(result);
|
||
|
||
textview = new ASSOText("2");
|
||
textview.setText("Kunden Id:" + customerSpecial.getId());
|
||
|
||
textview = new ASSOText("3");
|
||
textview.setText("EID: " + customerSpecial.getEID());
|
||
|
||
textview = new ASSOText("4");
|
||
textview.setText(customerSpecial.getName());
|
||
|
||
if (customerSpecial.getComp2() != null) {
|
||
textview = new ASSOText("5");
|
||
textview.setText(customerSpecial.getComp2());
|
||
}
|
||
|
||
textview = new ASSOText("6");
|
||
textview.setText(customerSpecial.getStreet() + " " + customerSpecial.getHouseNumber());
|
||
|
||
textview = new ASSOText("7");
|
||
textview.setText(customerSpecial.getZIP() + " " + customerSpecial.getCity());
|
||
|
||
textview = new ASSOText("8");
|
||
textview.setText("Telefon: " + customerSpecial.getPhone());
|
||
|
||
if (customerSpecial.getPhone2() != null) {
|
||
textview = new ASSOText("9");
|
||
textview.setText(customerSpecial.getPhone2());
|
||
}
|
||
]]>
|
||
</action>
|
||
|
||
<textview id="1">
|
||
<x>2</x>
|
||
<y>1</y>
|
||
<width>100</width>
|
||
<height>7</height>
|
||
<bgcolor>transparent</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
<text>Kundendetails:</text>
|
||
</textview>
|
||
|
||
<textview id="2">
|
||
<x>2</x>
|
||
<y>10</y>
|
||
<width>96</width>
|
||
<height>7</height>
|
||
<bgcolor>#DDDDDD</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
</textview>
|
||
|
||
<textview id="3">
|
||
<x>2</x>
|
||
<y>17</y>
|
||
<width>96</width>
|
||
<height>7</height>
|
||
<bgcolor>#EEEEEE</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
</textview>
|
||
|
||
<textview id="4">
|
||
<x>2</x>
|
||
<y>24</y>
|
||
<width>96</width>
|
||
<height>7</height>
|
||
<bgcolor>#DDDDDD</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
</textview>
|
||
|
||
<textview id="5">
|
||
<x>2</x>
|
||
<y>31</y>
|
||
<width>96</width>
|
||
<height>7</height>
|
||
<bgcolor>#EEEEEE</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
</textview>
|
||
|
||
<textview id="6">
|
||
<x>2</x>
|
||
<y>38</y>
|
||
<width>96</width>
|
||
<height>7</height>
|
||
<bgcolor>#EEEEEE</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
</textview>
|
||
|
||
<textview id="7">
|
||
<x>2</x>
|
||
<y>45</y>
|
||
<width>96</width>
|
||
<height>7</height>
|
||
<bgcolor>#EEEEEE</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
</textview>
|
||
|
||
<textview id="8">
|
||
<x>2</x>
|
||
<y>52</y>
|
||
<width>96</width>
|
||
<height>7</height>
|
||
<bgcolor>#EEEEEE</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
</textview>
|
||
|
||
<textview id="9">
|
||
<x>2</x>
|
||
<y>59</y>
|
||
<width>96</width>
|
||
<height>7</height>
|
||
<bgcolor>#EEEEEE</bgcolor>
|
||
<textsize>2.25%</textsize>
|
||
<textcolor>black</textcolor>
|
||
</textview>
|
||
|
||
<button>
|
||
<x>10</x>
|
||
<y>90</y>
|
||
<width>80</width>
|
||
<height>80px</height>
|
||
<text>Berichte</text>
|
||
<action event="onClick">
|
||
viewManager.pushView("20008");
|
||
</action>
|
||
</button>
|
||
</view>
|
||
</views>
|