Esempio n. 1
0
 public ActionResult AddTeamMember(Person person)
 {
     if (ModelState.IsValid)
     {
         team.TeamMembers.Add(person);
         Success(string.Format("<b>{0}</b> was successfully added to the database.", person.FirstName), true);
         return RedirectToAction("/");
     }
     Danger("Looks like something went wrong. Please check your form.");
     return View(person);
 }
Esempio n. 2
0
        public ActionResult Index()
        {
            var person = new Person
            {
                FirstName = "Gunjan",
                LastName = "Sureja",
                EmailAddress = "*****@*****.**",
                BirthDate = new DateTime(1985, 6, 1),
                Skills = new HashSet<string>() { "Informatica", "Control-M", "Bash", "Perl", "SQL" }
            };

            return View(person);
        }
Esempio n. 3
0
        static TeamController()
        {
            team = new Team();

            var person1 = new Person
            {
                FirstName = "Gunjan",
                LastName = "Sureja",
                EmailAddress = "*****@*****.**",
                BirthDate = new DateTime(1985, 6, 1),
                Skills = new HashSet<string>() { "Informatica", "Control-M", "Bash", "Perl", "SQL" },
                IsContractor = true
            };

            var person2 = new Person
            {
                FirstName = "Uma",
                LastName = "Shankar",
                EmailAddress = "*****@*****.**",
                BirthDate = new DateTime(1960, 6, 1),
                Skills = new HashSet<string>() { "Tableau", "SQL" },
                IsContractor = false
            };

            var person3 = new Person
            {
                FirstName = "Mikhail",
                LastName = "Zyuzin",
                EmailAddress = "*****@*****.**",
                BirthDate = new DateTime(1955, 6, 1),
                Skills = new HashSet<string>() { "Informatica", "SQL", "Java" },
                IsContractor = true
            };

            team.TeamMembers.Add(person1);
            team.TeamMembers.Add(person2);
            team.TeamMembers.Add(person3);
        }
Esempio n. 4
0
 public void ArchiveMember(Person person)
 {
     throw new NotImplementedException("Not ready for this yet.");
 }
Esempio n. 5
0
        public ActionResult AddTeamMember()
        {
            var person = new Person();

            return View(person);
        }