ИСЭбд-22. Мухамадиева С.С. Лабораторная работа №2 #2
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
|
||||
{
|
||||
None = 0, //пересдача
|
||||
Two = 1,
|
||||
Three = 2,
|
||||
Four = 3,
|
||||
Five = 4,
|
||||
Zachet = 5
|
||||
None,
|
||||
One = 1,
|
||||
Two = 2,
|
||||
Three = 3,
|
||||
Four = 4,
|
||||
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 ProfessorsId { get; private set; }
|
||||
public DateTime Date { get; private set; }
|
||||
|
||||
public static Grades CreateEntity(int id, int subjectsId, int professorsId, DateTime date)
|
||||
public IEnumerable<StudentGrades> StudentGrade { get; private set; } = [];
|
||||
public static Grades CreateEntity(int id, int subjectsId, int professorsId, DateTime date, IEnumerable<StudentGrades> studentGrades)
|
||||
{
|
||||
return new Grades
|
||||
{
|
||||
Id = id,
|
||||
SubjectsId = subjectsId,
|
||||
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,17 +1,16 @@
|
||||
namespace StudentProgress.Entities
|
||||
{
|
||||
public class Group
|
||||
{
|
||||
public int Id { get; private set; }
|
||||
public string NameGroup { get; set; } = string.Empty;
|
||||
namespace StudentProgress.Entities;
|
||||
|
||||
public static Group CreateEntity(int id, string nameGroup)
|
||||
public class Group
|
||||
{
|
||||
public int Id { get; private set; }
|
||||
public string NameGroup { get; set; } = string.Empty;
|
||||
|
||||
public static Group CreateEntity(int id, string nameGroup)
|
||||
{
|
||||
return new Group
|
||||
{
|
||||
return new Group
|
||||
{
|
||||
Id = id,
|
||||
NameGroup = nameGroup ?? string.Empty
|
||||
};
|
||||
}
|
||||
Id = id,
|
||||
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 ProfessorsId { get; private set; }
|
||||
public DateTime Date { get; private set; }
|
||||
public string Auditorium { get; private set; } = string.Empty;
|
||||
public static Lectures CreateElement(int id, int professorsId, DateTime date, string auditorium)
|
||||
{
|
||||
public int LectureId { get; private set; }
|
||||
public int ProfessorsId { get; private set; }
|
||||
public DateTime Date { get; private set; }
|
||||
public string Auditorium { get; private set; }
|
||||
|
||||
public Lectures()
|
||||
return new Lectures
|
||||
{
|
||||
Auditorium = string.Empty; // Инициализация свойства Auditorium
|
||||
}
|
||||
|
||||
public void SetProfessorsId(int professorsId)
|
||||
{
|
||||
ProfessorsId = professorsId;
|
||||
}
|
||||
|
||||
public void SetDate(DateTime date)
|
||||
{
|
||||
Date = date;
|
||||
}
|
||||
|
||||
public void SetLectureId(int lectureId)
|
||||
{
|
||||
LectureId = lectureId;
|
||||
}
|
||||
|
||||
public void SetAuditorium(string auditorium)
|
||||
{
|
||||
Auditorium = auditorium;
|
||||
}
|
||||
Id = id,
|
||||
Date = date,
|
||||
Auditorium = auditorium,
|
||||
ProfessorsId = professorsId,
|
||||
};
|
||||
}
|
||||
}
|
@ -3,15 +3,15 @@
|
||||
public class Professors
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string FirstNameProfessor { get; set; } = string.Empty;
|
||||
public string SurnameProfessor { get; set; } = string.Empty;
|
||||
public static Professors CreateEntity(int id, string firstName, string SurnameProfessor)
|
||||
public string FirstName { get; set; } = string.Empty;
|
||||
public string Surname { get; set; } = string.Empty;
|
||||
public static Professors CreateEntity(int id, string firstName, string surname)
|
||||
{
|
||||
return new Professors
|
||||
{
|
||||
Id = id,
|
||||
FirstNameProfessor = firstName ?? string.Empty,
|
||||
SurnameProfessor = SurnameProfessor ?? string.Empty
|
||||
FirstName = firstName ?? string.Empty,
|
||||
Surname = surname ?? string.Empty
|
||||
};
|
||||
}
|
||||
}
|
@ -1,21 +1,20 @@
|
||||
namespace StudentProgress.Entities
|
||||
{
|
||||
public class Student
|
||||
{
|
||||
public int Id { get; private set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string Surname { get; set; } = string.Empty;
|
||||
public int GroupId { get; set; }
|
||||
namespace StudentProgress.Entities;
|
||||
|
||||
public static Student CreateEntity(int id, string name, string surname, int groupId)
|
||||
public class Student
|
||||
{
|
||||
public int Id { get; private set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string Surname { get; set; } = string.Empty;
|
||||
public int GroupId { get; set; }
|
||||
|
||||
public static Student CreateEntity(int id, string name, string surname, int groupId)
|
||||
{
|
||||
return new Student
|
||||
{
|
||||
return new Student
|
||||
{
|
||||
Id = id,
|
||||
Name = name ?? string.Empty,
|
||||
Surname = surname ?? string.Empty,
|
||||
GroupId = groupId
|
||||
};
|
||||
}
|
||||
Id = id,
|
||||
Name = name ?? string.Empty,
|
||||
Surname = surname ?? string.Empty,
|
||||
GroupId = groupId
|
||||
};
|
||||
}
|
||||
}
|
@ -1,17 +1,20 @@
|
||||
namespace StudentProgress.Entities;
|
||||
using Microsoft.VisualBasic.Devices;
|
||||
using StudentProgress.Entities.Enums;
|
||||
|
||||
namespace StudentProgress.Entities;
|
||||
|
||||
public class Subjects
|
||||
{
|
||||
public int Id { get; private set; }
|
||||
public string NameSubject { get; private set; } = string.Empty;
|
||||
|
||||
public static Subjects CreateEntity_(int id, string nameSubject)
|
||||
public Course Course { get; private set; }
|
||||
public static Subjects CreateEntity_(int id, string nameSubject, Course course)
|
||||
{
|
||||
return new Subjects
|
||||
{
|
||||
Id = id,
|
||||
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>
|
||||
// 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>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@ -13,12 +13,12 @@ namespace StudentProgress.Properties {
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// Класс ресурса со строгой типизацией для поиска локализованных строк и т.д.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
// Этот класс создан автоматически классом 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()]
|
||||
@ -33,7 +33,7 @@ namespace StudentProgress.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// Возвращает кэшированный экземпляр ResourceManager, использованный этим классом.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
@ -47,8 +47,8 @@ namespace StudentProgress.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// Перезаписывает свойство CurrentUICulture текущего потока для всех
|
||||
/// обращений к ресурсу с помощью этого класса ресурса со строгой типизацией.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
@ -61,7 +61,7 @@ namespace StudentProgress.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Add {
|
||||
get {
|
||||
@ -71,7 +71,7 @@ namespace StudentProgress.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap BackGround {
|
||||
get {
|
||||
@ -81,7 +81,7 @@ namespace StudentProgress.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Del {
|
||||
get {
|
||||
@ -91,7 +91,7 @@ namespace StudentProgress.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Pencil {
|
||||
get {
|
||||
|
Loading…
x
Reference in New Issue
Block a user