TitleModel.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel.DataAnnotations;
  4. using System.Linq;
  5. using System.Threading.Tasks;
  6. namespace GreenTree.Strohrmann.ERP.Web.Models.Business
  7. {
  8. public class TitleModel
  9. {
  10. #region Properties
  11. /// <summary>
  12. /// Tax id
  13. /// </summary>
  14. [Display(Name = "ID")]
  15. public int Id { get; set; }
  16. /// <summary>
  17. /// Tax name
  18. /// </summary>
  19. [Display(Name = "Name")]
  20. public string Name { get; set; }
  21. #endregion
  22. #region Ctor
  23. /// <summary>
  24. /// Initializes a new instance of the TitleModel class
  25. /// </summary>
  26. public TitleModel() { }
  27. /// <summary>
  28. /// Initializes a new instance of the TitleModel class
  29. /// </summary>
  30. /// <param name="tax">Base tax entity.</param>
  31. public TitleModel(Core.Domain.Business.Title title)
  32. {
  33. if (title == null) return;
  34. Id = title.Id;
  35. Name = title.Name;
  36. }
  37. #endregion
  38. #region Overrides
  39. /// <summary>
  40. /// Returns a string that represents the current object with its' name
  41. /// </summary>
  42. public override string ToString()
  43. {
  44. return Name;
  45. }
  46. #endregion
  47. }
  48. }