Example #1
0
        private void button2_taskAdd_Click(object sender, EventArgs e)
        {
            updateFlg = 1;
            Form_update fu = new Form_update(updateFlg, null);

            fu.Owner = this;
            fu.ShowDialog();
        }
Example #2
0
        private void button_update_Click(object sender, EventArgs e)
        {
            int selectedCnt = dataGridView1.SelectedRows.Count;

            if (selectedCnt != 1)
            {
                MessageBox.Show("一行を選択してください");
                return;
            }
            Task task = new Task();

            task.Tasknm        = dataGridView1.CurrentRow.Cells[0].Value.ToString();
            task.Prestart_time = dataGridView1.CurrentRow.Cells[2].Value.ToString();
            task.Preend_time   = dataGridView1.CurrentRow.Cells[3].Value.ToString();
            task.Taskowner     = dataGridView1.CurrentRow.Cells[4].Value.ToString();
            task.Bikou         = dataGridView1.CurrentRow.Cells[8].Value.ToString();
            updateFlg          = 0;
            Form_update fu = new Form_update(updateFlg, task);

            fu.Owner = this;
            fu.ShowDialog();
        }