public async Task ViewDefect(SelectedItemChangedEventArgs e)
 {
     if (e.SelectedItem != null)
     {
         DefectReportItem selectedDefect = new DefectReportItem();
         selectedDefect = e.SelectedItem as DefectReportItem;
         await navigation.PushAsync(new DefectEntryPage(selectedDefect));
     }
 }
 public Task <int> SaveItemAsync(DefectReportItem newDefect)
 {
     //Save new item
     if (newDefect.Id != 0)
     {
         return(database.UpdateAsync(newDefect));
     }
     else
     {
         return(database.InsertAsync(newDefect));
     }
 }
 public Task <int> DeleteItemAsync(DefectReportItem newDefect)
 {
     //Delete item
     return(database.DeleteAsync(newDefect));
 }
 public Task <int> UpdateDefectListAsync(DefectReportItem newDefect, bool Flag)
 {
     //update defects
     return(database.UpdateAsync("UPDATE [DefectReportItem] SET [useDefect] = " + Flag + " WHERE [Defect] = " + newDefect.Defect));
 }
Exemple #5
0
 public DefectEntryPage(DefectReportItem newDefect)
 {
     InitializeComponent();
     this.BindingContext = new DefectEntryViewModel(this.Navigation, newDefect);
 }