Compare commits
8 Commits
c31d974ff1
...
ae601f212e
Author | SHA1 | Date | |
---|---|---|---|
|
ae601f212e | ||
|
9f553b7761 | ||
|
40ddc1509f | ||
|
c75709899e | ||
|
d78c16662f | ||
|
c3a50e6988 | ||
|
898a3c0c7b | ||
|
7d448c781e |
20
StudentProgressRecord/Entity/Enums/Operations.cs
Normal file
20
StudentProgressRecord/Entity/Enums/Operations.cs
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StudentProgressRecord.Entity.Enums
|
||||||
|
{
|
||||||
|
[Flags]
|
||||||
|
public enum Operations
|
||||||
|
{
|
||||||
|
None = 0,
|
||||||
|
|
||||||
|
Transfer = 1 << 0,
|
||||||
|
|
||||||
|
Enroll = 1 << 1,
|
||||||
|
|
||||||
|
Expel = 1 << 2,
|
||||||
|
}
|
||||||
|
}
|
29
StudentProgressRecord/Entity/Marks.cs
Normal file
29
StudentProgressRecord/Entity/Marks.cs
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StudentProgressRecord.Entity
|
||||||
|
{
|
||||||
|
public class Marks
|
||||||
|
{
|
||||||
|
public long Id { get; set; }
|
||||||
|
|
||||||
|
public long StatementId { get; set; }
|
||||||
|
|
||||||
|
public long StudentId { get; set; }
|
||||||
|
|
||||||
|
public int Mark { get; set; }
|
||||||
|
|
||||||
|
public static Marks CreateElement(long id, long statementId, long studentId)
|
||||||
|
{
|
||||||
|
return new Marks
|
||||||
|
{
|
||||||
|
Id = id,
|
||||||
|
StatementId = statementId,
|
||||||
|
StudentId = studentId
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
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
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
33
StudentProgressRecord/Entity/Student.cs
Normal file
33
StudentProgressRecord/Entity/Student.cs
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StudentProgressRecord.Entity
|
||||||
|
{
|
||||||
|
public class Student
|
||||||
|
{
|
||||||
|
|
||||||
|
public long Id { get; set; }
|
||||||
|
|
||||||
|
public string Fio { get; set; }
|
||||||
|
|
||||||
|
public bool FamilyPos { get; set; }
|
||||||
|
|
||||||
|
public bool Domitory { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public static Student CreateEntity(long id, string fio, bool familyPos,
|
||||||
|
bool domitory)
|
||||||
|
{
|
||||||
|
return new Student
|
||||||
|
{
|
||||||
|
Id = id,
|
||||||
|
Fio = fio,
|
||||||
|
FamilyPos = familyPos,
|
||||||
|
Domitory = domitory
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
32
StudentProgressRecord/Entity/StudentTransition.cs
Normal file
32
StudentProgressRecord/Entity/StudentTransition.cs
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
using StudentProgressRecord.Entity.Enums;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StudentProgressRecord.Entity
|
||||||
|
{
|
||||||
|
public class StudentTransition
|
||||||
|
{
|
||||||
|
|
||||||
|
public long Id { get; set; }
|
||||||
|
|
||||||
|
public long StudentId { get; set; }
|
||||||
|
|
||||||
|
public Operations Operation { get; set; }
|
||||||
|
|
||||||
|
public DateTime timeStamp { get; set; }
|
||||||
|
|
||||||
|
public static StudentTransition CreateOperation(long id, long studentId, Operations operation, DateTime time)
|
||||||
|
{
|
||||||
|
return new StudentTransition
|
||||||
|
{
|
||||||
|
Id = id,
|
||||||
|
StudentId = studentId,
|
||||||
|
Operation = operation,
|
||||||
|
timeStamp = time
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
24
StudentProgressRecord/Entity/Subject.cs
Normal file
24
StudentProgressRecord/Entity/Subject.cs
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StudentProgressRecord.Entity
|
||||||
|
{
|
||||||
|
public class Subject
|
||||||
|
{
|
||||||
|
public long Id { get; set; }
|
||||||
|
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
public static Subject CreateEntity(long id, string name)
|
||||||
|
{
|
||||||
|
return new Subject
|
||||||
|
{
|
||||||
|
Id = id,
|
||||||
|
Name = name
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
28
StudentProgressRecord/Entity/Teacher.cs
Normal file
28
StudentProgressRecord/Entity/Teacher.cs
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StudentProgressRecord.Entity
|
||||||
|
{
|
||||||
|
public class Teacher
|
||||||
|
{
|
||||||
|
public long Id { get; set; }
|
||||||
|
|
||||||
|
public string Fio { get; set; }
|
||||||
|
|
||||||
|
public long DepartmentID { get; set; }
|
||||||
|
|
||||||
|
public static Teacher CreateEntity(long id, string Fio, long departmentId)
|
||||||
|
{
|
||||||
|
return new Teacher
|
||||||
|
{
|
||||||
|
Id = id,
|
||||||
|
Fio = Fio,
|
||||||
|
DepartmentID = departmentId
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
39
StudentProgressRecord/Form1.Designer.cs
generated
39
StudentProgressRecord/Form1.Designer.cs
generated
@ -1,39 +0,0 @@
|
|||||||
namespace StudentProgressRecord
|
|
||||||
{
|
|
||||||
partial class Form1
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Required designer variable.
|
|
||||||
/// </summary>
|
|
||||||
private System.ComponentModel.IContainer components = null;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Clean up any resources being used.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
|
||||||
protected override void Dispose(bool disposing)
|
|
||||||
{
|
|
||||||
if (disposing && (components != null))
|
|
||||||
{
|
|
||||||
components.Dispose();
|
|
||||||
}
|
|
||||||
base.Dispose(disposing);
|
|
||||||
}
|
|
||||||
|
|
||||||
#region Windows Form Designer generated code
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Required method for Designer support - do not modify
|
|
||||||
/// the contents of this method with the code editor.
|
|
||||||
/// </summary>
|
|
||||||
private void InitializeComponent()
|
|
||||||
{
|
|
||||||
this.components = new System.ComponentModel.Container();
|
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
|
||||||
this.ClientSize = new System.Drawing.Size(800, 450);
|
|
||||||
this.Text = "Form1";
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,10 +0,0 @@
|
|||||||
namespace StudentProgressRecord
|
|
||||||
{
|
|
||||||
public partial class Form1 : Form
|
|
||||||
{
|
|
||||||
public Form1()
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
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);
|
||||||
|
}
|
||||||
|
}
|
@ -1,3 +1,10 @@
|
|||||||
|
|
||||||
|
using StudentProgressRecord.IRepositories;
|
||||||
|
using StudentProgressRecord.Repositories;
|
||||||
|
using StudentProgressRecord.RepositoryImp;
|
||||||
|
using Unity;
|
||||||
|
using Unity.Lifetime;
|
||||||
|
|
||||||
namespace StudentProgressRecord
|
namespace StudentProgressRecord
|
||||||
{
|
{
|
||||||
internal static class Program
|
internal static class Program
|
||||||
@ -8,10 +15,32 @@ namespace StudentProgressRecord
|
|||||||
[STAThread]
|
[STAThread]
|
||||||
static void Main()
|
static void Main()
|
||||||
{
|
{
|
||||||
// To customize application configuration such as set high DPI settings or default font,
|
|
||||||
// see https://aka.ms/applicationconfiguration.
|
|
||||||
ApplicationConfiguration.Initialize();
|
ApplicationConfiguration.Initialize();
|
||||||
Application.Run(new Form1());
|
Application.Run(new University());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
63
StudentProgressRecord/Properties/Resources.Designer.cs
generated
Normal file
63
StudentProgressRecord/Properties/Resources.Designer.cs
generated
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// Этот код создан программой.
|
||||||
|
// Исполняемая версия:4.0.30319.42000
|
||||||
|
//
|
||||||
|
// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
|
||||||
|
// повторной генерации кода.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace StudentProgressRecord.Properties {
|
||||||
|
using System;
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Класс ресурса со строгой типизацией для поиска локализованных строк и т.д.
|
||||||
|
/// </summary>
|
||||||
|
// Этот класс создан автоматически классом StronglyTypedResourceBuilder
|
||||||
|
// с помощью такого средства, как ResGen или Visual Studio.
|
||||||
|
// Чтобы добавить или удалить член, измените файл .ResX и снова запустите ResGen
|
||||||
|
// с параметром /str или перестройте свой проект VS.
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
internal class Resources {
|
||||||
|
|
||||||
|
private static global::System.Resources.ResourceManager resourceMan;
|
||||||
|
|
||||||
|
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||||
|
|
||||||
|
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||||
|
internal Resources() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Возвращает кэшированный экземпляр ResourceManager, использованный этим классом.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||||
|
get {
|
||||||
|
if (object.ReferenceEquals(resourceMan, null)) {
|
||||||
|
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("StudentProgressRecord.Properties.Resources", typeof(Resources).Assembly);
|
||||||
|
resourceMan = temp;
|
||||||
|
}
|
||||||
|
return resourceMan;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Перезаписывает свойство CurrentUICulture текущего потока для всех
|
||||||
|
/// обращений к ресурсу с помощью этого класса ресурса со строгой типизацией.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Globalization.CultureInfo Culture {
|
||||||
|
get {
|
||||||
|
return resourceCulture;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
resourceCulture = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
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)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,28 @@
|
|||||||
|
using StudentProgressRecord.Entity;
|
||||||
|
using StudentProgressRecord.IRepositories;
|
||||||
|
using StudentProgressRecord.Entity.Enums;
|
||||||
|
namespace StudentProgressRecord.RepositoryImp
|
||||||
|
{
|
||||||
|
public class StudentTransitionRepository : IStudentTransitionRepository
|
||||||
|
{
|
||||||
|
public void CreateStudentTransition(StudentTransition studentTransition)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void DeleteStudentTransition(long id)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public StudentTransition ReadStudentTransitionById(long id)
|
||||||
|
{
|
||||||
|
return StudentTransition.CreateOperation(0, 0, Operations.None, DateTime.Now);
|
||||||
|
}
|
||||||
|
|
||||||
|
public IEnumerable<StudentTransition> ReadStudentTransitions(long? groupId = null, bool? familyPos = null, bool? domitory = null)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
38
StudentProgressRecord/RepositoryImp/SubjectRepository.cs
Normal file
38
StudentProgressRecord/RepositoryImp/SubjectRepository.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 SubjectRepository : ISubjectRepository
|
||||||
|
{
|
||||||
|
public void CreateSubject(Subject subject)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void DeleteSubject(long id)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public Subject ReadSubjectById(long id)
|
||||||
|
{
|
||||||
|
return Subject.CreateEntity(0, string.Empty);
|
||||||
|
}
|
||||||
|
|
||||||
|
public IEnumerable<Subject> ReadSubjects()
|
||||||
|
{
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
public void UpdateSubject(Subject subject)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
38
StudentProgressRecord/RepositoryImp/TeacherRepository.cs
Normal file
38
StudentProgressRecord/RepositoryImp/TeacherRepository.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 TeacherRepository : ITeacherRepository
|
||||||
|
{
|
||||||
|
public void CreateTeacher(Teacher teacher)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void DeleteTeacher(long id)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public Teacher ReadTeacherById(long id)
|
||||||
|
{
|
||||||
|
return Teacher.CreateEntity(0, string.Empty, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public IEnumerable<Teacher> ReadTeachers(long? departmentID = null)
|
||||||
|
{
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
public void UpdateTeacher(Teacher teacher)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
BIN
StudentProgressRecord/Resources/Ulstu.jpg
Normal file
BIN
StudentProgressRecord/Resources/Ulstu.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 513 KiB |
@ -8,4 +8,25 @@
|
|||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Unity" Version="5.11.10" />
|
||||||
|
<PackageReference Include="Unity.Abstractions" Version="5.11.7" />
|
||||||
|
<PackageReference Include="Unity.Container" Version="5.11.11" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Update="Properties\Resources.Designer.cs">
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Resources.resx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Update="Properties\Resources.resx">
|
||||||
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||||
|
</EmbeddedResource>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
147
StudentProgressRecord/University.Designer.cs
generated
Normal file
147
StudentProgressRecord/University.Designer.cs
generated
Normal file
@ -0,0 +1,147 @@
|
|||||||
|
namespace StudentProgressRecord
|
||||||
|
{
|
||||||
|
partial class University
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Required designer variable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up any resources being used.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Windows Form Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(University));
|
||||||
|
menuStrip1 = new MenuStrip();
|
||||||
|
HandbookToolStripMenuItem = new ToolStripMenuItem();
|
||||||
|
FacultyToolStripMenuItem = new ToolStripMenuItem();
|
||||||
|
OperationToolStripMenuItem = new ToolStripMenuItem();
|
||||||
|
ReportToolStripMenuItem = new ToolStripMenuItem();
|
||||||
|
DepartmentToolStripMenuItem = new ToolStripMenuItem();
|
||||||
|
GroupToolStripMenuItem = new ToolStripMenuItem();
|
||||||
|
StudentToolStripMenuItem = new ToolStripMenuItem();
|
||||||
|
TeacherToolStripMenuItem = new ToolStripMenuItem();
|
||||||
|
SubjectToolStripMenuItem = new ToolStripMenuItem();
|
||||||
|
StatementToolStripMenuItem = new ToolStripMenuItem();
|
||||||
|
menuStrip1.SuspendLayout();
|
||||||
|
SuspendLayout();
|
||||||
|
//
|
||||||
|
// menuStrip1
|
||||||
|
//
|
||||||
|
menuStrip1.ImageScalingSize = new Size(20, 20);
|
||||||
|
menuStrip1.Items.AddRange(new ToolStripItem[] { HandbookToolStripMenuItem, OperationToolStripMenuItem, ReportToolStripMenuItem });
|
||||||
|
menuStrip1.Location = new Point(0, 0);
|
||||||
|
menuStrip1.Name = "menuStrip1";
|
||||||
|
menuStrip1.Size = new Size(1200, 28);
|
||||||
|
menuStrip1.TabIndex = 1;
|
||||||
|
menuStrip1.Text = "menuStrip1";
|
||||||
|
//
|
||||||
|
// HandbookToolStripMenuItem
|
||||||
|
//
|
||||||
|
HandbookToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { FacultyToolStripMenuItem, DepartmentToolStripMenuItem, GroupToolStripMenuItem, StudentToolStripMenuItem, TeacherToolStripMenuItem, SubjectToolStripMenuItem, StatementToolStripMenuItem });
|
||||||
|
HandbookToolStripMenuItem.Name = "HandbookToolStripMenuItem";
|
||||||
|
HandbookToolStripMenuItem.Size = new Size(117, 24);
|
||||||
|
HandbookToolStripMenuItem.Text = "Справочники";
|
||||||
|
//
|
||||||
|
// FacultyToolStripMenuItem
|
||||||
|
//
|
||||||
|
FacultyToolStripMenuItem.Name = "FacultyToolStripMenuItem";
|
||||||
|
FacultyToolStripMenuItem.Size = new Size(201, 26);
|
||||||
|
FacultyToolStripMenuItem.Text = "Факультеты";
|
||||||
|
//
|
||||||
|
// OperationToolStripMenuItem
|
||||||
|
//
|
||||||
|
OperationToolStripMenuItem.Name = "OperationToolStripMenuItem";
|
||||||
|
OperationToolStripMenuItem.Size = new Size(95, 24);
|
||||||
|
OperationToolStripMenuItem.Text = "Операции";
|
||||||
|
//
|
||||||
|
// ReportToolStripMenuItem
|
||||||
|
//
|
||||||
|
ReportToolStripMenuItem.Name = "ReportToolStripMenuItem";
|
||||||
|
ReportToolStripMenuItem.Size = new Size(73, 24);
|
||||||
|
ReportToolStripMenuItem.Text = "Отчеты";
|
||||||
|
//
|
||||||
|
// DepartmentToolStripMenuItem
|
||||||
|
//
|
||||||
|
DepartmentToolStripMenuItem.Name = "DepartmentToolStripMenuItem";
|
||||||
|
DepartmentToolStripMenuItem.Size = new Size(201, 26);
|
||||||
|
DepartmentToolStripMenuItem.Text = "Кафедры";
|
||||||
|
//
|
||||||
|
// GroupToolStripMenuItem
|
||||||
|
//
|
||||||
|
GroupToolStripMenuItem.Name = "GroupToolStripMenuItem";
|
||||||
|
GroupToolStripMenuItem.Size = new Size(201, 26);
|
||||||
|
GroupToolStripMenuItem.Text = "Группы";
|
||||||
|
//
|
||||||
|
// StudentToolStripMenuItem
|
||||||
|
//
|
||||||
|
StudentToolStripMenuItem.Name = "StudentToolStripMenuItem";
|
||||||
|
StudentToolStripMenuItem.Size = new Size(201, 26);
|
||||||
|
StudentToolStripMenuItem.Text = "Студенты";
|
||||||
|
//
|
||||||
|
// TeacherToolStripMenuItem
|
||||||
|
//
|
||||||
|
TeacherToolStripMenuItem.Name = "TeacherToolStripMenuItem";
|
||||||
|
TeacherToolStripMenuItem.Size = new Size(201, 26);
|
||||||
|
TeacherToolStripMenuItem.Text = "Преподаватели";
|
||||||
|
//
|
||||||
|
// SubjectToolStripMenuItem
|
||||||
|
//
|
||||||
|
SubjectToolStripMenuItem.Name = "SubjectToolStripMenuItem";
|
||||||
|
SubjectToolStripMenuItem.Size = new Size(201, 26);
|
||||||
|
SubjectToolStripMenuItem.Text = "Предметы";
|
||||||
|
//
|
||||||
|
// StatementToolStripMenuItem
|
||||||
|
//
|
||||||
|
StatementToolStripMenuItem.Name = "StatementToolStripMenuItem";
|
||||||
|
StatementToolStripMenuItem.Size = new Size(201, 26);
|
||||||
|
StatementToolStripMenuItem.Text = "Ведомость";
|
||||||
|
//
|
||||||
|
// University
|
||||||
|
//
|
||||||
|
AutoScaleDimensions = new SizeF(8F, 20F);
|
||||||
|
AutoScaleMode = AutoScaleMode.Font;
|
||||||
|
BackgroundImage = (Image)resources.GetObject("$this.BackgroundImage");
|
||||||
|
BackgroundImageLayout = ImageLayout.Stretch;
|
||||||
|
ClientSize = new Size(1200, 599);
|
||||||
|
Controls.Add(menuStrip1);
|
||||||
|
MainMenuStrip = menuStrip1;
|
||||||
|
Name = "University";
|
||||||
|
Text = "University";
|
||||||
|
menuStrip1.ResumeLayout(false);
|
||||||
|
menuStrip1.PerformLayout();
|
||||||
|
ResumeLayout(false);
|
||||||
|
PerformLayout();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
private MenuStrip menuStrip1;
|
||||||
|
private ToolStripMenuItem HandbookToolStripMenuItem;
|
||||||
|
private ToolStripMenuItem FacultyToolStripMenuItem;
|
||||||
|
private ToolStripMenuItem OperationToolStripMenuItem;
|
||||||
|
private ToolStripMenuItem ReportToolStripMenuItem;
|
||||||
|
private ToolStripMenuItem DepartmentToolStripMenuItem;
|
||||||
|
private ToolStripMenuItem GroupToolStripMenuItem;
|
||||||
|
private ToolStripMenuItem StudentToolStripMenuItem;
|
||||||
|
private ToolStripMenuItem TeacherToolStripMenuItem;
|
||||||
|
private ToolStripMenuItem SubjectToolStripMenuItem;
|
||||||
|
private ToolStripMenuItem StatementToolStripMenuItem;
|
||||||
|
}
|
||||||
|
}
|
20
StudentProgressRecord/University.cs
Normal file
20
StudentProgressRecord/University.cs
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace StudentProgressRecord
|
||||||
|
{
|
||||||
|
public partial class University : Form
|
||||||
|
{
|
||||||
|
public University()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
8884
StudentProgressRecord/University.resx
Normal file
8884
StudentProgressRecord/University.resx
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user