Ejemplo n.º 1
0
        private void update_task_Click(object sender, RoutedEventArgs e)
        {
            task_class    path      = task_table.SelectedItem as task_class;
            UpdateTaskWin updateWin = new UpdateTaskWin(path.id, path.id_user, path.name, path.difficulty, path.status, path.natWork, path.timeWork);

            updateWin.Show();
        }
Ejemplo n.º 2
0
        private void delete_task_Click(object sender, RoutedEventArgs e)
        {
            task_class path = task_table.SelectedItem as task_class;

            com.Parameters["@id"].Value = path.id;
            sql             = $"delete from task where Id = @id";
            com.CommandText = sql;
            int doThing = com.ExecuteNonQuery();

            MessageBox.Show("Данные успешно удалены");
        }
Ejemplo n.º 3
0
        private void task_table_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            task_class tc = task_table.SelectedItem as task_class;

            if (tc != null && (tc.status == "Завершено" || tc.status == "Отменено"))
            {
                update_task.IsEnabled = false;
            }
            else
            {
                update_task.IsEnabled = true;
            }
        }