예제 #1
0
        private void buttonServiceCreate_Click(object sender, EventArgs e)
        {
            FormService form = new FormService();

            if (form.ShowDialog() == DialogResult.OK)
            {
                dB.setService(form.service);
                RefreshService();
            }
        }
예제 #2
0
        private void buttonServiceEdit_Click(object sender, EventArgs e)
        {
            int idService = Convert.ToInt32(comboBoxService.SelectedItem);
            int index     = services.FindIndex(x => x.id == idService);

            FormService form = new FormService(services[index]);

            if (form.ShowDialog() == DialogResult.OK)
            {
                dB.setService(form.service);
                RefreshService();
            }
        }