Compare commits
No commits in common. "6d429c3d32fbddb5a25696f1ed49f342a0cbe7ab" and "04fdf32650e7b5f3d19836f8865b86875f227299" have entirely different histories.
6d429c3d32
...
04fdf32650
36
StudentProgressRecord/Entity/Statement.cs
Normal file
36
StudentProgressRecord/Entity/Statement.cs
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StudentProgressRecord.Entity
|
||||||
|
{
|
||||||
|
public class Statement
|
||||||
|
{
|
||||||
|
public long Id { get; set; }
|
||||||
|
|
||||||
|
public long SubjectId { get; set; }
|
||||||
|
|
||||||
|
public long TeacherId { get; set; }
|
||||||
|
|
||||||
|
public DateTime Date { get; set; }
|
||||||
|
|
||||||
|
public IEnumerable<Marks> Marks { get; private set; } = [];
|
||||||
|
|
||||||
|
public static Statement CreateOperation(long id, long subjectId, long teacherId,
|
||||||
|
DateTime timeStamp, IEnumerable<Marks> marks)
|
||||||
|
{
|
||||||
|
return new Statement
|
||||||
|
{
|
||||||
|
Id = id,
|
||||||
|
SubjectId = subjectId,
|
||||||
|
TeacherId = teacherId,
|
||||||
|
Date = timeStamp,
|
||||||
|
Marks = marks
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
12
StudentProgressRecord/IRepositories/IStatementRepository.cs
Normal file
12
StudentProgressRecord/IRepositories/IStatementRepository.cs
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
using StudentProgressRecord.Entity;
|
||||||
|
|
||||||
|
namespace StudentProgressRecord.Repositories
|
||||||
|
{
|
||||||
|
public interface IStatementRepository
|
||||||
|
{
|
||||||
|
IEnumerable<Statement> ReadStatements(long? subjectId = null, long? teacherId = null, DateTime? dateFrom = null, DateTime? dateTo=null);
|
||||||
|
|
||||||
|
void CreateStatement(Statement statement);
|
||||||
|
void DeleteStatement(long id);
|
||||||
|
}
|
||||||
|
}
|
18
StudentProgressRecord/IRepositories/IStudentRepository.cs
Normal file
18
StudentProgressRecord/IRepositories/IStudentRepository.cs
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
using StudentProgressRecord.Entity;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StudentProgressRecord.Repositories
|
||||||
|
{
|
||||||
|
public interface IStudentRepository
|
||||||
|
{
|
||||||
|
IEnumerable<Student> ReadStudents(bool? familyPos=null, bool? domitory=null);
|
||||||
|
Student ReadStudentById(long id);
|
||||||
|
void CreateStudent(Student student);
|
||||||
|
void UpdateStudent(Student student);
|
||||||
|
void DeleteStudent(long id);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
using StudentProgressRecord.Entity;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StudentProgressRecord.IRepositories
|
||||||
|
{
|
||||||
|
public interface IStudentTransitionRepository
|
||||||
|
{
|
||||||
|
|
||||||
|
IEnumerable<StudentTransition> ReadStudentTransitions(long? groupId = null, bool? familyPos = null, bool? domitory = null);
|
||||||
|
StudentTransition ReadStudentTransitionById(long id);
|
||||||
|
void CreateStudentTransition(StudentTransition studentTransition);
|
||||||
|
void DeleteStudentTransition(long id);
|
||||||
|
}
|
||||||
|
}
|
18
StudentProgressRecord/IRepositories/ISubjectRepository.cs
Normal file
18
StudentProgressRecord/IRepositories/ISubjectRepository.cs
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
using StudentProgressRecord.Entity;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StudentProgressRecord.Repositories
|
||||||
|
{
|
||||||
|
public interface ISubjectRepository
|
||||||
|
{
|
||||||
|
IEnumerable<Subject> ReadSubjects();
|
||||||
|
Subject ReadSubjectById(long id);
|
||||||
|
void CreateSubject(Subject subject);
|
||||||
|
void UpdateSubject(Subject subject);
|
||||||
|
void DeleteSubject(long id);
|
||||||
|
}
|
||||||
|
}
|
19
StudentProgressRecord/IRepositories/ITeacherRepository.cs
Normal file
19
StudentProgressRecord/IRepositories/ITeacherRepository.cs
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
using StudentProgressRecord.Entity;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StudentProgressRecord.Repositories
|
||||||
|
{
|
||||||
|
public interface ITeacherRepository
|
||||||
|
{
|
||||||
|
|
||||||
|
IEnumerable<Teacher> ReadTeachers(long? departmentID = null);
|
||||||
|
Teacher ReadTeacherById(long id);
|
||||||
|
void CreateTeacher(Teacher teacher);
|
||||||
|
void UpdateTeacher(Teacher teacher);
|
||||||
|
void DeleteTeacher(long id);
|
||||||
|
}
|
||||||
|
}
|
@ -19,5 +19,29 @@ namespace StudentProgressRecord
|
|||||||
ApplicationConfiguration.Initialize();
|
ApplicationConfiguration.Initialize();
|
||||||
Application.Run(CreateContainer().Resolve<FormUniversity>());
|
Application.Run(CreateContainer().Resolve<FormUniversity>());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static IUnityContainer CreateContainer()
|
||||||
|
{
|
||||||
|
var container = new UnityContainer();
|
||||||
|
|
||||||
|
|
||||||
|
container.RegisterType<IStatementRepository, StatementRepository>
|
||||||
|
(new TransientLifetimeManager());
|
||||||
|
|
||||||
|
container.RegisterType<IStudentRepository, StudentRepository>
|
||||||
|
(new TransientLifetimeManager());
|
||||||
|
|
||||||
|
container.RegisterType<ISubjectRepository, SubjectRepository>
|
||||||
|
(new TransientLifetimeManager());
|
||||||
|
|
||||||
|
container.RegisterType<ITeacherRepository, TeacherRepository>
|
||||||
|
(new TransientLifetimeManager());
|
||||||
|
|
||||||
|
container.RegisterType<IStudentTransitionRepository, StudentTransitionRepository>
|
||||||
|
(new TransientLifetimeManager());
|
||||||
|
|
||||||
|
return container;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
29
StudentProgressRecord/RepositoryImp/StatementRepository.cs
Normal file
29
StudentProgressRecord/RepositoryImp/StatementRepository.cs
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
using StudentProgressRecord.Entity;
|
||||||
|
using StudentProgressRecord.Repositories;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StudentProgressRecord.RepositoryImp
|
||||||
|
{
|
||||||
|
public class StatementRepository : IStatementRepository
|
||||||
|
{
|
||||||
|
public void CreateStatement(Statement statement)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void DeleteStatement(long id)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public IEnumerable<Statement> ReadStatements(long? subjectId = null, long? teacherId = null,
|
||||||
|
DateTime? dateFrom = null, DateTime? dateTo = null)
|
||||||
|
{
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
38
StudentProgressRecord/RepositoryImp/StudentRepository.cs
Normal file
38
StudentProgressRecord/RepositoryImp/StudentRepository.cs
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
using StudentProgressRecord.Entity;
|
||||||
|
using StudentProgressRecord.Repositories;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StudentProgressRecord.RepositoryImp
|
||||||
|
{
|
||||||
|
public class StudentRepository : IStudentRepository
|
||||||
|
{
|
||||||
|
public void CreateStudent(Student student)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void DeleteStudent(long id)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public Student ReadStudentById(long id)
|
||||||
|
{
|
||||||
|
return Student.CreateEntity(0, string.Empty, false , false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public IEnumerable<Student> ReadStudents(bool? familyPos = null, bool? domitory = null)
|
||||||
|
{
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
public void UpdateStudent(Student student)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
BIN
StudentProgressRecord/Resources/Ulstu.jpg
Normal file
BIN
StudentProgressRecord/Resources/Ulstu.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 513 KiB |
Loading…
x
Reference in New Issue
Block a user