Пример #1
0
        private void btnZapisz_Click(object sender, RoutedEventArgs e)
        {
            //Nie musze sprawdzac dropboxow czyli -Priortytet -Status,Kalendarza też nie trzeba -Calndar gdyż uwzględniłem nulleable,
            //Jedyne co trzeba zweryfikować to string z +opis + Temat
            if (Weryfikacja.Zweryfikuj(txtTemat.Text, txtOpis.Text))
            {
                ComboBoxItem typeItem  = (ComboBoxItem)cBPriorytet.SelectedItem;
                string       valuePrio = typeItem.Content.ToString();

                ComboBoxItem typeItem2 = (ComboBoxItem)cBStatus.SelectedItem;
                string       valueST   = typeItem2.Content.ToString();


                Zadanie zadanie = new Zadanie(txtTemat.Text, valuePrio, Convert.ToString(cldData.SelectedDate.Value.ToShortDateString()), valueST, txtOpis.Text);
                actionsOnDatabase.update(zadanie);

                //This window
                this.Close();

                //Main Windows
                MainWindow.canRefresh = true;
                MainWindow.Pokaz();
            }
            else
            {
                MessageBox.Show("Prosze wprowadzic dane!\nTemat lub opis są puste");
            }
        }
Пример #2
0
        private void btnZmodyfikuj_Click(object sender, RoutedEventArgs e)
        {
            ComboBoxItem typeItem  = (ComboBoxItem)cBPriorytet.SelectedItem;
            string       valuePrio = typeItem.Content.ToString();

            ComboBoxItem typeItem2 = (ComboBoxItem)cBStatus.SelectedItem;
            string       valueST   = typeItem2.Content.ToString();

            actionsOnDatabase.update(id, txtTemat.Text, valuePrio, cldData.SelectedDate.Value, valueST, txtOpis.Text);

            //This window
            this.Close();

            //Main Windows
            MainWindow.canRefresh = true;
            MainWindow.Pokaz();
        }