Exemplo n.º 1
0
 public ActionResult Edit(TodoModels todoModels)
 {
     if (ModelState.IsValid)
     {
         _todoService.Update(todoModels.ToEntity());
         return(RedirectToAction("Index"));
     }
     return(View(todoModels));
 }
Exemplo n.º 2
0
        private void AddBut_Click(object sender, RoutedEventArgs e)
        {
            TodoModels model = new TodoModels();

            if (TextBox.Text != "")
            {
                model.Text        = TextBox.Text;
                model.Priorety    = Convert.ToInt32(Getbutton().Content);
                model.Pereodicaly = ComboBoxAdd.Text;
                MainWindow.AddElement(model);
            }
        }
Exemplo n.º 3
0
 public static void AddElement(TodoModels model)
 {
     _todoData.Add(model);
 }