60 ghjwtynjd hf,jns
This commit is contained in:
parent
a27c78524c
commit
e0f64dbfae
11
StudentProgress/StudentProgress/Entities/Enums/Course.cs
Normal file
11
StudentProgress/StudentProgress/Entities/Enums/Course.cs
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
namespace StudentProgress.Entities.Enums;
|
||||||
|
|
||||||
|
[Flags]
|
||||||
|
public enum Course
|
||||||
|
{
|
||||||
|
None,
|
||||||
|
First = 1, // 1 курс
|
||||||
|
Second = 2, // 2 курс
|
||||||
|
Third = 4, // 3 курс
|
||||||
|
Fourth = 8 // 4 курс
|
||||||
|
}
|
@ -1,9 +0,0 @@
|
|||||||
namespace StudentProgress.Entities.Enums;
|
|
||||||
|
|
||||||
public enum DisLectE
|
|
||||||
{
|
|
||||||
None = 0,
|
|
||||||
Praktika = 1,
|
|
||||||
Lecturer = 2,
|
|
||||||
Labaratory = 3
|
|
||||||
}
|
|
@ -8,10 +8,10 @@ namespace StudentProgress.Entities.Enums;
|
|||||||
|
|
||||||
public enum Grade
|
public enum Grade
|
||||||
{
|
{
|
||||||
None = 0, //пересдача
|
None,
|
||||||
Two = 1,
|
One = 1,
|
||||||
Three = 2,
|
Two = 2,
|
||||||
Four = 3,
|
Three = 3,
|
||||||
Five = 4,
|
Four = 4,
|
||||||
Zachet = 5
|
Five = 5,
|
||||||
}
|
}
|
||||||
|
@ -1,10 +0,0 @@
|
|||||||
namespace StudentProgress.Entities.Enums;
|
|
||||||
[Flags]
|
|
||||||
public enum TypeOfWork
|
|
||||||
{
|
|
||||||
None = 0, //неизвестная работа
|
|
||||||
Exam = 1,
|
|
||||||
Zachet = 2,
|
|
||||||
Referat = 4,
|
|
||||||
Laba = 8,
|
|
||||||
}
|
|
@ -6,15 +6,28 @@ public class Grades
|
|||||||
public int SubjectsId { get; private set; }
|
public int SubjectsId { get; private set; }
|
||||||
public int ProfessorsId { get; private set; }
|
public int ProfessorsId { get; private set; }
|
||||||
public DateTime Date { get; private set; }
|
public DateTime Date { get; private set; }
|
||||||
|
public IEnumerable<StudentGrades> StudentGrade { get; private set; } = [];
|
||||||
public static Grades CreateEntity(int id, int subjectsId, int professorsId, DateTime date)
|
public static Grades CreateEntity(int id, int subjectsId, int professorsId, DateTime date, IEnumerable<StudentGrades> studentGrades)
|
||||||
{
|
{
|
||||||
return new Grades
|
return new Grades
|
||||||
{
|
{
|
||||||
Id = id,
|
Id = id,
|
||||||
SubjectsId = subjectsId,
|
SubjectsId = subjectsId,
|
||||||
ProfessorsId = professorsId,
|
ProfessorsId = professorsId,
|
||||||
Date = date
|
Date = date,
|
||||||
|
StudentGrade = studentGrades
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Grades CreateEntity(TempStudentGrades tempStudentGrades, IEnumerable<StudentGrades> studentGrades)
|
||||||
|
{
|
||||||
|
return new Grades
|
||||||
|
{
|
||||||
|
Id = tempStudentGrades.Id,
|
||||||
|
SubjectsId = tempStudentGrades.SubjectsId,
|
||||||
|
ProfessorsId = tempStudentGrades.ProfessorsId,
|
||||||
|
Date = tempStudentGrades.Date,
|
||||||
|
StudentGrade = studentGrades
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
namespace StudentProgress.Entities
|
namespace StudentProgress.Entities;
|
||||||
|
|
||||||
|
public class Group
|
||||||
{
|
{
|
||||||
public class Group
|
|
||||||
{
|
|
||||||
public int Id { get; private set; }
|
public int Id { get; private set; }
|
||||||
public string NameGroup { get; set; } = string.Empty;
|
public string NameGroup { get; set; } = string.Empty;
|
||||||
|
|
||||||
@ -13,5 +13,4 @@
|
|||||||
NameGroup = nameGroup ?? string.Empty
|
NameGroup = nameGroup ?? string.Empty
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
@ -1,35 +1,19 @@
|
|||||||
namespace StudentProgress.Entities
|
namespace StudentProgress.Entities;
|
||||||
|
|
||||||
|
public class Lectures
|
||||||
{
|
{
|
||||||
public class Lectures
|
public int Id { get; private set; }
|
||||||
{
|
|
||||||
public int LectureId { get; private set; }
|
|
||||||
public int ProfessorsId { get; private set; }
|
public int ProfessorsId { get; private set; }
|
||||||
public DateTime Date { get; private set; }
|
public DateTime Date { get; private set; }
|
||||||
public string Auditorium { get; private set; }
|
public string Auditorium { get; private set; } = string.Empty;
|
||||||
|
public static Lectures CreateElement(int id, int professorsId, DateTime date, string auditorium)
|
||||||
public Lectures()
|
|
||||||
{
|
{
|
||||||
Auditorium = string.Empty; // Инициализация свойства Auditorium
|
return new Lectures
|
||||||
}
|
|
||||||
|
|
||||||
public void SetProfessorsId(int professorsId)
|
|
||||||
{
|
{
|
||||||
ProfessorsId = professorsId;
|
Id = id,
|
||||||
}
|
Date = date,
|
||||||
|
Auditorium = auditorium,
|
||||||
public void SetDate(DateTime date)
|
ProfessorsId = professorsId,
|
||||||
{
|
};
|
||||||
Date = date;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetLectureId(int lectureId)
|
|
||||||
{
|
|
||||||
LectureId = lectureId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetAuditorium(string auditorium)
|
|
||||||
{
|
|
||||||
Auditorium = auditorium;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -3,15 +3,15 @@
|
|||||||
public class Professors
|
public class Professors
|
||||||
{
|
{
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
public string FirstNameProfessor { get; set; } = string.Empty;
|
public string FirstName { get; set; } = string.Empty;
|
||||||
public string SurnameProfessor { get; set; } = string.Empty;
|
public string Surname { get; set; } = string.Empty;
|
||||||
public static Professors CreateEntity(int id, string firstName, string SurnameProfessor)
|
public static Professors CreateEntity(int id, string firstName, string surname)
|
||||||
{
|
{
|
||||||
return new Professors
|
return new Professors
|
||||||
{
|
{
|
||||||
Id = id,
|
Id = id,
|
||||||
FirstNameProfessor = firstName ?? string.Empty,
|
FirstName = firstName ?? string.Empty,
|
||||||
SurnameProfessor = SurnameProfessor ?? string.Empty
|
Surname = surname ?? string.Empty
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,7 +1,7 @@
|
|||||||
namespace StudentProgress.Entities
|
namespace StudentProgress.Entities;
|
||||||
|
|
||||||
|
public class Student
|
||||||
{
|
{
|
||||||
public class Student
|
|
||||||
{
|
|
||||||
public int Id { get; private set; }
|
public int Id { get; private set; }
|
||||||
public string Name { get; set; } = string.Empty;
|
public string Name { get; set; } = string.Empty;
|
||||||
public string Surname { get; set; } = string.Empty;
|
public string Surname { get; set; } = string.Empty;
|
||||||
@ -17,5 +17,4 @@
|
|||||||
GroupId = groupId
|
GroupId = groupId
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
@ -1,17 +1,20 @@
|
|||||||
namespace StudentProgress.Entities;
|
using Microsoft.VisualBasic.Devices;
|
||||||
|
using StudentProgress.Entities.Enums;
|
||||||
|
|
||||||
|
namespace StudentProgress.Entities;
|
||||||
|
|
||||||
public class Subjects
|
public class Subjects
|
||||||
{
|
{
|
||||||
public int Id { get; private set; }
|
public int Id { get; private set; }
|
||||||
public string NameSubject { get; private set; } = string.Empty;
|
public string NameSubject { get; private set; } = string.Empty;
|
||||||
|
public Course Course { get; private set; }
|
||||||
public static Subjects CreateEntity_(int id, string nameSubject)
|
public static Subjects CreateEntity_(int id, string nameSubject, Course course)
|
||||||
{
|
{
|
||||||
return new Subjects
|
return new Subjects
|
||||||
{
|
{
|
||||||
Id = id,
|
Id = id,
|
||||||
NameSubject = nameSubject ?? string.Empty,
|
NameSubject = nameSubject ?? string.Empty,
|
||||||
|
Course = course
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
using StudentProgress.Entities.Enums;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StudentProgress.Entities;
|
||||||
|
|
||||||
|
public class TempStudentGrades
|
||||||
|
{
|
||||||
|
public int Id { get; private set; }
|
||||||
|
public int SubjectsId { get; private set; }
|
||||||
|
public int ProfessorsId { get; private set; }
|
||||||
|
public DateTime Date { get; private set; }
|
||||||
|
public int StudentID { get; private set; }
|
||||||
|
public Grade Grade { get; private set; }
|
||||||
|
}
|
@ -1,10 +1,10 @@
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// <auto-generated>
|
// <auto-generated>
|
||||||
// This code was generated by a tool.
|
// Этот код создан программой.
|
||||||
// Runtime Version:4.0.30319.42000
|
// Исполняемая версия:4.0.30319.42000
|
||||||
//
|
//
|
||||||
// Changes to this file may cause incorrect behavior and will be lost if
|
// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
|
||||||
// the code is regenerated.
|
// повторной генерации кода.
|
||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -13,12 +13,12 @@ namespace StudentProgress.Properties {
|
|||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
/// Класс ресурса со строгой типизацией для поиска локализованных строк и т.д.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
// Этот класс создан автоматически классом StronglyTypedResourceBuilder
|
||||||
// class via a tool like ResGen or Visual Studio.
|
// с помощью такого средства, как ResGen или Visual Studio.
|
||||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
// Чтобы добавить или удалить член, измените файл .ResX и снова запустите ResGen
|
||||||
// with the /str option, or rebuild your VS project.
|
// с параметром /str или перестройте свой проект VS.
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
@ -33,7 +33,7 @@ namespace StudentProgress.Properties {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the cached ResourceManager instance used by this class.
|
/// Возвращает кэшированный экземпляр ResourceManager, использованный этим классом.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||||
@ -47,8 +47,8 @@ namespace StudentProgress.Properties {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Overrides the current thread's CurrentUICulture property for all
|
/// Перезаписывает свойство CurrentUICulture текущего потока для всех
|
||||||
/// resource lookups using this strongly typed resource class.
|
/// обращений к ресурсу с помощью этого класса ресурса со строгой типизацией.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
internal static global::System.Globalization.CultureInfo Culture {
|
internal static global::System.Globalization.CultureInfo Culture {
|
||||||
@ -61,7 +61,7 @@ namespace StudentProgress.Properties {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static System.Drawing.Bitmap Add {
|
internal static System.Drawing.Bitmap Add {
|
||||||
get {
|
get {
|
||||||
@ -71,7 +71,7 @@ namespace StudentProgress.Properties {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static System.Drawing.Bitmap BackGround {
|
internal static System.Drawing.Bitmap BackGround {
|
||||||
get {
|
get {
|
||||||
@ -81,7 +81,7 @@ namespace StudentProgress.Properties {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static System.Drawing.Bitmap Del {
|
internal static System.Drawing.Bitmap Del {
|
||||||
get {
|
get {
|
||||||
@ -91,7 +91,7 @@ namespace StudentProgress.Properties {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static System.Drawing.Bitmap Pencil {
|
internal static System.Drawing.Bitmap Pencil {
|
||||||
get {
|
get {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user