private void onLoadData(object sender, EventArgs e) { OperatorCriterias crit = new OperatorCriterias(); uid sentUid = new uid(); sentUid.location_id = StationRepository.GetUid(ChangeTracker.CurrentUser).location_id; sentUid.account_id = StationRepository.GetUid(ChangeTracker.CurrentUser).account_id; globalCollection = new ObservableCollection <OperatorWithShift>(WsdlRepository.GetAllOperatorsWithShifts(sentUid)); ObservableCollection <OperatorWithShift> tempCollection = new ObservableCollection <OperatorWithShift>(); if ((currentPosition + pageSize) < globalCollection.Count) { for (int i = currentPosition; i < pageSize; i++) { tempCollection.Add(globalCollection[i]); } } else { for (int i = currentPosition; i < globalCollection.Count; i++) { tempCollection.Add(globalCollection[i]); } } this.Operators = new ObservableCollection <OperatorWithShift>(tempCollection); OnPropertyChanged("Operators"); if (this.Operators.Count > 0) { SelectedOperator = this.Operators[0]; } }
public bool UpdateOperator(long accountId, OperatorCriterias criterias) { throw new NotImplementedException(); }
public Operator[] SearchForOperators(OperatorCriterias criterias, uid uid) { throw new NotImplementedException(); }
private void SearchExecute() { FoundOperators = new ObservableCollection <FoundOperator>(); var request = new OperatorCriterias(); if (!string.IsNullOrEmpty(Username.Trim())) { request.username = Username.Trim(); } else { request.username = ""; } if (!string.IsNullOrEmpty(Firstname.Trim())) { request.name = Firstname.Trim(); } else { request.name = ""; } if (!string.IsNullOrEmpty(Lastname.Trim())) { request.surname = Lastname.Trim(); } else { request.surname = ""; } if (!string.IsNullOrEmpty(EMail.Trim())) { request.email = EMail.Trim(); } else { request.email = ""; } try { var result = WsdlRepository.SearchForOperators(request, StationRepository.GetUid(ChangeTracker.CurrentUser)); FoundOperators = new ObservableCollection <FoundOperator>(ConvertUsers(result)); } catch (System.ServiceModel.FaultException <HubServiceException> exception) { switch (exception.Detail.code) { case 178: ShowError(TranslationProvider.Translate(MultistringTags.OPERATOR_NOT_FOUND).ToString()); return; default: // 113, 114, 172 ShowError(exception.Detail.message); return; } } if (FoundOperators.Count < 1) { ShowError(TranslationProvider.Translate(MultistringTags.OPERATOR_NOT_FOUND).ToString()); } }