Пример #1
0
        public async Task <IActionResult> Create([Bind("ProjectID,ProjectName,CompanyContactLastName")] Project project)
        {
            if (ModelState.IsValid)
            {
                _context.Add(project);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(project));
        }
Пример #2
0
        public async Task <IActionResult> Create([Bind("ID,MemberUserName,FirstName,LastName,Standing,Major,Birthday,Email,Phone")] Member member)
        {
            if (ModelState.IsValid)
            {
                _context.Add(member);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(member));
        }
Пример #3
0
        public async Task <IActionResult> Create([Bind("ID,ClientUserName,FirstName,LastName,Email,Phone")] Client client)
        {
            if (ModelState.IsValid)
            {
                _context.Add(client);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(client));
        }
Пример #4
0
        public async Task <IActionResult> Create([Bind("ProjectID,ClientsAssigned,MembersAssigned,Description,DueDate")] Project project)
        {
            if (ModelState.IsValid)
            {
                _context.Add(project);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(project));
        }
        public async Task <IActionResult> RemoveFromRosterConfirmed(string ProjectID, string ProjectParticipantID)
        {
            var projectRoster = await _context.ProjectRoster.SingleOrDefaultAsync(m => m.ProjectID == ProjectID && m.ProjectParticipantID == ProjectParticipantID);

            _context.ProjectRoster.Remove(projectRoster);
            await _context.SaveChangesAsync();

            return(RedirectToAction(nameof(Index)));
        }