Наследование: Queue.UI.WinForms.DependencyForm
Пример #1
0
        private void addButton_Click(object sender, EventArgs e)
        {
            using (var f = new EditAdditionalServiceForm())
            {
                f.Saved += (s, eventArgs) =>
                {
                    additionalServices.Add(f.AdditionalService);
                    f.Close();
                };

                f.ShowDialog();
            }
        }
Пример #2
0
        private void additionalServicesGridView_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            var currentRow = additionalServicesGridView.CurrentRow;
            if (currentRow == null)
            {
                return;
            }

            var additionalService = additionalServices[currentRow.Index];

            using (var f = new EditAdditionalServiceForm(additionalService.Id))
            {
                f.Saved += (s, eventArgs) =>
                {
                    additionalService.Update(f.AdditionalService);
                    f.Close();
                };

                f.ShowDialog();
            }
        }