private void butDelete_Click(object sender, System.EventArgs e) { if (listMatches.SelectedIndex == -1) { MessageBox.Show(Lan.g(this, "Please select an item first.")); return; } ZipCode ZipCodeCur = _listZipCodes[listMatches.SelectedIndex]; ZipCodes.Delete(ZipCodeCur); changed = true; ZipCodes.RefreshCache(); FillList(); }
private void butDelete_Click(object sender, System.EventArgs e) { if (listMatches.SelectedIndex == -1) { MessageBox.Show(Lan.g(this, "Please select an item first.")); return; } ZipCode ZipCodeCur = (ZipCode)ZipCodes.ALMatches[listMatches.SelectedIndex]; ZipCodes.Delete(ZipCodeCur); changed = true; ZipCodes.Refresh(); //next line might not be right. ZipCodes.GetALMatches(ZipCodeCur.ZipCodeDigits); FillList(); }
private void butDelete_Click(object sender, System.EventArgs e) { if (tbZips.SelectedRow == -1) { MessageBox.Show(Lan.g(this, "Please select an item first.")); return; } ZipCode ZipCur = ZipCodes.List[tbZips.SelectedRow]; if (MessageBox.Show(Lan.g(this, "Delete Zipcode?"), "", MessageBoxButtons.OKCancel) != DialogResult.OK) { return; } changed = true; ZipCodes.Delete(ZipCur); FillTable(); }
private void butDelete_Click(object sender, System.EventArgs e) { if (gridZipCode.SelectedIndices.Length == 0) { MessageBox.Show(Lan.g(this, "Please select an item first.")); return; } ZipCode ZipCur = gridZipCode.SelectedTag <ZipCode>(); if (MessageBox.Show(Lan.g(this, "Delete Zipcode?"), "", MessageBoxButtons.OKCancel) != DialogResult.OK) { return; } changed = true; ZipCodes.Delete(ZipCur); FillGrid(); }