Пример #1
0
        /// <summary>
        /// usuwanie zadania
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void buttonDelete_Click(object sender, EventArgs e)
        {
            foreach (DataGridViewRow item in dataGridViewTasks.SelectedRows)
            {
                string       descr        = item.Cells[1].Value.ToString();
                string       importance   = item.Cells[2].Value.ToString();
                string       date         = diary.Date.ToString("yyyy-MM-dd");
                SQLConnector sQLConnector = new SQLConnector();
                sQLConnector.DeleteTaskFromDatabase(descr, importance, date);

                dataGridViewTasks.Rows.RemoveAt(item.Index);
                return;
            }
        }