Beispiel #1
0
        /// <summary>
        /// Click event handler for add task button.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnAddTask_Click(object sender, EventArgs e)
        {
            log.Info("Opening form task");
            FormTask formAddTask = new FormTask(_name);

            formAddTask.Show();
        }
Beispiel #2
0
        /// <summary>
        /// Double click event for row in grid
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void dataGridView_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            log.Info("Updating task");
            DataGridViewRow selectedRow    = dataGridView.Rows[e.RowIndex];
            FormTask        formUpdateTask = new FormTask(Convert.ToInt16(selectedRow.Cells[0].Value.ToString()),
                                                          selectedRow.Cells[1].Value.ToString(),
                                                          selectedRow.Cells[2].Value.ToString(), selectedRow.Cells[3].Value.ToString(),
                                                          selectedRow.Cells[4].Value.ToString(), selectedRow.Cells[5].Value.ToString(),
                                                          selectedRow.Cells[6].Value.ToString(), selectedRow.Cells[7].Value.ToString());

            formUpdateTask.Show();
            log.Info("Task updation completed.");
        }