コード例 #1
0
        /*public Task<List<LocationItem>> GetItemDay(System.Collections.Generic.List<System.DateTime> day)
         * {
         *  var DayList = day;
         *  DateTime Daykd = day[0];
         *  return database.QueryAsync<LocationItem>("SELECT * FROM [LocationItem] WHERE Day = " + Daykd);
         * }
         *
         * public Task<List<LocationItem>> GetItemNameAsync(String Name, DateTime dates)
         * {
         *  return database.QueryAsync<LocationItem>("SELECT * FROM [LocationItem] WHERE Name = " + Name + "Day = " + dates);
         * }*/


        public Task <int> SaveItemAsync(income item)
        {
            if (item.ID != 0)
            {
                return(database.UpdateAsync(item));
            }
            else
            {
                return(database.InsertAsync(item));
            }
        }
コード例 #2
0
 public Task <int> DeleteItemAsync(income item)
 {
     return(database.DeleteAsync(item));
 }