Example #1
0
        // To protect from overposting attacks, enable the specific properties you want to bind to, for
        // more details, see https://aka.ms/RazorPagesCRUD.
        public async Task <IActionResult> OnPostAsync()
        {
            if (!ModelState.IsValid)
            {
                return(Page());
            }

            _context.Attach(InitialArticle).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!InitialArticleExists(InitialArticle.ID))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(RedirectToPage("./Moderate"));
        }
Example #2
0
        public async Task <IActionResult> OnPostAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            AcceptedArticle = await _context.AcceptedArticle.FindAsync(id);

            if (AcceptedArticle != null)
            {
                _context.BibliographicReference.Add(new BibliographicReference
                {
                    Title       = AcceptedArticle.Title,
                    Author      = AcceptedArticle.Author,
                    Source      = AcceptedArticle.Source,
                    Year        = AcceptedArticle.Year,
                    DOI         = AcceptedArticle.DOI,
                    SEMethod    = AcceptedArticle.SEMethod,
                    Practice    = AcceptedArticle.Practice,
                    Method      = AcceptedArticle.Method,
                    Participant = AcceptedArticle.Participant,
                    Result      = AcceptedArticle.Result
                });
                _context.AcceptedArticle.Remove(AcceptedArticle);
                await _context.SaveChangesAsync();
            }

            return(RedirectToPage("./Index"));
        }
        // To protect from overposting attacks, enable the specific properties you want to bind to, for
        // more details, see https://aka.ms/RazorPagesCRUD.
        public async Task <IActionResult> OnPostAsync()
        {
            if (!ModelState.IsValid)
            {
                return(Page());
            }

            _context.Attach(BibliographicReference).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!BibliographicReferenceExists(BibliographicReference.ID))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(RedirectToPage("./Index"));
        }
Example #4
0
        // To protect from overposting attacks, enable the specific properties you want to bind to, for
        // more details, see https://aka.ms/RazorPagesCRUD.
        public async Task <IActionResult> OnPostAsync()
        {
            if (!ModelState.IsValid)
            {
                return(Page());
            }

            _context.InitialArticle.Add(InitialArticle);
            await _context.SaveChangesAsync();

            return(RedirectToPage("./Success"));
        }
Example #5
0
        // To protect from overposting attacks, enable the specific properties you want to bind to, for
        // more details, see https://aka.ms/RazorPagesCRUD.
        public async Task <IActionResult> OnPostAsync()
        {
            if (!ModelState.IsValid)
            {
                return(Page());
            }

            _context.BibliographicReference.Add(BibliographicReference);
            await _context.SaveChangesAsync();

            return(RedirectToPage("./Index"));
        }
        public async Task <IActionResult> OnPostAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            BibliographicReference = await _context.BibliographicReference.FindAsync(id);

            if (BibliographicReference != null)
            {
                _context.BibliographicReference.Remove(BibliographicReference);
                await _context.SaveChangesAsync();
            }

            return(RedirectToPage("./Index"));
        }