|
[x]
Posted via EE Mobile
|
||
Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
||
| Question |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
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: |
Private Sub cmbLeaveType_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmbLeaveType.SelectedIndexChanged
RetrieveLeave()
End Sub
Private Sub RetrieveLeave()
If cmbLeaveType.SelectedItem Is Nothing Then
Exit Sub
End If
Dim ltID As Integer = CType(cmbLeaveType.SelectedItem, ComboItem).Tag
For i As Integer = 0 To listEmployees.Items.Count - 1
Application.DoEvents()
System.Threading.Thread.Sleep(20)
Dim item As ListViewItem = listEmployees.Items(i)
Dim leaveCount As Double = Employee.GetNumberOfLeaves(item.Tag, ltID, DBUtils.GetServerDateTime(m_Connection).Year, m_Connection)
Dim leaveUsed As Double = TimeAttendance.CountAllLeaves(item.Tag, ltID, DBUtils.GetServerDateTime(m_Connection).Year, m_Connection)
Dim leaveReq As Double = TADBObject.Leave.GetRequestedLeaveCount(item.Tag, ltID, DBUtils.GetServerDateTime(m_Connection).Year, m_Connection)
'--if edit mode then remove queried requests count
If m_Leave.LeaveTypeID = ltID Then
If m_Leave.LeaveApplication = ENUMLEAVEAPPLICATION.Wholeday Then
leaveReq -= m_Leave.EndDate.Subtract(m_Leave.StartDate).TotalDays + 1
Else
leaveReq -= 0.5
End If
End If
'--
Dim leaveRemain As Double = leaveCount - leaveUsed
If leaveRemain < 0 Then
leaveRemain = 0
End If
Dim leavePending As Double = leaveReq - leaveUsed
If leavePending < 0 Then
leavePending = 0
End If
item.SubItems(1).Text = leaveRemain.ToString("###,###.##")
item.SubItems(2).Text = leavePending.ToString("###,###.##")
Next
End Sub
|
Advertisement
| Hall of Fame |