Merge branch 'ModelsAndContracts' of http://student.git.athene.tech/maxKarme/PIbd-22_Karamushko_M_K_University_CourseWork into main
This commit is contained in:
commit
890333de46
@ -7,5 +7,6 @@ namespace UniversityContracts.BindingModels
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; } = String.Empty;
|
||||
public string Department { get; set; } = String.Empty;
|
||||
public Dictionary<int, IStatementModel> DisciplineStatements { get; set; } = new();
|
||||
}
|
||||
}
|
||||
|
@ -9,5 +9,6 @@ namespace UniversityContracts.BindingModels
|
||||
public string ExaminationForm { get; set; } = String.Empty;
|
||||
public MarkType Mark { get; set; } = MarkType.Неизвестен;
|
||||
public DateTime Date { get; set; } = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Utc);
|
||||
public Dictionary<int, IStudentModel> Students { get; set; } = new();
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,12 @@
|
||||
using UniversityContracts.ViewModels;
|
||||
|
||||
namespace UniversityContracts.BindingModels
|
||||
{
|
||||
public class ReportBindingModel
|
||||
{
|
||||
public string? FileName { get; set; } = string.Empty;
|
||||
public DateTime? From { get; set; }
|
||||
public DateTime? To { get; set; }
|
||||
public List<StudentViewModel> Students { get; set; } = new();
|
||||
}
|
||||
}
|
@ -7,5 +7,6 @@ namespace UniversityContracts.BindingModels
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; } = String.Empty;
|
||||
public string RecordCardNumber { get; set; } = String.Empty;
|
||||
public Dictionary<int, IStatementModel> Statements { get; set; } = new();
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,14 @@
|
||||
using UniversityDataModels.Models;
|
||||
namespace UniversityContracts.BindingModels
|
||||
{
|
||||
public class UserBindingModel : IUserModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; } = String.Empty;
|
||||
public string Surname { get; set; } = String.Empty;
|
||||
public string PhoneNumber { get; set; } = String.Empty;
|
||||
public string Position { get; set; } = String.Empty;
|
||||
public string Login { get; set; } = String.Empty;
|
||||
public string Password { get; set; } = String.Empty;
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
|
||||
using UniversityContracts.BindingModels;
|
||||
using UniversityContracts.ViewModels;
|
||||
|
||||
namespace UniversityContracts.BuisnessLogicContracts
|
||||
{
|
||||
public interface IReportLogic
|
||||
{
|
||||
List<ReportStudentDisciplineViewModel> GetStudentDiscipline(ReportBindingModel model);
|
||||
List<ReportStudentsViewModel> GetStudens(ReportBindingModel model);
|
||||
void SaveStudentsToWord();
|
||||
void SaveStudentsToExcel();
|
||||
void SaveStudentsToPdf();
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
using UniversityContracts.BindingModels;
|
||||
using UniversityContracts.SearchModels;
|
||||
using UniversityContracts.ViewModels;
|
||||
|
||||
namespace UniversityContracts.BuisnessLogicContracts
|
||||
{
|
||||
public interface IUserLogic
|
||||
{
|
||||
List<UserViewModel>? ReadList(UserSearchModel? model);
|
||||
UserViewModel? ReadElement(UserSearchModel model);
|
||||
bool Create(UserBindingModel model);
|
||||
bool Update(UserBindingModel model);
|
||||
bool Delete(UserBindingModel model);
|
||||
}
|
||||
}
|
@ -6,5 +6,7 @@ namespace UniversityContracts.SearchModels
|
||||
public class ExaminationResultSearchModel
|
||||
{
|
||||
public int? Id { get; set; }
|
||||
public DateTime? From { get; set; }
|
||||
public DateTime? To { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -5,5 +5,7 @@ namespace UniversityContracts.SearchModels
|
||||
public class StatementSearchModel
|
||||
{
|
||||
public int? Id { get; set; }
|
||||
public DateTime? From { get; set; }
|
||||
public DateTime? To { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,9 @@
|
||||
namespace UniversityContracts.SearchModels
|
||||
{
|
||||
public class UserSearchModel
|
||||
{
|
||||
public int? Id { get; set; }
|
||||
public string? Login { get; set; }
|
||||
public string? Password { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
using UniversityContracts.BindingModels;
|
||||
using UniversityContracts.SearchModels;
|
||||
using UniversityContracts.ViewModels;
|
||||
|
||||
namespace UniversityContracts.StoragesContracts
|
||||
{
|
||||
public interface IUserStorage
|
||||
{
|
||||
List<UserViewModel> GetFullList();
|
||||
List<UserViewModel> GetFilteredList(UserSearchModel model);
|
||||
UserViewModel? GetElement(UserSearchModel model);
|
||||
UserViewModel? Insert(UserBindingModel model);
|
||||
UserViewModel? Update(UserBindingModel model);
|
||||
UserViewModel? Delete(UserBindingModel model);
|
||||
}
|
||||
}
|
@ -7,5 +7,6 @@ namespace UniversityContracts.ViewModels
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; } = String.Empty;
|
||||
public string Department { get; set; } = String.Empty;
|
||||
public Dictionary<int, IStatementModel> DisciplineStatements { get; set; } = new();
|
||||
}
|
||||
}
|
||||
|
@ -9,5 +9,6 @@ namespace UniversityContracts.ViewModels
|
||||
public string ExaminationForm { get; set; } = String.Empty;
|
||||
public MarkType Mark { get; set; } = MarkType.Неизвестен;
|
||||
public DateTime Date { get; set; } = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Utc);
|
||||
public Dictionary<int, IStudentModel> Students { get; set; } = new();
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,8 @@
|
||||
namespace UniversityContracts.ViewModels
|
||||
{
|
||||
public class ReportStudentDisciplineViewModel
|
||||
{
|
||||
public string StudentName { get; set; } = string.Empty;
|
||||
public List<string> Disciplines { get; set; } = new();
|
||||
}
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
using UniversityDataModels.Enums;
|
||||
|
||||
namespace UniversityContracts.ViewModels
|
||||
{
|
||||
public class ReportStudentsViewModel
|
||||
{
|
||||
public string StudentName { get; set; } = string.Empty;
|
||||
public string ExaminationForm { get; set; } = string.Empty;
|
||||
public MarkType mark { get; set; } = MarkType.Неизвестен;
|
||||
public DateTime ExaminationResultDate { get; set; }
|
||||
public int HoursCount { get; set; }
|
||||
public DateTime StatementDate { get; set; }
|
||||
}
|
||||
}
|
@ -7,5 +7,6 @@ namespace UniversityContracts.ViewModels
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; } = String.Empty;
|
||||
public string RecordCardNumber { get; set; } = String.Empty;
|
||||
public Dictionary<int, IStatementModel> Statements { get; set; } = new();
|
||||
}
|
||||
}
|
||||
|
14
University/UniversityContracts/ViewModels/UserViewModel.cs
Normal file
14
University/UniversityContracts/ViewModels/UserViewModel.cs
Normal file
@ -0,0 +1,14 @@
|
||||
using UniversityDataModels.Models;
|
||||
namespace UniversityContracts.ViewModels
|
||||
{
|
||||
public class UserViewModel : IUserModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; } = String.Empty;
|
||||
public string Surname { get; set; } = String.Empty;
|
||||
public string PhoneNumber { get; set; } = String.Empty;
|
||||
public string Position { get; set; } = String.Empty;
|
||||
public string Login { get; set; } = String.Empty;
|
||||
public string Password { get; set; } = String.Empty;
|
||||
}
|
||||
}
|
@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace UniversityDataModels.Enums
|
||||
namespace UniversityDataModels.Enums
|
||||
{
|
||||
public enum MarkType
|
||||
{
|
||||
|
@ -4,5 +4,6 @@
|
||||
{
|
||||
String Name { get; }
|
||||
String Department { get; }
|
||||
Dictionary<int, IStatementModel> DisciplineStatements { get; }
|
||||
}
|
||||
}
|
||||
|
@ -6,5 +6,6 @@ namespace UniversityDataModels.Models
|
||||
String ExaminationForm { get; }
|
||||
MarkType Mark { get; }
|
||||
DateTime Date { get; }
|
||||
Dictionary<int, IStudentModel> Students { get; }
|
||||
}
|
||||
}
|
||||
|
@ -4,5 +4,6 @@
|
||||
{
|
||||
String Name { get; }
|
||||
String RecordCardNumber { get; }
|
||||
Dictionary<int, IStatementModel> Statements { get; }
|
||||
}
|
||||
}
|
||||
|
18
University/UniversityDataModels/Models/IUserModel.cs
Normal file
18
University/UniversityDataModels/Models/IUserModel.cs
Normal file
@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace UniversityDataModels.Models
|
||||
{
|
||||
public interface IUserModel : IId
|
||||
{
|
||||
string Name { get; }
|
||||
string Surname { get; }
|
||||
string PhoneNumber { get; }
|
||||
string Position { get; }
|
||||
string Login { get; }
|
||||
string Password { get; }
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user