-мастер
This commit is contained in:
parent
ae601f212e
commit
098ae3bc27
@ -1,20 +0,0 @@
|
||||
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,
|
||||
}
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
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
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
@ -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,33 +0,0 @@
|
||||
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
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
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
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
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
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
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
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -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);
|
||||
}
|
||||
}
|
@ -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)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
@ -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 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)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -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 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)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 513 KiB |
147
StudentProgressRecord/University.Designer.cs
generated
147
StudentProgressRecord/University.Designer.cs
generated
@ -1,147 +0,0 @@
|
||||
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;
|
||||
}
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user