This commit is contained in:
MaxKarme 2023-04-09 01:21:42 +04:00
commit 890333de46
22 changed files with 149 additions and 7 deletions

View File

@ -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();
}
}

View File

@ -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();
}
}

View File

@ -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();
}
}

View File

@ -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();
}
}

View File

@ -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;
}
}

View File

@ -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();
}
}

View File

@ -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);
}
}

View File

@ -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; }
}
}

View File

@ -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; }
}
}

View File

@ -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; }
}
}

View File

@ -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);
}
}

View File

@ -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();
}
}

View File

@ -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();
}
}

View File

@ -0,0 +1,8 @@
namespace UniversityContracts.ViewModels
{
public class ReportStudentDisciplineViewModel
{
public string StudentName { get; set; } = string.Empty;
public List<string> Disciplines { get; set; } = new();
}
}

View File

@ -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; }
}
}

View File

@ -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();
}
}

View 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;
}
}

View File

@ -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
{

View File

@ -4,5 +4,6 @@
{
String Name { get; }
String Department { get; }
Dictionary<int, IStatementModel> DisciplineStatements { get; }
}
}

View File

@ -6,5 +6,6 @@ namespace UniversityDataModels.Models
String ExaminationForm { get; }
MarkType Mark { get; }
DateTime Date { get; }
Dictionary<int, IStudentModel> Students { get; }
}
}

View File

@ -4,5 +4,6 @@
{
String Name { get; }
String RecordCardNumber { get; }
Dictionary<int, IStatementModel> Statements { get; }
}
}

View 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; }
}
}