private void CitySelected(object sender, SelectedItemChangedEventArgs e) { var city = e.SelectedItem as CityDto; var getToken = dataAccessPort.GetToken(); var getCounties = dataAccessPort.CallCountyList(getToken, city.CityNumber); countyPicker.Items.clear(); foreach (var item in getCounties) { countyPicker.Items.Add(item.CountyName); } }
public AddOfficeTab() { addOfficeDto = new AddOfficeDto(); dataAccessPort = new DataAccessPort(); var getToken = dataAccessPort.GetToken(); var getCities = dataAccessPort.CallCityList(getToken); addOfficeDto = new AddOfficeDto() { CityId = 34, OfficeName = "Baros emlak3", OfficeStatusValue = "1", Phone1 = "5328974525", Address = "Bağdat Caddesi No:436 Daire:5 Bağlarbaşı", CountyId = 2049, }; countyPicker.SelectedIndexChanged += CountySelected; foreach (var item in getCities) { cityPicker.Items.Add(item.CityName); } cityPicker.SelectedIndexChanged += CitySelected; dataAccessPort.AddNewOffice(getToken, addOfficeDto); Title = "Add Office"; InitializeComponent(); Content = AddOfficeStackLayout; }
public GetCountyTab() { Title = "Get State List"; dataAccessPort = new DataAccessPort(); var addOfficeDto = new AddOfficeDto(); var getToken = dataAccessPort.GetToken(); addOfficeDto.CityId = 34; Title = "County Tab"; InitializeComponent(); var callCountyList = dataAccessPort.CallCountyList(getToken, addOfficeDto.CityId); foreach (var countyDtoList in callCountyList) { lblabel.Text += string.Format("\n County Name : {0} \n County Number : {1} ", countyDtoList.CountyName, countyDtoList.CountyNumber); } var scroll = new ScrollView() { Content = lblabel }; Content = scroll; }
public GetListTab() { Title = "Get List"; dataAccessPort = new DataAccessPort(); var getToken = dataAccessPort.GetToken(); InitializeComponent(); var CallOfficeList = dataAccessPort.CallOfficeList(getToken); foreach (var ofiiceListDto in CallOfficeList) { lblabel.Text += string.Format("\n Office Name : {0} \n Address : {1} \n Telephone Number : {2}", ofiiceListDto.OfficeName, ofiiceListDto.Address, ofiiceListDto.PhoneCell); } Content = lblabel; }
public MyListPage() { dataAccessPort = new DataAccessPort(); var getToken = dataAccessPort.GetToken(); InitializeComponent(); var lblLabel = new Label(); var callApi = dataAccessPort.CallOfficeList(getToken); foreach (var ofiiceListDto in callApi) { lblLabel.Text += string.Format("\n{0} \n{1} \n{2}", ofiiceListDto.OfficeName, ofiiceListDto.Address, ofiiceListDto.PhoneCell); } lblLabel.HorizontalOptions = LayoutOptions.Center; lblLabel.VerticalOptions = LayoutOptions.Center; Content = lblLabel; }
public GetCityTab() { dataAccessPort = new DataAccessPort(); var getToken = dataAccessPort.GetToken(); Title = "Ctiy Tab"; InitializeComponent(); var CallCityList = dataAccessPort.CallCityList(getToken); foreach (var cityDtoList in CallCityList) { lblabel.Text += string.Format("\n City Name : {0} \n City Number : {1} ", cityDtoList.CityName, cityDtoList.CityNumber); } var scroll = new ScrollView() { Content = lblabel }; Content = scroll; }