private void pbNewLesson_Click(object sender, EventArgs e) { NewLesson nlesson = new NewLesson(); nlesson.Show(); this.Close(); }
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 })); }
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); }