Esempio n. 1
0
        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();
        }
Esempio n. 2
0
        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();
        }
Esempio n. 3
0
        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();
        }
Esempio n. 4
0
        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();
        }