コード例 #1
0
ファイル: Data.cs プロジェクト: andreszb/Point
 public void UpdateInTable()
 {
     using (var db = new SQLite.Net.SQLiteConnection(new
                                                     SQLite.Net.Platform.WinRT.SQLitePlatformWinRT(), path))
     {
         db.Update(this);
     }
 }
コード例 #2
0
ファイル: Data.cs プロジェクト: andreszb/Point
 //Inserts a new customer if the customer is not already in the table, if it is, it updates it.
 public void AddToTable()
 {
     using (var db = new SQLite.Net.SQLiteConnection(new
                                                     SQLite.Net.Platform.WinRT.SQLitePlatformWinRT(), path))
     {
         //Look for customer in table
         Customer returnedCustomer = (from s in db.Table <Customer>() where s.Id.Equals(Id) select s).FirstOrDefault();
         if (returnedCustomer != null)
         {
             //Add new items to items in items column.
             this.Items = returnedCustomer.Items + "\r(" + DateTime.Now.ToLocalTime().ToString("d") + ")\r" + this.Items;
             db.Update(this);
         }
         else
         {
             db.Insert(this);
         }
     }
 }
コード例 #3
0
 public void Update(Cliente cliente)
 {
     _conexao.Update(cliente);
 }
コード例 #4
0
ファイル: DataAccess.cs プロジェクト: emiliobs/Soccer
 public void Update <T>(T model)
 {
     connection.Update(model);
 }