DateItem.cs 709 B

1234567891011121314151617181920212223
  1. namespace WeApp.Views.Shared.SearchForm
  2. {
  3. public class DateItem
  4. {
  5. public DateItem(int interval = 30, string formatter = "YYYY-MM-DD", bool isAutoApply = false)
  6. {
  7. Interval = interval;
  8. Formatter = formatter;
  9. IsAutoApply = isAutoApply;
  10. }
  11. public DateItem(string formatter, bool isAutoApply = false)
  12. {
  13. Interval = 30;
  14. Formatter = formatter;
  15. IsAutoApply = isAutoApply;
  16. }
  17. public bool IsAutoApply { get; set; }
  18. public int Interval { get; set; }
  19. public string Formatter { get; set; }
  20. public string IsAutoApplyStr => IsAutoApply ? "true" : "false";
  21. }
  22. }