Таков выбор врат Штейна..
This commit is contained in:
parent
7d2196d4e8
commit
e0a3c1e1fd
@ -0,0 +1,17 @@
|
||||
using ComputerStoreDataModels.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ComputerStoreContracts.BindingModels
|
||||
{
|
||||
public class ConsignmentBindingModel : IConsignmentModel
|
||||
{
|
||||
public int OrderID { get; set; }
|
||||
public int ProductID { get; set; }
|
||||
public double Price { get; set; }
|
||||
public int Count { get; set; }
|
||||
}
|
||||
}
|
21
ComputerStoreContracts/BindingModels/OrderBindingModel.cs
Normal file
21
ComputerStoreContracts/BindingModels/OrderBindingModel.cs
Normal file
@ -0,0 +1,21 @@
|
||||
using ComputerStoreDataModels.Enums;
|
||||
using ComputerStoreDataModels.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ComputerStoreContracts.BindingModels
|
||||
{
|
||||
public class OrderBindingModel : IOrderModel
|
||||
{
|
||||
public int ID { get; set; }
|
||||
public double Price { get; set; }
|
||||
public OrderType Type { get; set; } = OrderType.Unknown;
|
||||
public OrderStatus Status { get; set; } = OrderStatus.Unknown;
|
||||
public DateTime DateCreate { get; set; } = DateTime.Now;
|
||||
public DateTime? DateImplement { get; set; }
|
||||
public int UserID { get; set; }
|
||||
}
|
||||
}
|
17
ComputerStoreContracts/BindingModels/RequestBindingModel.cs
Normal file
17
ComputerStoreContracts/BindingModels/RequestBindingModel.cs
Normal file
@ -0,0 +1,17 @@
|
||||
using ComputerStoreDataModels.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ComputerStoreContracts.BindingModels
|
||||
{
|
||||
public class RequestBindingModel : IRequestModel
|
||||
{
|
||||
public int ID { get; set; }
|
||||
public int OrderID { get; set; }
|
||||
public double Price { get; set; }
|
||||
public int Count { get; set; }
|
||||
}
|
||||
}
|
21
ComputerStoreContracts/BindingModels/UserBindingModel.cs
Normal file
21
ComputerStoreContracts/BindingModels/UserBindingModel.cs
Normal file
@ -0,0 +1,21 @@
|
||||
using ComputerStoreDataModels.Enums;
|
||||
using ComputerStoreDataModels.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ComputerStoreContracts.BindingModels
|
||||
{
|
||||
public class UserBindingModel : IUserModel
|
||||
{
|
||||
public int ID { get; set; }
|
||||
public string Username { get; set; } = string.Empty;
|
||||
public string Password { get; set; } = string.Empty;
|
||||
public string FirstName { get; set; } = string.Empty;
|
||||
public string LastName { get; set; } = string.Empty;
|
||||
public string MiddleName { get; set; } = string.Empty;
|
||||
public Role Role { get; set; } = Role.Unknown;
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ComputerStoreContracts.SearchModels
|
||||
{
|
||||
public class ConsignmentSearchModel
|
||||
{
|
||||
public int? OrderID { get; set; }
|
||||
}
|
||||
}
|
17
ComputerStoreContracts/SearchModels/OrderSearchModel.cs
Normal file
17
ComputerStoreContracts/SearchModels/OrderSearchModel.cs
Normal file
@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ComputerStoreContracts.SearchModels
|
||||
{
|
||||
public class OrderSearchModel
|
||||
{
|
||||
public int? ID { get; set; }
|
||||
public DateTime? DateFrom { get; set; }
|
||||
public DateTime? DateTo { get; set; }
|
||||
//Временно
|
||||
public int? UserID { get; set; }
|
||||
}
|
||||
}
|
14
ComputerStoreContracts/SearchModels/RequestSearchModel.cs
Normal file
14
ComputerStoreContracts/SearchModels/RequestSearchModel.cs
Normal file
@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ComputerStoreContracts.SearchModels
|
||||
{
|
||||
public class RequestSearchModel
|
||||
{
|
||||
public int? ID { get; set; }
|
||||
public int? OrderID { get; set; }
|
||||
}
|
||||
}
|
15
ComputerStoreContracts/SearchModels/UserSearchModel.cs
Normal file
15
ComputerStoreContracts/SearchModels/UserSearchModel.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using ComputerStoreDataModels.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ComputerStoreContracts.SearchModels
|
||||
{
|
||||
public class UserSearchModel
|
||||
{
|
||||
public int? ID { get; set; }
|
||||
public string? Username { get; set; }
|
||||
}
|
||||
}
|
22
ComputerStoreContracts/ViewModels/ConsignmentViewModel.cs
Normal file
22
ComputerStoreContracts/ViewModels/ConsignmentViewModel.cs
Normal file
@ -0,0 +1,22 @@
|
||||
using ComputerStoreDataModels.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ComputerStoreContracts.ViewModels
|
||||
{
|
||||
public class ConsignmentViewModel : IConsignmentModel
|
||||
{
|
||||
[DisplayName("Order ID")]
|
||||
public int OrderID { get; }
|
||||
[DisplayName("Product ID")]
|
||||
public int ProductID { get; }
|
||||
[DisplayName("Price")]
|
||||
public double Price { get; }
|
||||
[DisplayName("Count")]
|
||||
public int Count { get; }
|
||||
}
|
||||
}
|
29
ComputerStoreContracts/ViewModels/OrderViewModel.cs
Normal file
29
ComputerStoreContracts/ViewModels/OrderViewModel.cs
Normal file
@ -0,0 +1,29 @@
|
||||
using ComputerStoreDataModels.Enums;
|
||||
using ComputerStoreDataModels.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ComputerStoreContracts.ViewModels
|
||||
{
|
||||
public class OrderViewModel : IOrderModel
|
||||
{
|
||||
[DisplayName("Order ID")]
|
||||
public int ID { get; set; }
|
||||
[DisplayName("Price")]
|
||||
public double Price { get; set; }
|
||||
[DisplayName("Type of order")]
|
||||
public OrderType Type { get; set; }
|
||||
[DisplayName("Status")]
|
||||
public OrderStatus Status { get; set; }
|
||||
[DisplayName("Creation date")]
|
||||
public DateTime DateCreate { get; set; }
|
||||
[DisplayName("Implementation date")]
|
||||
public DateTime? DateImplement { get; set; }
|
||||
[DisplayName("User ID")]
|
||||
public int UserID { get; set; }
|
||||
}
|
||||
}
|
12
ComputerStoreContracts/ViewModels/RequestViewModel.cs
Normal file
12
ComputerStoreContracts/ViewModels/RequestViewModel.cs
Normal file
@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ComputerStoreContracts.ViewModels
|
||||
{
|
||||
internal class RequestViewModel
|
||||
{
|
||||
}
|
||||
}
|
12
ComputerStoreContracts/ViewModels/UserViewModel.cs
Normal file
12
ComputerStoreContracts/ViewModels/UserViewModel.cs
Normal file
@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ComputerStoreContracts.ViewModels
|
||||
{
|
||||
internal class UserViewModel
|
||||
{
|
||||
}
|
||||
}
|
@ -8,6 +8,7 @@ namespace ComputerStoreDataModels.Enums
|
||||
{
|
||||
public enum OrderType
|
||||
{
|
||||
Unknown = -1,
|
||||
Consigment = 0,
|
||||
Request = 1
|
||||
}
|
||||
|
@ -6,8 +6,9 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace ComputerStoreDataModels.Enums
|
||||
{
|
||||
public enum EmployeeRole
|
||||
public enum Role
|
||||
{
|
||||
Unknown = -1,
|
||||
Guarantor = 0,
|
||||
Cotnractor = 1
|
||||
}
|
@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using ComputerStoreDataModels.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
@ -6,10 +6,9 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace ComputerStoreDataModels.Models
|
||||
{
|
||||
public interface IRequestModel
|
||||
public interface IRequestModel : IID
|
||||
{
|
||||
int OrderID { get; }
|
||||
int PCID { get; }
|
||||
double Price { get; }
|
||||
int Count { get; }
|
||||
}
|
||||
|
@ -15,6 +15,6 @@ namespace ComputerStoreDataModels.Models
|
||||
string FirstName { get; }
|
||||
string LastName { get; }
|
||||
string MiddleName { get; }
|
||||
EmployeeRole Role { get; }
|
||||
Role Role { get; }
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user