mirror of
https://github.com/PacktPublishing/Learn-WinUI-3-Second-Edition.git
synced 2026-06-20 12:23:09 +00:00
Add chapter 10 sample project
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
namespace TemplateStudioSampleApp.Core.Models;
|
||||
|
||||
// Model for the SampleDataService. Replace with your own model.
|
||||
public class SampleCompany
|
||||
{
|
||||
public string CompanyID
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public string CompanyName
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public string ContactName
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public string ContactTitle
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public string Address
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public string City
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public string PostalCode
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public string Country
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public string Phone
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public string Fax
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public ICollection<SampleOrder> Orders
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
namespace TemplateStudioSampleApp.Core.Models;
|
||||
|
||||
// Model for the SampleDataService. Replace with your own model.
|
||||
public class SampleOrder
|
||||
{
|
||||
public long OrderID
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public DateTime OrderDate
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public DateTime RequiredDate
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public DateTime ShippedDate
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public string ShipperName
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public string ShipperPhone
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public double Freight
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public string Company
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public string ShipTo
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public double OrderTotal
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public string Status
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public int SymbolCode
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public string SymbolName
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public char Symbol => (char)SymbolCode;
|
||||
|
||||
public ICollection<SampleOrderDetail> Details
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public string ShortDescription => $"Order ID: {OrderID}";
|
||||
|
||||
public override string ToString() => $"{Company} {Status}";
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
namespace TemplateStudioSampleApp.Core.Models;
|
||||
|
||||
// Model for the SampleDataService. Replace with your own model.
|
||||
public class SampleOrderDetail
|
||||
{
|
||||
public long ProductID
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public string ProductName
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public int Quantity
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public double Discount
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public string QuantityPerUnit
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public double UnitPrice
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public string CategoryName
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public string CategoryDescription
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public double Total
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public string ShortDescription => $"Product ID: {ProductID} - {ProductName}";
|
||||
}
|
||||
Reference in New Issue
Block a user