| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- using GreenTree.Strohrmann.ERP.Core.Domain.Business;
- using GreenTree.Strohrmann.ERP.Web.Models.Shared;
- using System;
- using System.Collections.Generic;
- using System.ComponentModel.DataAnnotations;
- using System.Linq;
- using System.Threading.Tasks;
- namespace GreenTree.Strohrmann.ERP.Web.Models.Business
- {
- public class CraftMaterialModel
- {
- #region Properties
- /// <summary>
- /// Craft employee model index
- /// </summary>
- public int Index { get; set; }
- /// <summary>
- /// Craft id
- /// </summary>
- [Display(Name = "ID")]
- public int CraftId { get; set; }
- /// <summary>
- /// Craft
- /// </summary>
- [Display(Name = "Gewerk")]
- public virtual CraftModel Craft { get; set; }
- /// <summary>
- /// Material id
- /// </summary>
- [Display(Name = "Material ID")]
- public int MaterialId { get; set; }
- /// <summary>
- /// Material
- /// </summary>
- [Display(Name = "Material")]
- public MaterialModel Material { get; set; }
- /// <summary>
- /// The amount of the material
- /// </summary>
- [Display(Name = "Menge")]
- public decimal Amount { get; set; }
- /// <summary>
- /// The material calculation factor
- /// </summary>
- [Display(Name = "Kalkulationsfaktor")]
- public decimal CalculationFactor { get; set; }
- #endregion
- #region Ctor
- /// <summary>
- /// Initializes a new instance of the CraftMaterialModel class
- /// </summary>
- public CraftMaterialModel() { }
- /// <summary>
- /// Initializes a new instance of the CraftMaterialModel class
- /// </summary>
- /// <param name="craftMaterial">The base craft material.</param>
- public CraftMaterialModel(CraftMaterial craftMaterial)
- {
- if (craftMaterial == null) return;
- CraftId = craftMaterial.CraftId;
- MaterialId = craftMaterial.MaterialId;
- Amount = craftMaterial.Amount;
- CalculationFactor = craftMaterial.CalculationFactor;
- }
- #endregion
- }
- }
|