public void UpserStudentAllLessonsMarks(SmarsyStudent student, IEnumerable <LessonMark> marks) { foreach (var mark in marks) { var lessonId = GetLessonIdByName(mark.LessonName); UpsertStudentMarks(student.StudentId, lessonId, mark.Marks); } }
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); }
public LoginPage(SmarsyStudent student) { _smarsyStudent = student; }
public HomeworkPage(SmarsyStudent student, ISmarsyRepository repository) : base(student.SmarsyChildId) { _smarsyRepository = repository; }
private void LoadStudent(string login) { LogAction("Getting student info from database"); Student = _repository.GetStudentBySmarsyLogin(login); }
public AdPage(SmarsyStudent student) : base(student.SmarsyChildId) { }
public RemarksPage(SmarsyStudent student) : base(student.SmarsyChildId) { }
public void UpserStudentAllLessonsMarks(SmarsyStudent student, IEnumerable <LessonMark> marks) { throw new NotImplementedException(); }