コード例 #1
0
        private void AddServiceToolStripMenuItem_Click(object sender, EventArgs e)
        {
            AddUpdateServiceFrm addFrm = new AddUpdateServiceFrm(false);

            addFrm.FormClosing += new FormClosingEventHandler(this.ServicesUpdated);

            addFrm.ShowDialog();
        }
コード例 #2
0
        private void EditServiceToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (servicesDataGridView.Rows.Count == 0)
            {
                return;
            }

            Service s = new ServicesController().Show((int)servicesDataGridView.SelectedRows[0].Cells["serviceId"].Value);

            AddUpdateServiceFrm addFrm = new AddUpdateServiceFrm(true, s);

            addFrm.FormClosing += new FormClosingEventHandler(this.ServicesUpdated);

            addFrm.ShowDialog();
        }