Пример #1
0
        public async Task <IActionResult> Create([Bind("ID,ProjectName,ProjectDescription")] 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));
        }