예제 #1
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            var teacher = client.TeacherList().Where(x => x.UserId == _user.UserId).FirstOrDefault();

            client.LessonRemove(Convert.ToInt32(txtBoxId.Text));
            MessageBox.Show("Ders Başarıyla Silindi.", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Information);
            dgvLessons.DataSource = client.LessonList(teacher.TeacherId);
        }
예제 #2
0
        void Listele()
        {
            List <QuestionViewModel> viewModel = new List <QuestionViewModel>();
            var teacher = client.TeacherList().Where(x => x.UserId == _user.UserId).FirstOrDefault();
            var lessons = client.LessonList(teacher.TeacherId);
            List <Hado.DL.Question> quest = new List <DL.Question>();

            foreach (var item in lessons)
            {
                var deneme = client.QuestionList();
                var result = client.QuestionList().Where(x => x.LessonId == item.LessonId);
                foreach (var itemx in result)
                {
                    quest.Add(itemx);
                }
            }
            foreach (var item in quest)
            {
                viewModel.Add(new QuestionViewModel
                {
                    Question1       = item.Question1,
                    QuestionAnswers = client.QuestionAnswerListByQuestion(item.QuestionId).QuestionAnswers,
                    LessonId        = item.LessonId,
                    QuestionType    = item.QuestionType,
                    QuestionId      = item.QuestionId,
                    LessonName      = client.LessonGet(item.LessonId).LessonName,
                    QuestionTypee   = client.QuestionTypeList().Where(x => x.QuestionTypeId == item.QuestionType).FirstOrDefault().Description
                });
            }

            dgvQuestions.DataSource = viewModel;
        }
예제 #3
0
        private void _RegisteredExam_Load(object sender, EventArgs e)
        {
            var teacher = client.TeacherList().Where(x => x.UserId == _user.UserId).FirstOrDefault();
            var lesson  = client.LessonList(teacher.UserId);

            foreach (var item in lesson)
            {
                cmbBoxLesson.Items.Add(item.LessonName);
            }

            string seciniz = "Seçiniz...";

            cmbBoxLesson.SelectedItem = seciniz.ToString();
        }
예제 #4
0
        private void _CreateExam_Load(object sender, EventArgs e)
        {
            var teacher = client.TeacherList().Where(x => x.UserId == _user.UserId).FirstOrDefault();
            var lesson  = client.LessonList(teacher.TeacherId);

            cmbBoxLesson.DisplayMember = "Value";
            foreach (var item in lesson)
            {
                cmbBoxLesson.Items.Add(new KeyValuePair <int, string>(item.LessonId, item.LessonName));
            }
            var type = client.QuestionTypeList();

            string seciniz = "Seçiniz...";

            cmbBoxLesson.SelectedItem      = seciniz.ToString();
            cmbBoxGroupNumber.SelectedItem = seciniz.ToString();
        }
        void Listele()
        {
            var teacher = client.TeacherList().Where(x => x.UserId == _user.UserId).FirstOrDefault();
            var lesson  = client.LessonList(teacher.TeacherId);

            cmbBoxQuestionType.DisplayMember = "Value";
            cmbBoxLesson.DisplayMember       = "Value";
            foreach (var item in lesson)
            {
                cmbBoxLesson.Items.Add(new KeyValuePair <int, string>(item.LessonId, item.LessonName));
            }
            var type = client.QuestionTypeList();

            foreach (var item in type)
            {
                cmbBoxQuestionType.Items.Add(new KeyValuePair <int, string>(item.QuestionTypeId, item.Description));
            }
        }
        private void _AddLesson_Load(object sender, EventArgs e)
        {
            var teacher = client.TeacherList().Where(x => x.UserId == _user.UserId).FirstOrDefault();

            dgvLessons.DataSource = client.LessonList(teacher.TeacherId);
        }