SupplierModel.cs 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. using GreenTree.Strohrmann.ERP.Core.Domain.Business;
  2. using GreenTree.Strohrmann.ERP.Web.Models.Shared;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.ComponentModel.DataAnnotations;
  6. using System.Linq;
  7. using System.Threading.Tasks;
  8. namespace GreenTree.Strohrmann.ERP.Web.Models.Business
  9. {
  10. public class SupplierModel : TrackingModel
  11. {
  12. #region Properties
  13. /// <summary>
  14. /// Supplier Id
  15. /// </summary>
  16. [Display(Name = "ID")]
  17. public int Id { get; set; }
  18. /// <summary>
  19. /// Supplier name
  20. /// </summary>
  21. [Display(Name = "Name")]
  22. public string Name { get; set; }
  23. /// <summary>
  24. /// Supplier description
  25. /// </summary>
  26. [Display(Name = "Beschreibung")]
  27. public string Description { get; set; }
  28. /// <summary>
  29. /// Supplier address
  30. /// </summary>
  31. [Display(Name = "Adresse")]
  32. public string Address { get; set; }
  33. /// <summary>
  34. /// Supplier town
  35. /// </summary>
  36. [Display(Name = "Stadt")]
  37. public string Town { get; set; }
  38. /// <summary>
  39. /// Supplier zip code
  40. /// </summary>
  41. [Display(Name = "Postleitzahl")]
  42. public string ZipCode { get; set; }
  43. /// <summary>
  44. /// Supplier country
  45. /// </summary>
  46. [Display(Name = "Land")]
  47. public string Country { get; set; }
  48. /// <summary>
  49. /// Supplier contact phone 1
  50. /// </summary>
  51. [Display(Name = "Telefon 1")]
  52. public string PhoneFirst { get; set; }
  53. /// <summary>
  54. /// Supplier contact phone 2
  55. /// </summary>
  56. [Display(Name = "Telefon 2")]
  57. public string PhoneSecond { get; set; }
  58. /// <summary>
  59. /// Supplier contact mail 1
  60. /// </summary>
  61. [Display(Name = "Mail-Adresse 1")]
  62. public string MailFirst { get; set; }
  63. /// <summary>
  64. /// Supplier contact mail 2
  65. /// </summary>
  66. [Display(Name = "Mail-Adresse 2")]
  67. public string MailSecond { get; set; }
  68. /// <summary>
  69. /// Supplier custom comment
  70. /// </summary>
  71. [Display(Name = "Kommentar")]
  72. public string Comment { get; set; }
  73. #endregion
  74. #region Ctor
  75. /// <summary>
  76. /// Initializes a new instance of the SupplierModel class
  77. /// </summary>
  78. public SupplierModel() { }
  79. /// <summary>
  80. /// Initializes a new instance of the SupplierModel class
  81. /// </summary>
  82. public SupplierModel(Supplier supplier)
  83. : base(supplier)
  84. {
  85. if (supplier == null) return;
  86. Id = supplier.Id;
  87. Name = supplier.Name;
  88. Description = supplier.Description;
  89. Address = supplier.Address;
  90. Town = supplier.Town;
  91. ZipCode = supplier.ZipCode;
  92. Country = supplier.Country;
  93. PhoneFirst = supplier.PhoneFirst;
  94. PhoneSecond = supplier.PhoneSecond;
  95. MailFirst = supplier.MailFirst;
  96. MailSecond = supplier.MailSecond;
  97. Comment = supplier.Comment;
  98. }
  99. #endregion
  100. }
  101. }