VmInputCheckBoxRadioItem.cs 768 B

123456789101112131415161718192021222324252627282930313233343536
  1. namespace VberAdmin.Web.Models.Input;
  2. public class VmInputCheckBoxRadioItem
  3. {
  4. public VmInputCheckBoxRadioItem(string name, string value)
  5. {
  6. IsChecked = false;
  7. Name = name;
  8. Value = value;
  9. }
  10. public string Name { get; set; }
  11. public string Value { get; set; }
  12. public string Class { get; set; }
  13. public string Other { get; set; }
  14. public bool IsChecked { get; set; }
  15. public VmInputCheckBoxRadioItem WithClass(string @class)
  16. {
  17. Class = @class;
  18. return this;
  19. }
  20. public VmInputCheckBoxRadioItem WithOther(string other)
  21. {
  22. Other = other;
  23. return this;
  24. }
  25. public VmInputCheckBoxRadioItem WithChecked()
  26. {
  27. IsChecked = true;
  28. return this;
  29. }
  30. }