private void tabSections_ControlAdded(object sender, ControlEventArgs e)
 {
     if (e.Control is SectionPage && e.Control != firstSection)
     {
         Section newSection = new Section();
         m_manager.AddSection(newSection);
         SectionPage sectionPage = e.Control as SectionPage;
         sectionPage.Text    = String.Format(PlaceholderGenerator.Properties.Resources.TitleSection, this.tabSections.TabCount - 1);
         sectionPage.Section = newSection;
     }
 }
Exemplo n.º 2
0
        public IActionResult Create([FromBody] SectionRequest sectionRequest)
        {
            var section = Mapper.Map <Section>(sectionRequest);

            if (!_examManager.Exists(sectionRequest.ExamId))
            {
                return(BadRequest("The exam id is not real"));
            }

            _sectionManager.AddSection(section);

            return(Ok());
        }