/// <summary> /// This function is used to get the contractor list from server /// </summary> private async void GetCompanyList() { IsBusy = true; var contractorLs = await _taskService.GetAllContractorList(); if (contractorLs == null) { MessagingCenter.Send <ContractorListViewModel>(this, "GetContractorListFailed"); IsBusy = true; return; } _fullCompanyList = new List <String>(); for (int i = 0, len = contractorLs.Count; i < len; ++i) { _fullCompanyList.Add(contractorLs[i].contractorName); } ShowingCompanyList = _fullCompanyList; IsBusy = false; }