доработки
This commit is contained in:
parent
6e622c82ce
commit
2132887869
@ -8,7 +8,8 @@ namespace UniversityContracts.BindingModels
|
|||||||
{
|
{
|
||||||
public class PaymentBindingModel
|
public class PaymentBindingModel
|
||||||
{
|
{
|
||||||
public DateOnly Date { get; set; } = DateOnly.FromDateTime(DateTime.Now);
|
public DateTime DateCreate { get; set; } = DateTime.Now;
|
||||||
|
|
||||||
|
|
||||||
public double PaidPrice { get; set; }
|
public double PaidPrice { get; set; }
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ namespace UniversityContracts.SearchModels
|
|||||||
public int? ClassId { get; set; }
|
public int? ClassId { get; set; }
|
||||||
public int? PurchaseId { get; set; }
|
public int? PurchaseId { get; set; }
|
||||||
|
|
||||||
public DateOnly? DateFrom { get; set; }
|
public DateTime? DateFrom { get; set; }
|
||||||
public DateOnly? DateTo { get; set; }
|
public DateTime? DateTo { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -20,7 +20,7 @@ namespace BankContracts.ViewModels
|
|||||||
public double PaidPrice { get; set; }
|
public double PaidPrice { get; set; }
|
||||||
public int ClassByPurchaseId { get; set; }
|
public int ClassByPurchaseId { get; set; }
|
||||||
[DisplayName("Дата оплаты")]
|
[DisplayName("Дата оплаты")]
|
||||||
public DateOnly Date { get; set; } = DateOnly.FromDateTime(DateTime.Now);
|
public DateTime DateCreate { get; set; } = DateTime.Now;
|
||||||
public ClassByPurchaseModel ClassByPurchase { get; set; }
|
public ClassByPurchaseModel ClassByPurchase { get; set; }
|
||||||
|
|
||||||
// Машины для отчета за период
|
// Машины для отчета за период
|
||||||
|
@ -9,7 +9,7 @@ namespace UniversityDataModels
|
|||||||
public interface IPaymentModel : IId
|
public interface IPaymentModel : IId
|
||||||
{
|
{
|
||||||
double PaidPrice { get; }
|
double PaidPrice { get; }
|
||||||
DateOnly Date { get; }
|
DateTime DateCreate { get; }
|
||||||
int ClassByPurchaseId { get; }
|
int ClassByPurchaseId { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,7 @@ namespace UniversityDatabaseImplement.Implements
|
|||||||
using var context = new UniversityDB();
|
using var context = new UniversityDB();
|
||||||
if (model.DateFrom.HasValue)
|
if (model.DateFrom.HasValue)
|
||||||
return Payments(context)
|
return Payments(context)
|
||||||
.Where(x => model.DateFrom.Value <= x.Date && x.Date <= model.DateTo.Value)
|
.Where(x => x.DateCreate >= model.DateFrom.Value && x.DateCreate <= model.DateTo.Value)
|
||||||
.Select(x => x.GetViewModel)
|
.Select(x => x.GetViewModel)
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ namespace UniversityDatabaseImplement.Models
|
|||||||
public int ClassByPurchaseId { get; private set; }
|
public int ClassByPurchaseId { get; private set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public DateOnly Date { get; private set; }
|
public DateTime DateCreate { get; private set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public double PaidPrice { get; private set; }
|
public double PaidPrice { get; private set; }
|
||||||
@ -32,7 +32,7 @@ namespace UniversityDatabaseImplement.Models
|
|||||||
return new Payment()
|
return new Payment()
|
||||||
{
|
{
|
||||||
|
|
||||||
Date = model.Date,
|
DateCreate = model.DateCreate,
|
||||||
PaidPrice = model.PaidPrice,
|
PaidPrice = model.PaidPrice,
|
||||||
Id = model.Id,
|
Id = model.Id,
|
||||||
ClassByPurchaseId = model.ClassByPurchaseId,
|
ClassByPurchaseId = model.ClassByPurchaseId,
|
||||||
@ -43,7 +43,7 @@ namespace UniversityDatabaseImplement.Models
|
|||||||
Operation = ClassByPurchase?.Class?.GetViewModel,
|
Operation = ClassByPurchase?.Class?.GetViewModel,
|
||||||
ClassByPurchase = ClassByPurchase,
|
ClassByPurchase = ClassByPurchase,
|
||||||
FullPrice = ClassByPurchase?.Class?.Price ?? -1,
|
FullPrice = ClassByPurchase?.Class?.Price ?? -1,
|
||||||
Date = Date,
|
DateCreate = DateCreate,
|
||||||
PaidPrice = PaidPrice,
|
PaidPrice = PaidPrice,
|
||||||
Id = Id,
|
Id = Id,
|
||||||
ClassByPurchaseId = ClassByPurchaseId,
|
ClassByPurchaseId = ClassByPurchaseId,
|
||||||
|
@ -11,7 +11,7 @@ namespace UniversityDatabaseImplement
|
|||||||
{
|
{
|
||||||
if (optionsBuilder.IsConfigured == false)
|
if (optionsBuilder.IsConfigured == false)
|
||||||
{
|
{
|
||||||
optionsBuilder.UseSqlServer(@"Data Source=localhost\SQLEXPRESS;Initial Catalog=UniversityDB;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
|
optionsBuilder.UseSqlServer(@"Data Source=localhost\SQLEXPRESS;Initial Catalog=University;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
|
||||||
}
|
}
|
||||||
base.OnConfiguring(optionsBuilder);
|
base.OnConfiguring(optionsBuilder);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user