Add ITransfeDestinationPrices; Fix TransferDestination prices;
This commit is contained in:
parent
b48d77e627
commit
7a5dc75e2b
|
|
@ -0,0 +1,15 @@
|
|||
namespace TIAM.Entities.Transfers;
|
||||
|
||||
public interface ITransfeDestinationPrices
|
||||
{
|
||||
//public PriceType PriceType { get; set; }
|
||||
public double Price { get; set; }
|
||||
public double? Price2 { get; set; }
|
||||
public double? Price3 { get; set; }
|
||||
|
||||
public double? ExtraPrice { get; set; }
|
||||
/// <summary>
|
||||
/// Kihajtás v. behajtás az ExtraPrice! Ha null, akkor mindkettő...
|
||||
/// </summary>
|
||||
public bool? ExtraPriceType { get; set; }
|
||||
}
|
||||
|
|
@ -8,7 +8,7 @@ using TIAM.Entities.Addresses;
|
|||
namespace TIAM.Entities.Transfers
|
||||
{
|
||||
[Table("TransferDestination")]
|
||||
public class TransferDestination : IEntityGuid, ITimeStampInfo //LocationBase
|
||||
public class TransferDestination : IEntityGuid, ITransfeDestinationPrices, ITimeStampInfo //LocationBase
|
||||
{
|
||||
[Key, DatabaseGenerated(DatabaseGeneratedOption.None)]
|
||||
public Guid Id { get; set; }
|
||||
|
|
@ -24,8 +24,15 @@ namespace TIAM.Entities.Transfers
|
|||
|
||||
public string Description { get; set; }
|
||||
|
||||
//public PriceType PriceType { get; set; }
|
||||
public double Price { get; set; }
|
||||
public double? Price2 { get; set; }
|
||||
public double? Price3 { get; set; }
|
||||
|
||||
public double? ExtraPrice { get; set; }
|
||||
/// <summary>
|
||||
/// Kihajtás v. behajtás az ExtraPrice! Ha null, akkor mindkettő...
|
||||
/// </summary>
|
||||
public bool? ExtraPriceType { get; set; }
|
||||
|
||||
//TEMPORARY!!!
|
||||
public string? AddressString { get; set; }
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ using TIAM.Entities.Products;
|
|||
namespace TIAM.Entities.Transfers
|
||||
{
|
||||
[Table(nameof(TransferDestinationToProduct))]
|
||||
public class TransferDestinationToProduct : IEntityGuid, ITimeStampInfo, IProductForeignKey
|
||||
public class TransferDestinationToProduct : IEntityGuid, ITimeStampInfo, IProductForeignKey, ITransfeDestinationPrices
|
||||
{
|
||||
[Key, DatabaseGenerated(DatabaseGeneratedOption.None)]
|
||||
public Guid Id { get; set; }
|
||||
|
|
@ -19,14 +19,16 @@ namespace TIAM.Entities.Transfers
|
|||
public Guid TransferDestinationId { get; set; }
|
||||
public virtual TransferDestination TransferDestination { get; set; }
|
||||
|
||||
//public PriceType PriceType { get; set; }
|
||||
public double Price { get; set; }
|
||||
public double? Price2 { get; set; }
|
||||
public double? Price3 { get; set; }
|
||||
|
||||
public double? ExtraPrice { get; set; }
|
||||
/// <summary>
|
||||
/// Kihajtás v. behajtás az ExtraPrice! Ha null, akkor mindkettő...
|
||||
/// </summary>
|
||||
public bool? ExtraPriceType { get; set; }
|
||||
|
||||
|
||||
public DateTime Created { get; set; }
|
||||
public DateTime Modified { get; set; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ namespace TIAMSharedUI.Pages.User.SysAdmins
|
|||
{
|
||||
//add new transferwizardmodel to transferData array
|
||||
TransferDataFromDb = ((TransferDestinationWizardModel[])TransferDataFromDb).Append(
|
||||
new TransferDestinationWizardModel(item.Id, item.Name, item.Description, item.AddressString, item.Price, item.PriceType, item.Address)).ToArray();
|
||||
new TransferDestinationWizardModel(item.Id, item.Name, item.Description, item.AddressString, item.Price, item.Address)).ToArray();
|
||||
logToBrowserConsole.LogToBC($"TransferDataFromDb: {item.Name}");
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -102,9 +102,10 @@ namespace TIAMWebApp.Server.Controllers
|
|||
Console.WriteLine($"TransferDestination to be created: {transferDestination.AddressId}");
|
||||
Console.WriteLine($"TransferDestination to be created: {transferDestination.Name}");
|
||||
Console.WriteLine($"TransferDestination to be created: {transferDestination.Price}");
|
||||
//Console.WriteLine($"TransferDestination to be created: {transferDestination.Price2}");
|
||||
//Console.WriteLine($"TransferDestination to be created: {transferDestination.Price3}");
|
||||
Console.WriteLine($"TransferDestination to be created: {transferDestination.PriceType}");
|
||||
Console.WriteLine($"TransferDestination to be created: {transferDestination.Price2}");
|
||||
Console.WriteLine($"TransferDestination to be created: {transferDestination.Price3}");
|
||||
Console.WriteLine($"TransferDestination to be created: {transferDestination.ExtraPrice}");
|
||||
Console.WriteLine($"TransferDestination to be created: {transferDestination.ExtraPriceType}");
|
||||
Console.WriteLine($"TransferDestination to be created: {transferDestination.AddressString}");
|
||||
Console.WriteLine($"TransferDestination to be created: {transferDestination.Description}");
|
||||
|
||||
|
|
@ -162,7 +163,7 @@ namespace TIAMWebApp.Server.Controllers
|
|||
Console.WriteLine($"TransferDestination to be updated new price: {transferDestination.Price}");
|
||||
//Console.WriteLine($"TransferDestination to be updated new price: {transferDestination.Price2}");
|
||||
//Console.WriteLine($"TransferDestination to be updated new price: {transferDestination.Price3}");
|
||||
Console.WriteLine($"TransferDestination to be updated new priceType: {transferDestination.PriceType}");
|
||||
//Console.WriteLine($"TransferDestination to be updated new priceType: {transferDestination.PriceType}");
|
||||
Console.WriteLine($"TransferDestination to be updated new address: {transferDestination.AddressString}");
|
||||
Console.WriteLine($"TransferDestination to be updated new description: {transferDestination.Description}");
|
||||
|
||||
|
|
|
|||
|
|
@ -57,9 +57,9 @@ namespace TIAMWebApp.Shared.Application.Models.ClientSide.UI.WizardModels
|
|||
|
||||
public TransferDestinationWizardModel() { }
|
||||
|
||||
public TransferDestinationWizardModel(string name, string description, string addressString, double price, PriceType priceType, Address address) :this(Guid.NewGuid(), name, description, addressString, price, priceType, address)
|
||||
public TransferDestinationWizardModel(string name, string description, string addressString, double price, Address address) :this(Guid.NewGuid(), name, description, addressString, price, address)
|
||||
{ }
|
||||
public TransferDestinationWizardModel(Guid id, string name, string description, string addressString, double price, PriceType priceType, Address address)
|
||||
public TransferDestinationWizardModel(Guid id, string name, string description, string addressString, double price, Address address)
|
||||
{
|
||||
|
||||
Id = id.ToString();
|
||||
|
|
@ -67,7 +67,10 @@ namespace TIAMWebApp.Shared.Application.Models.ClientSide.UI.WizardModels
|
|||
Description = description;
|
||||
AddressString = addressString;
|
||||
Price = price;
|
||||
PriceType = priceType;
|
||||
//Price2 = price2;
|
||||
//Price3 = price3;
|
||||
//ExtraPrice = extraPrice;
|
||||
//ExtraPriceType= extraPriceType;
|
||||
Address = address;
|
||||
}
|
||||
|
||||
|
|
@ -81,9 +84,10 @@ namespace TIAMWebApp.Shared.Application.Models.ClientSide.UI.WizardModels
|
|||
destination.Description = model.Description;
|
||||
destination.AddressString = model.AddressString;
|
||||
destination.Price = model.Price;
|
||||
//destination.Price2 = model.Price;
|
||||
//destination.Price3 = model.Price;
|
||||
destination.PriceType = model.PriceType;
|
||||
destination.Price2 = model.Price;
|
||||
destination.Price3 = model.Price;
|
||||
//destination.ExtraPrice = model.ExtraPrice;
|
||||
//destination.ExtraPriceType= model.ExtraPriceType;
|
||||
destination.Address = model.Address;
|
||||
|
||||
if (destination.Address == null)
|
||||
|
|
|
|||
Loading…
Reference in New Issue