// [ValidateAntiForgeryToken]
        public async Task <IActionResult> Create([Bind("ID,ContactDetailID,Location,Name,Description,PhotoURL")] LaunchSite launchSite)
        {
            if (ModelState.IsValid)
            {
                _context.Add(launchSite);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(launchSite));
        }
示例#2
0
        // [ValidateAntiForgeryToken]
        public async Task <IActionResult> Create([Bind("ID,Name,Description")] EventType eventType)
        {
            if (ModelState.IsValid)
            {
                _context.Add(eventType);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(eventType));
        }
        // [ValidateAntiForgeryToken]
        public async Task <IActionResult> Create([Bind("ID,Title,Description,DatePublished,DateModified,IsVisible")] Page page)
        {
            if (ModelState.IsValid)
            {
                _context.Add(page);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(page));
        }
示例#4
0
        // [ValidateAntiForgeryToken]
        public async Task <IActionResult> Create([Bind("ID,LaunchSiteID,Title,IsVisible,StartDateTime,EndDateTime,Description,EventUserMaxCapacity")] Event @event)
        {
            if (ModelState.IsValid)
            {
                _context.Add(@event);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(@event));
        }
示例#5
0
        // [ValidateAntiForgeryToken]
        public async Task <IActionResult> Create([Bind("Lat,Long,IsLunarLocation,ContactDetail,ID,LocationName,BuildingNO,StreetAddress,Locality,Region,PostCode,CountryCode")] EventLocation eventLocation)
        {
            if (ModelState.IsValid)
            {
                _context.Add(eventLocation);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(eventLocation));
        }
        public async Task <IActionResult> Create([Bind("ContactName,ID,IsPrimary,Mobile,Landline,Email")] EventLocationContactDetail eventLocationContactDetail)
        {
            if (ModelState.IsValid)
            {
                _context.Add(eventLocationContactDetail);
                await _context.SaveChangesAsync();

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