Ejemplo n.º 1
0
        private void NewService_Click(object sender, EventArgs e)
        {
            var edit = new ServiceCreateEdit();

            if (edit.ShowDialog() == DialogResult.OK)
            {
                using (var context = new ApplicationDBContext())
                {
                    context.AddService(edit.Service);
                    UpdateView();
                }
            }
        }
Ejemplo n.º 2
0
        private void EditButton_Click(object sender, EventArgs e)
        {
            var edit = new ServiceCreateEdit(Service);

            if (edit.ShowDialog() == DialogResult.OK)
            {
                using (var context = new ApplicationDBContext())
                {
                    context.EditService(edit.Service);
                }
                Service = edit.Service;
                this.Close();
            }
        }