Guarantor: Shifting from Employee ID in view model to Employee username.

This commit is contained in:
Yuee Shiness 2023-04-07 14:53:06 +04:00
parent 74de95f90b
commit ee3f2ff447
4 changed files with 8 additions and 2 deletions

View File

@ -18,9 +18,11 @@ namespace ComputerStoreContracts.ViewModels
[DisplayName("PC's price")] [DisplayName("PC's price")]
public double Price { get; set; } public double Price { get; set; }
[DisplayName("Employee ID")]
public int EmployeeID { get; set; } public int EmployeeID { get; set; }
[DisplayName("Employee's username")]
public string EmployeeUsername { get; set; } = string.Empty;
[DisplayName("Request ID")] [DisplayName("Request ID")]
public int RequestID { get; set; } public int RequestID { get; set; }
public Dictionary<int, (IComponentModel, int)> PCComponents { get; set; } = new(); public Dictionary<int, (IComponentModel, int)> PCComponents { get; set; } = new();

View File

@ -18,9 +18,11 @@ namespace ComputerStoreContracts.ViewModels
[DisplayName("Product's price")] [DisplayName("Product's price")]
public double Price { get; set; } public double Price { get; set; }
[DisplayName("Employee ID")]
public int EmployeeID { get; set; } public int EmployeeID { get; set; }
[DisplayName("Employee's username")]
public string EmployeeUsername { get; set; } = string.Empty;
[DisplayName("Consignment ID")] [DisplayName("Consignment ID")]
public int ConsignmentID { get; set; } public int ConsignmentID { get; set; }

View File

@ -77,6 +77,7 @@ namespace ComputerStoreDatabaseImplement.Models
Name = Name, Name = Name,
Price = Price, Price = Price,
EmployeeID = EmployeeID, EmployeeID = EmployeeID,
EmployeeUsername = Employee.Username,
RequestID = RequestID, RequestID = RequestID,
PCComponents = PCComponents PCComponents = PCComponents
}; };

View File

@ -76,6 +76,7 @@ namespace ComputerStoreDatabaseImplement.Models
Name = Name, Name = Name,
Price = Price, Price = Price,
EmployeeID = EmployeeID, EmployeeID = EmployeeID,
EmployeeUsername = Employee.Username,
ConsignmentID = ConsignmentID, ConsignmentID = ConsignmentID,
ProductComponents = ProductComponents ProductComponents = ProductComponents
}; };