private void Add(object sender, RoutedEventArgs e)
        {
            string Titulo = tbTitulo.Text;
            string Desc   = tbDesc.Text;
            string Tipo   = tbTipo.Text;

            if (string.IsNullOrEmpty(Titulo))
            {
                ErrorLabel.Content     = "";
                ErrorBorder.Visibility = Visibility.Visible;
                return;
            }

            Manutencao m = new Manutencao(p, dt, Titulo, Desc, tipo: Tipo, op: op);

            op.save();
            m.save();
            vm.changeViewAgendaPage(p);
        }
Esempio n. 2
0
 private void UserControl_Loaded(object sender, RoutedEventArgs e)
 {
     Manutencoes = new ObservableCollection <Manutencao>(Manutencao.get_Manutencoes(p, EndDate, StartDate));
     PropertyChanged(this, new PropertyChangedEventArgs(nameof(Manutencoes)));
 }