Exemple #1
0
 private void BtnAdd_Click(object sender, RoutedEventArgs e)
 {
     if ((int)cmbListName.SelectedValue > 0 && !string.IsNullOrEmpty(txtName.Text) && !string.IsNullOrEmpty(dtDeatLine.Text))
     {
         var result = Db.CreateToDo((int)cmbListName.SelectedValue, txtName.Text, txtDesc.Text, Convert.ToDateTime(dtDeatLine.Text));
         if (result.Completed)
         {
             MessageBox.Show("Successful");
             //Utils.GoBack(this);
             if (State.LastAction == ACTION.AddToDoFromToDoList)
             {
                 ListToDo t = new ListToDo(State.LastListId);
                 t.Show();
             }
             else if (State.LastAction == ACTION.AddToDoFromListList)
             {
                 ListList l = new ListList();
                 l.Show();
             }
             else
             {
                 IndexToDo i = new IndexToDo();
                 i.Show();
             }
             this.Close();
         }
     }
     else
     {
         MessageBox.Show("You must entry more info!");
     }
 }
Exemple #2
0
        private void BtnCancel_Click(object sender, RoutedEventArgs e)
        {
            IndexToDo w = new IndexToDo();

            w.Show();
            this.Close();
        }
Exemple #3
0
        private void LblFilterBtn_MouseDown(object sender, MouseButtonEventArgs e)
        {
            IndexToDo w = new IndexToDo();

            w.Show();
            this.Close();
        }