слияние
This commit is contained in:
commit
6d429c3d32
@ -1,36 +0,0 @@
|
||||
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
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
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);
|
||||
}
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
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);
|
||||
}
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
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);
|
||||
}
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
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);
|
||||
}
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
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,29 +19,5 @@ namespace StudentProgressRecord
|
||||
ApplicationConfiguration.Initialize();
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
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 [];
|
||||
}
|
||||
}
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
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)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 513 KiB |
Loading…
Reference in New Issue
Block a user