示例#1
0
        private void DeleteItem_Click(object sender, RoutedEventArgs e)
        {
            MenuItem   item = (MenuItem)sender;
            operations op   = (operations)item.DataContext;

            cashlimit.PrimeOperations.RemoveRecord(op);
            load_all_records(null, null);
        }
 public async void RemoveRecord(operations op)
 {
     context.operations.Remove(op);
     await context.SaveChangesAsync();
 }
 public async void addRecord(operations op)
 {
     context.operations.Add(op);
     await context.SaveChangesAsync();
 }