Пример #1
0
 private async void addWeb()
 {
     if (!string.IsNullOrEmpty(WebName) && !string.IsNullOrEmpty(WebUrl))
     {
         //TODO: Add to SQLite Database
         try
         {
             var web = new Web() { Name = WebName, Url = WebUrl.ToUrl() };
             await sqliteService.CreateWebAsync(web);
             WebName = string.Empty;
             WebUrl = string.Empty;
             Webs.Add(web);
         }
         catch (SQLiteException ex)
         {
             MessageDialog dialog = new MessageDialog(ex.Message, "Error to add web");
             var dialogTask = dialog.ShowAsync();
         }
     }
     else
     {
         MessageDialog dialog = new MessageDialog("Web Name and Web URL is required", "Error to add web");
         var dialogTask = dialog.ShowAsync();
     }
 }
Пример #2
0
 public Task<int> UpdateWebAsync(Web item)
 {
     return sqliteConnection.UpdateAsync(item);
 }
Пример #3
0
 public Task<int> DeleteWebAsync(Web item)
 {
     return sqliteConnection.DeleteAsync(item);
 }
Пример #4
0
 public Task<int> CreateWebAsync(Web item)
 {
     return sqliteConnection.InsertAsync(item);
 }