public IActionResult AddAsignee(string name, string email)
        {
            if (name == null)
            {
                ViewData["Alert"] = "<p class=\"alert\">No title provided, try again!</p>";
                return(View());
            }

            using (var context = ApplicationContext)
            {
                var newAsignee = new Asignee(name, email);
                context.Asignees.Add(newAsignee);
                context.SaveChanges();
            }
            return(RedirectToAction(""));
        }
Exemple #2
0
        public override string ToString()
        {
            string format =
                "=============================================== \n" +
                "[Id] " + Id.ToString() +
                "\n[Description] " + Description.ToString() +
                "\n[Due_date] " + Due_Date.ToString() +
                "\n[Project] " + Project.ToString() +
                "\n[Owner] " + Owner.ToString() +
                "\n[Asignee] " + Asignee.ToString() +
                "\n[Status] " + Status.ToString() +
                "\n[Review] " + Review.ToString() +
                "\n=============================================== \n";

            return(format);
        }
Exemple #3
0
        public IActionResult SaveAssToDatabase(Asignee ass)
        {
            asigneeService.SaveAssToDb(ass);

            return(RedirectToAction("ListOfAssignes", "Home"));
        }
Exemple #4
0
 public IActionResult SaveUpdateInDatabase(Asignee ass)
 {
     asigneeService.UpdateAssInDatabase(ass);
     return(RedirectToAction("ListOfAssignes", "Home"));
 }