CustomerInfor.cs 833 B

1234567891011121314151617181920212223242526272829
  1. using LogoForceTestApp.Modules.MainModule.Method;
  2. using Prism.Mvvm;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Collections.ObjectModel;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. namespace LogoForceTestApp.Modules.MainModule.Models
  10. {
  11. public class CustomerInfor:BindableBase
  12. {
  13. public ObservableCollection<string> CustomerName { get; set; }
  14. public CustomerInfor()
  15. {
  16. CustomerName = new ObservableCollection<string>();
  17. }
  18. public void ReadConfig()
  19. {
  20. var res = DataHelp.ReadJsonFile<CustomerInfor>(GVariable.CustomerCofig);
  21. this.CustomerName = res.CustomerName;
  22. }
  23. public void WriteConfig()
  24. {
  25. DataHelp.WriteJsonFile(this, GVariable.CustomerCofig);
  26. }
  27. }
  28. }