private void delete_btn_Click(object sender, RoutedEventArgs e) { if (lbox.SelectedItem != null) { MessageBoxResult res = MessageBox.Show("Are you realy want to delete this info??", "Delete?", MessageBoxButton.YesNo, MessageBoxImage.Question); if (res == MessageBoxResult.Yes) { WorkArea del = lbox.SelectedItem as WorkArea; DeleteRecord.DeleteInfo(del); lbox.Items.Remove(lbox.SelectedItem); if (lbox.Items.Count == 0) { lbox.Items.Add("The table is empty. Try to add new info"); } } else { return; } } else { MessageBox.Show("First you need to sellect any object!", "NOT Selected", MessageBoxButton.OK, MessageBoxImage.Warning); } }
internal void RemoveRecords() { foreach (var recordId in _recordsToRemove) { var deleteRecord = new DeleteRecord(Application.Client.Ticket, Application.Token, Application.Client.AccountDomain, Table.TableId, recordId); deleteRecord.Post(); } }
private void DeleteAccount_Click(object sender, RoutedEventArgs e) { var personalAccount1 = ListView1.SelectedIndex; var deleteRecord = new DeleteRecord(); deleteRecord.DeleteRecordPersonalAccount(personalAccount1, _filePath); _tmp.PersonalAccounts.Clear(); XmlFiletoList(_filePath); }
private void buttonDelete_Click(object sender, EventArgs e) { if (Selected_Table != "") { if (flowLayoutPanelShow.Controls.Count > 0) { DeleteRecord?.Invoke(Selected_Table, SelectedItemIndex); } flowLayoutPanelShow.Controls.Clear(); } }
public IActionResult Index(string sector, string source, int year, Decimal value) { AnnualEnergyConsumption DelRecord = _context.AnnualEnergyConsumption .Where(t => t.sector.SectorName == sector & t.energysource.SourceName == source & t.Year == year) .First(); DeleteRecord DelRecord1 = new DeleteRecord(); DelRecord1.Sector = sector; DelRecord1.Source = source; DelRecord1.Year = year; DelRecord1.Value = value; return(View(DelRecord1)); }
private void DeleteRecordButton_Click(object sender, RoutedEventArgs e) { if (RecordsListView.SelectedIndex != -1) { //DataForListView record = RecordsListView.SelectedItem; DeleteRecord deleteRecord = new DeleteRecord(con.Connect()); deleteRecord.Delete(FindId()); LoadRecords(); } else { MessageBox.Show("Wybierz z listy rekord do usunięcia!"); } }
public IActionResult Index(string county, string population, int value) { try { Demographic DelRecord = dbContext.Demographics .Where(d => d.county.CountyName == county & d.population.PopTypeName == population) .First(); DeleteRecord DelRecord1 = new DeleteRecord(); DelRecord1.county = county; DelRecord1.population = population; DelRecord1.Value = value; return(View(DelRecord1)); } catch (Exception e) { return(View()); } }
public bool Bind() { if (models.Count == 0) { return(false); } foreach (TModel model in models) { DeleteRecord record = new DeleteRecord { Location = modelProperties.GetLocation(model), Module = modelProperties.Module, MergeCriteria = new DeleteRecordsMergeCriteria { SetId = ModelIdentifier.GetValue <TModel, long>(model) } }; records.Add(record); } return(true); }
/// <summary> /// Raises the DeleteRecord event. /// </summary> protected void OnDelete() { DeleteRecord?.Invoke(this, new EventArgs()); }