Esempio n. 1
0
        private void pbNewLesson_Click(object sender, EventArgs e)
        {
            NewLesson nlesson = new NewLesson();

            nlesson.Show();
            this.Close();
        }
Esempio n. 2
0
        public async Task <IActionResult> Create(NewLesson newLesson)
        {
            var lesson = _mapper.Map <NewLesson, Core.CoreModels.Lesson>(newLesson);

            var lessonId = await _lessonsService.Create(lesson);

            return(Ok(new CreatedLesson {
                LessonId = lessonId
            }));
        }
Esempio n. 3
0
        private void lblNewLesson_Click(object sender, EventArgs e)
        {
            if (MasterPanel.Controls[0] is NewLesson)
            {
                return;
            }
            mainPanel.Hide();
            lblTitle.Text = "افزودن درس جدید";

            if (MasterPanel.Controls.Count > 1)
            {
                MasterPanel.Controls.RemoveAt(1);
            }
            var content = new NewLesson();

            content.Dock = DockStyle.Fill;
            MasterPanel.Controls.Add(content);
        }