Ejemplo n.º 1
0
        //notes field->somehow wrap text onto new line to fill box area? (it's all just going onto one line)
        private void addSubTask(object sender, RoutedEventArgs e)
        {
            if (subTitle == "" && subNotes == "")
            {
            }
            else
            {
                subTitle = this.subTitleText.Text;
                subNotes = this.subNotesText.Text;
                if (this.dueDatePicker.SelectedDate == null)
                {
                    dueDate = new DateTime();
                }
                else
                {
                    dueDate = this.dueDatePicker.SelectedDate.Value.Date;
                }



                SubTask subt = new SubTask(dueDate, subTitle, subNotes);
                subt.SaveSubTask(); //save subtask to db
                this.idCount++;

                //int nextId = subt.getNextId();
                //subt.setId(nextId);

                dict.Add(idCount, subt);

                this.subTitleText.Text          = "";
                this.subNotesText.Text          = "";
                this.dueDatePicker.SelectedDate = null;
                this.dueDatePicker.DisplayDate  = DateTime.Today;
            }
        }