Exemple #1
0
        private void buttonDiscontCreate_Click(object sender, EventArgs e)
        {
            FormDiscont form = new FormDiscont();

            if (form.ShowDialog() == DialogResult.OK)
            {
                dB.setDiscont(form.discont);
                RefreshDiscont();
            }
        }
Exemple #2
0
        private void buttonDiscontEdit_Click(object sender, EventArgs e)
        {
            int idDiscont = Convert.ToInt32(comboBoxDiscont.SelectedItem);
            int index     = disconts.FindIndex(x => x.id == idDiscont);

            FormDiscont form = new FormDiscont(disconts[index]);

            if (form.ShowDialog() == DialogResult.OK)
            {
                dB.setDiscont(form.discont);
                RefreshDiscont();
            }
        }