ComboboxItemDto.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using System;
  2. namespace Abp.Application.Services.Dto
  3. {
  4. /// <summary>
  5. /// This DTO can be used as a simple item for a combobox/list.
  6. /// </summary>
  7. [Serializable]
  8. public class ComboboxItemDto
  9. {
  10. /// <summary>
  11. /// Value of the item.
  12. /// </summary>
  13. public string Value { get; set; }
  14. /// <summary>
  15. /// Display text of the item.
  16. /// </summary>
  17. public string DisplayText { get; set; }
  18. /// <summary>
  19. /// Is selected?
  20. /// </summary>
  21. public bool IsSelected { get; set; }
  22. /// <summary>
  23. /// Creates a new <see cref="ComboboxItemDto"/>.
  24. /// </summary>
  25. public ComboboxItemDto()
  26. {
  27. }
  28. /// <summary>
  29. /// Creates a new <see cref="ComboboxItemDto"/>.
  30. /// </summary>
  31. /// <param name="value">Value of the item</param>
  32. /// <param name="displayText">Display text of the item</param>
  33. public ComboboxItemDto(string value, string displayText)
  34. {
  35. Value = value;
  36. DisplayText = displayText;
  37. }
  38. }
  39. }