void client_GetAttendanceRecordByEmployeeIDCompleted(object sender, GetAttendanceRecordByEmployeeIDCompletedEventArgs e) { if (e.Error != null) { Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message)); } else { if (e.UserState.ToString() == "dpStartDate") { cbxStartTime.ItemsSource = e.Result; cbxStartTime.DisplayMemberPath = "STARTTIME"; if (Evection != null) { foreach (var item in cbxStartTime.Items) { V_ATTENDANCERECORD temp = item as V_ATTENDANCERECORD; if (temp.STARTTIME == Evection.STARTTIME) { cbxStartTime.SelectedItem = item; break; } } } } else { cbxEndTime.ItemsSource = e.Result; cbxEndTime.DisplayMemberPath = "ENDTIME"; if (Evection != null) { foreach (var item in cbxEndTime.Items) { V_ATTENDANCERECORD temp = item as V_ATTENDANCERECORD; if (temp.ENDTIME == Evection.ENDTIME) { cbxEndTime.SelectedItem = item; break; } } } } } AccountDays(); }