Welcome Guest, Not a member yet? Register   Sign In
Coming up with a business logic helper class
#5

[eluser]afro[/eluser]
This is the first table the system will check, if there are 3 staffs from the same department who have applied for a leave,
the system should then tell the applicant that there 3 staffs have already applied for leave which are still pending, the system changes when the Status field to either rejected or approved when a leave is rejected or approved.

Code:
+--|---------|-------|----|-------------|----------|----------------|-------------|----------------+
|ID|StaffName|StaffId|Date|DaysRequested|Department|CommencementDate|ReportingBack|AppliedOn|Status|
+--|---------|-------|----|-------------|----------|----------------|-------------|----------------+
The sytem then checks the appliedleaves table(below) and group the results by department where status is ON(meaning still on leave) , if there are more than three, the system should get the record with the lowest timestamp, and picks the ReportBack field and then
tell the applicant when the first staff is expected back from leave. This is when the staff will be eligible to apply for a leave
Code:
+--|---------|-------|----|------------|-------------|----------|---------|------------|-------------|------|---------|----------+
|Id|StaffName|StaffId|Date|LeaveBalance|DaysRequested|Department|LeaveType|CommenceDate|ReportingBack|Status|AppliedOn|ApprovedOn|
+--|---------|-------|----|------------|-------------|----------|---------|------------|-------------|------|---------|----------+


Messages In This Thread
Coming up with a business logic helper class - by El Forum - 04-07-2011, 06:54 AM
Coming up with a business logic helper class - by El Forum - 04-07-2011, 10:22 PM
Coming up with a business logic helper class - by El Forum - 04-07-2011, 11:41 PM
Coming up with a business logic helper class - by El Forum - 04-07-2011, 11:53 PM
Coming up with a business logic helper class - by El Forum - 04-08-2011, 03:17 AM
Coming up with a business logic helper class - by El Forum - 04-08-2011, 10:34 AM
Coming up with a business logic helper class - by El Forum - 04-10-2011, 11:13 PM
Coming up with a business logic helper class - by El Forum - 04-10-2011, 11:45 PM
Coming up with a business logic helper class - by El Forum - 04-11-2011, 01:25 AM
Coming up with a business logic helper class - by El Forum - 04-11-2011, 01:45 AM
Coming up with a business logic helper class - by El Forum - 04-11-2011, 05:58 AM
Coming up with a business logic helper class - by El Forum - 04-11-2011, 06:11 AM
Coming up with a business logic helper class - by El Forum - 04-11-2011, 06:24 AM
Coming up with a business logic helper class - by El Forum - 04-11-2011, 06:36 AM
Coming up with a business logic helper class - by El Forum - 04-11-2011, 06:43 AM
Coming up with a business logic helper class - by El Forum - 04-11-2011, 06:56 AM
Coming up with a business logic helper class - by El Forum - 04-11-2011, 07:05 AM



Theme © iAndrew 2016 - Forum software by © MyBB