Exemplo n.º 1
0
        private void button_AddMission_Click(object sender, EventArgs e)
        {
            AddMission newMission = new AddMission();

            if (newMission.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                AssignMission(newMission.currentMission);
                LoadMissions(dateTimePicker_MinDate.Value, dateTimePicker_MaxDateMissions.Value);
            }
        }
Exemplo n.º 2
0
        private void dataGridView_Display_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            var senderGrid = (DataGridView)sender;

            if (senderGrid.Columns[e.ColumnIndex] is DataGridViewButtonColumn &&
                e.RowIndex >= 0)
            {
                AddMission updateMissionForm = new AddMission(missions[e.RowIndex]);
                if (updateMissionForm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    UpdateMissionDate(appointments[e.RowIndex], updateMissionForm.currentMission, updateMissionForm.updateText);
                    LoadMissions(dateTimePicker_MinDate.Value, dateTimePicker_MaxDateMissions.Value);
                }
            }
        }