BrightSide Workbench Full Report + Source Code
org.turro.erp.time.TimeControlComposer Class Reference
Inheritance diagram for org.turro.erp.time.TimeControlComposer:
Collaboration diagram for org.turro.erp.time.TimeControlComposer:

Public Member Functions

void onHumanResourceSelect (Event evt)
 
void onChange (Event evt)
 
void onStart ()
 
void onCancelSelect ()
 
void onExport ()
 
void onReport ()
 
void onPrevious ()
 
void onNext ()
 
void onBack ()
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 51 of file TimeControlComposer.java.

Member Function Documentation

◆ onBack()

void org.turro.erp.time.TimeControlComposer.onBack ( )

Definition at line 156 of file TimeControlComposer.java.

156  {
157  tabHr.setSelected(true);
158  }

◆ onCancelSelect()

void org.turro.erp.time.TimeControlComposer.onCancelSelect ( )

Definition at line 106 of file TimeControlComposer.java.

106  {
107  tabHr.setSelected(true);
108  }

◆ onChange()

void org.turro.erp.time.TimeControlComposer.onChange ( Event  evt)

Definition at line 78 of file TimeControlComposer.java.

78  {
79  Object obj = evt.getData();
80  if(obj instanceof TimeControl) {
81  TimeControl tc = (TimeControl) obj;
82  TimeControlUtil tcu = new TimeControlUtil();
83  tcu.end(tc);
84  tabHr.setSelected(true);
85  } else if(obj instanceof Workload) {
86  Workload wl = (Workload) obj;
87  TimeControlUtil tcu = new TimeControlUtil();
88  tcu.setHumanResource(selected);
89  tcu.setTask(wl.getTask());
90  tcu.start();
91  tabHr.setSelected(true);
92  }
93  }
Here is the call graph for this function:

◆ onExport()

void org.turro.erp.time.TimeControlComposer.onExport ( )

Definition at line 111 of file TimeControlComposer.java.

111  {
112  Dao dao = new ErpPU();
113  List<HumanResource> list = dao.getResultList(
114  "select hr from HumanResource as hr where hr.active = true order by hr.name");
115  Application app = Application.getApplication();
116  XMLHumanResourceSet xhrs = new XMLHumanResourceSet(app.getConstructor());
117  xhrs.clear();
118  for(HumanResource hr : list) {
119  XMLHumanResource xhr = new XMLHumanResource();
120  xhr.setId(hr.getId());
121  xhr.setName(hr.getName());
122  xhrs.add(xhr);
123  }
124  File file = new File(ElephantContext.getRealPath(XMLHumanResourceSet.XML_HUMANRESOURCE));
125  FileUtil.getFolderFile(file).mkdirs();
126  xhrs.saveCollection();
127  try {
128  Filedownload.save(file, "text/xml");
129  } catch (FileNotFoundException ex) {
130  Logger.getLogger(TimeControlComposer.class.getName()).log(Level.SEVERE, null, ex);
131  }
132  }
Here is the call graph for this function:

◆ onHumanResourceSelect()

void org.turro.erp.time.TimeControlComposer.onHumanResourceSelect ( Event  evt)

Definition at line 67 of file TimeControlComposer.java.

67  {
68  selected = (HumanResource) evt.getData();
69  if(selected != null) {
70  taskList.setHumanResource(selected);
71  info.getChildren().clear();
72  info.appendChild(new Label(selected.getName()));
73  tabTask.setSelected(true);
74  }
75  }
void setHumanResource(HumanResource humanResource)
Here is the call graph for this function:

◆ onNext()

void org.turro.erp.time.TimeControlComposer.onNext ( )

Definition at line 149 of file TimeControlComposer.java.

149  {
150  currDate = new CheckDate(currDate).addDays(1).getDate();
151  currDay.setValue(DateFormats.format(currDate, true));
152  timeList.setDate(currDate);
153  }
void setDate(Date date)
Definition: TimeList.java:39
Here is the call graph for this function:

◆ onPrevious()

void org.turro.erp.time.TimeControlComposer.onPrevious ( )

Definition at line 142 of file TimeControlComposer.java.

142  {
143  currDate = new CheckDate(currDate).addDays(-1).getDate();
144  currDay.setValue(DateFormats.format(currDate, true));
145  timeList.setDate(currDate);
146  }
Here is the call graph for this function:

◆ onReport()

void org.turro.erp.time.TimeControlComposer.onReport ( )

Definition at line 135 of file TimeControlComposer.java.

135  {
136  tabReport.setSelected(true);
137  currDay.setValue(DateFormats.format(currDate, true));
138  timeList.setDate(currDate);
139  }
Here is the call graph for this function:

◆ onStart()

void org.turro.erp.time.TimeControlComposer.onStart ( )

Definition at line 96 of file TimeControlComposer.java.

96  {
97  if(selected != null) {
98  TimeControlUtil tcu = new TimeControlUtil();
99  tcu.setHumanResource(selected);
100  tcu.start();
101  tabHr.setSelected(true);
102  }
103  }
Here is the call graph for this function:

The documentation for this class was generated from the following file: