Example #1
0
        public async Task <IActionResult> PutCandidateTab(int id, CandidateTab candidateTab)
        {
            if (id != candidateTab.CandidateID)
            {
                return(BadRequest());
            }

            _context.Entry(candidateTab).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!CandidateTabExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
Example #2
0
        public async Task <ActionResult <CandidateTab> > PostCandidateTab(CandidateTab candidateTab)
        {
            _context.Candidates.Add(candidateTab);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetCandidateTab", new { id = candidateTab.CandidateID }, candidateTab));
        }
 public void SelectTab(CandidateTab tab)
 {
     this.SelectedIndex = (int)tab;
 }