示例#1
0
 public void UpserStudentAllLessonsMarks(SmarsyStudent student, IEnumerable <LessonMark> marks)
 {
     foreach (var mark in marks)
     {
         var lessonId = GetLessonIdByName(mark.LessonName);
         UpsertStudentMarks(student.StudentId, lessonId, mark.Marks);
     }
 }
示例#2
0
        public SmarsyStudent GetStudentBySmarsyLogin(string login)
        {
            SmarsyStudent student = null;

            using (SqlConnection connection = CreateDbConnection())
            {
                using (var objcmd = new SqlCommand(GetStudentIdByCmarsyLoginQuery, connection))
                {
                    objcmd.CommandType = CommandType.StoredProcedure;
                    objcmd.Parameters.Add("@login", SqlDbType.VarChar, 50);
                    objcmd.Parameters["@login"].Value = login;

                    var res = objcmd.ExecuteReader();
                    while (res.Read())
                    {
                        student = new SmarsyStudent(Parse(res));
                    }
                }
            }

            return(student);
        }
示例#3
0
 public LoginPage(SmarsyStudent student)
 {
     _smarsyStudent = student;
 }
示例#4
0
 public HomeworkPage(SmarsyStudent student, ISmarsyRepository repository) : base(student.SmarsyChildId)
 {
     _smarsyRepository = repository;
 }
示例#5
0
 private void LoadStudent(string login)
 {
     LogAction("Getting student info from database");
     Student = _repository.GetStudentBySmarsyLogin(login);
 }
示例#6
0
 public AdPage(SmarsyStudent student) : base(student.SmarsyChildId)
 {
 }
示例#7
0
 public RemarksPage(SmarsyStudent student) : base(student.SmarsyChildId)
 {
 }
示例#8
0
 public void UpserStudentAllLessonsMarks(SmarsyStudent student, IEnumerable <LessonMark> marks)
 {
     throw new NotImplementedException();
 }