Example #1
0
        public CoworkingSearchOptions GetOptions()
        {
            var options = database.Table <CoworkingSearchOptions>().FirstOrDefault();

            if (options == null)
            {
                options = new CoworkingSearchOptions();
            }
            return(options);
        }
Example #2
0
        public ObservableCollection <Coworking> GetAllCoworkings(CoworkingSearchOptions options)
        {
            var coworkings = coworkingsHelper.GetAll(options).Coworkings;

            // foreach(var coworking in coworkings)
            //{
            //     dbHelper.SaveCoworking(coworking);
            // }
            return(new ObservableCollection <Coworking>(coworkings));
        }
Example #3
0
        public CoworkingList GetAll(CoworkingSearchOptions options)
        {
            var obj = new CoworkingList();

            try
            {
                var result = SendGet(GET_ALL, options.FormOptions());
                obj.Coworkings = JsonConvert.DeserializeObject <List <Coworking> >(result);
                obj.Status     = HttpStatusCode.OK;
            }
            catch (WebException ex)
            {
                FormErrorResponse(ex, obj);
            }
            return(obj);
        }
Example #4
0
 public void SaveOptions(CoworkingSearchOptions options)
 {
     database.DeleteAll <CoworkingSearchOptions>();
     database.InsertOrReplace(options);
 }