public async Task<TimezoneDTOCollection> GetbyUserID (String userid) { TimezoneDTOCollection TimezoneDtos =new TimezoneDTOCollection() ; try{ var json =await ExecGet( "classes/Timezone","where={\"UserId\":\""+userid+"\"}"); if (!string.IsNullOrWhiteSpace (json)) { TimezoneDtos = await Task.Run (() => JsonConvert.DeserializeObject<TimezoneDTOCollection>(json) ).ConfigureAwait(false); } } catch(Exception ){ } return TimezoneDtos; }
public async Task Delete (String tzid) { TimezoneDTOCollection TimezoneDtos =new TimezoneDTOCollection() ; try{ var response =await ExecDel( "classes/Timezone/"+tzid,""); // if (!string.IsNullOrWhiteSpace (json)) { // TimezoneDtos = await Task.Run (() => // JsonConvert.DeserializeObject<TimezoneDTOCollection>(json) // ).ConfigureAwait(false); // // } } catch(Exception ){ } //return TimezoneDtos; }
public async Task Delete(String tzid) { TimezoneDTOCollection TimezoneDtos = new TimezoneDTOCollection(); try{ var response = await ExecDel("classes/Timezone/" + tzid, ""); // if (!string.IsNullOrWhiteSpace (json)) { // TimezoneDtos = await Task.Run (() => // JsonConvert.DeserializeObject<TimezoneDTOCollection>(json) // ).ConfigureAwait(false); // // } } catch (Exception) { } //return TimezoneDtos; }
public async Task <TimezoneDTOCollection> GetbyUserID(String userid) { TimezoneDTOCollection TimezoneDtos = new TimezoneDTOCollection(); try{ var json = await ExecGet("classes/Timezone", "where={\"UserId\":\"" + userid + "\"}"); if (!string.IsNullOrWhiteSpace(json)) { TimezoneDtos = await Task.Run(() => JsonConvert.DeserializeObject <TimezoneDTOCollection>(json) ).ConfigureAwait(false); } } catch (Exception) { } return(TimezoneDtos); }
public async Task <TimezoneDTOCollection> GetAll() { TimezoneDTOCollection TimezoneDtos = new TimezoneDTOCollection(); //= Enumerable.Empty<TimezoneDTOCollection>(); //IEnumerable<Conference> conferences = Enumerable.Empty<Conference> (); try{ //using (var httpClient = CreateClient ()) { // var response = await httpClient.GetAsync("classes/Timezone").ConfigureAwait(false); //var response = await httpClient.GetAsync("classes/Timezone").ConfigureAwait(false); // if (response.IsSuccessStatusCode) { // var json = await response.Content.ReadAsStringAsync ().ConfigureAwait(false); var json = await ExecGet("classes/Timezone", ""); if (!string.IsNullOrWhiteSpace(json)) { TimezoneDtos = await Task.Run(() => JsonConvert.DeserializeObject <TimezoneDTOCollection>(json) ).ConfigureAwait(false); //conferences = await Task.Run(() => // Mapper.Map<IEnumerable<Conference>> (conferenceDtos) //).ConfigureAwait(false); } // } //} // foreach ( TimezoneDTOCollectio tzdto in TimezoneDtos.ToList()){ // Console.WriteLine (tzdto.objectId); // Log.Info ("XamarinTest", tzdto.objectId); // // } } catch (Exception) { } return(TimezoneDtos); }
public async Task<TimezoneDTOCollection> GetAll () { TimezoneDTOCollection TimezoneDtos =new TimezoneDTOCollection() ;//= Enumerable.Empty<TimezoneDTOCollection>(); //IEnumerable<Conference> conferences = Enumerable.Empty<Conference> (); try{ //using (var httpClient = CreateClient ()) { // var response = await httpClient.GetAsync("classes/Timezone").ConfigureAwait(false); //var response = await httpClient.GetAsync("classes/Timezone").ConfigureAwait(false); // if (response.IsSuccessStatusCode) { // var json = await response.Content.ReadAsStringAsync ().ConfigureAwait(false); var json =await ExecGet( "classes/Timezone",""); if (!string.IsNullOrWhiteSpace (json)) { TimezoneDtos = await Task.Run (() => JsonConvert.DeserializeObject<TimezoneDTOCollection>(json) ).ConfigureAwait(false); //conferences = await Task.Run(() => // Mapper.Map<IEnumerable<Conference>> (conferenceDtos) //).ConfigureAwait(false); } // } //} // foreach ( TimezoneDTOCollectio tzdto in TimezoneDtos.ToList()){ // Console.WriteLine (tzdto.objectId); // Log.Info ("XamarinTest", tzdto.objectId); // // } } catch(Exception ){ } return TimezoneDtos; }