コード例 #1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            var AddEditWorker = new AddEditWorker(DateTime.Today);

            AddEditWorker.FormClosing += AddEditWorker_FormClosing;
            AddEditWorker.ShowDialog();
        }
コード例 #2
0
        private void FireSelectedWorker()
        {
            var addEditWorker = new AddEditWorker(
                DateTime.Today,
                Convert.ToInt32(
                    dgvWorkers.SelectedRows[0].Cells[0].Value));

            addEditWorker.FormClosing += AddEditWorker_FormClosing;
            addEditWorker.ShowDialog();
        }
コード例 #3
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            if (dgvWorkers.SelectedRows.Count == 0)
            {
                MessageBox.Show("Zaznacz pracownika do edycji");
                return;
            }
            var addEditWorker = new AddEditWorker(
                Convert.ToInt32(
                    dgvWorkers.SelectedRows[0].Cells[0].Value));

            addEditWorker.FormClosing += AddEditWorker_FormClosing;
            addEditWorker.ShowDialog();
        }