BrightSide Workbench Full Report + Source Code
org.turro.erp.task.usage.WorkloadGrid Class Reference
Inheritance diagram for org.turro.erp.task.usage.WorkloadGrid:
Collaboration diagram for org.turro.erp.task.usage.WorkloadGrid:

Public Member Functions

void setAssigned (boolean assigned)
 
void setHumanResource (HumanResource humanResource)
 
void setResource (Resource resource)
 
void setWorkloads (WorkloadSet workloads)
 
void printWorksheet ()
 
void sendWorksheet ()
 
void afterCompose ()
 
void refresh ()
 
void createOrderItems ()
 
void deleteOrder (final OrderItem oi, final Row row)
 
- Public Member Functions inherited from org.turro.zkoss.grid.PagingGrid
void setColumns (int columns)
 
void setColumns (String hflexs)
 
void refine ()
 
boolean isDefaultBehavior ()
 
void setDefaultBehavior (boolean defaultBehavior)
 
String getRefineValue ()
 
void setRefineValue (String value)
 
int getMaxResults ()
 
void setMaxResults (int maxResults)
 
String getPagingMold ()
 
void setPagingMold (String pagingMold)
 
int getRowCount ()
 
void setRowCount (int rows)
 
void setHeadersVisible (boolean value)
 
boolean isHeadersVisible ()
 
String getVarColumns ()
 
void setVarColumns (String varColumns)
 
Collection< String > getVarColumnsList (String defaultCols)
 
void addDetailColumn ()
 
void addDetailColumn (HtmlBasedComponent caption)
 
void openDetails ()
 
boolean isEmpty ()
 
void clearColumns ()
 
void clearRows ()
 
void clearEmptyGroups ()
 
Columns getColumns (boolean create)
 
Rows getRows (boolean create)
 
Foot getFoot (boolean create)
 
Foot createFoot ()
 
void exportToPdf ()
 

Detailed Description

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

Definition at line 41 of file WorkloadGrid.java.

Member Function Documentation

◆ afterCompose()

void org.turro.erp.task.usage.WorkloadGrid.afterCompose ( )

Definition at line 87 of file WorkloadGrid.java.

87  {
88  addColumns();
89  }

◆ createOrderItems()

void org.turro.erp.task.usage.WorkloadGrid.createOrderItems ( )

Definition at line 96 of file WorkloadGrid.java.

96  {
97  for(Workload wl : workloads) {
98  if(wl.getOrderUnits() != 0.0d) {
99  OrderItem oi = wl.getRequiredUsage().startOrder(wl.getOrderUnits());
100  oi.setHumanResource(humanResource);
101  if(!oi.isEmpty()) {
102  new OrderItemWrapper(oi).save();
103  }
104  }
105  }
106  }
Here is the call graph for this function:

◆ deleteOrder()

void org.turro.erp.task.usage.WorkloadGrid.deleteOrder ( final OrderItem  oi,
final Row  row 
)

Definition at line 108 of file WorkloadGrid.java.

108  {
109  ZkossUtils.confirmDeletion(null, new Command() {
110  @Override
111  public Object execute(Context context) {
112  if(new OrderItemWrapper(oi).delete()) {
113  row.detach();
114  }
115  return null;
116  }
117  });
118  }

◆ printWorksheet()

void org.turro.erp.task.usage.WorkloadGrid.printWorksheet ( )

Definition at line 70 of file WorkloadGrid.java.

70  {
71  WorksheetReport wsr = new WorksheetReport();
72  wsr.setOperator(humanResource);
73  wsr.setSendToParticipants(false);
74  wsr.setWorkloads(workloads);
75  wsr.print();
76  }
Here is the call graph for this function:

◆ refresh()

void org.turro.erp.task.usage.WorkloadGrid.refresh ( )

Definition at line 91 of file WorkloadGrid.java.

91  {
92  getRows(true).getChildren().clear();
93  addRows();
94  }
Rows getRows(boolean create)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sendWorksheet()

void org.turro.erp.task.usage.WorkloadGrid.sendWorksheet ( )

Definition at line 78 of file WorkloadGrid.java.

78  {
79  WorksheetReport wsr = new WorksheetReport();
80  wsr.setOperator(humanResource);
81  wsr.setSendToParticipants(true);
82  wsr.setWorkloads(workloads);
83  wsr.print();
84  }
Here is the call graph for this function:

◆ setAssigned()

void org.turro.erp.task.usage.WorkloadGrid.setAssigned ( boolean  assigned)

Definition at line 47 of file WorkloadGrid.java.

47  {
48  this.assigned = assigned;
49  }

◆ setHumanResource()

void org.turro.erp.task.usage.WorkloadGrid.setHumanResource ( HumanResource  humanResource)

Definition at line 51 of file WorkloadGrid.java.

51  {
52  if(!assigned || humanResource != null) {
53  this.humanResource = humanResource;
54  setWorkloads(new WorkloadSet(humanResource, assigned));
55  }
56  }
void setWorkloads(WorkloadSet workloads)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setResource()

void org.turro.erp.task.usage.WorkloadGrid.setResource ( Resource  resource)

Definition at line 58 of file WorkloadGrid.java.

58  {
59  if(resource != null) {
60  humanResource = null;
61  setWorkloads(new WorkloadSet(resource, assigned));
62  }
63  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setWorkloads()

void org.turro.erp.task.usage.WorkloadGrid.setWorkloads ( WorkloadSet  workloads)

Definition at line 65 of file WorkloadGrid.java.

65  {
66  this.workloads = workloads;
67  refresh();
68  }
Here is the call graph for this function:
Here is the caller graph for this function:

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