InitDataHelper.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. using DevExpress.Xpo;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace Ips.Sps
  8. {
  9. public static class InitDataHelper
  10. {
  11. private readonly static string[][] _sigSourceList = new string[][]
  12. {
  13. new []{ "UFO8","25258", "109.40.47.216:16016","1" }
  14. };
  15. public static void Seed(UnitOfWork uow)
  16. {
  17. //int sigSourceCnt = uow.Query<SigSource>().Count();
  18. //if (sigSourceCnt > 0)
  19. // return;
  20. //CreateSigSourceList(uow);
  21. //uow.CommitChanges();
  22. //Tst tst = new Tsts.Tst(uow);
  23. //tst.SigTime = DateTime.Now;
  24. //uow.CommitChanges();
  25. }
  26. private static void CreateSigSourceList(UnitOfWork uow)
  27. {
  28. //foreach (string[] item in _sigSourceList)
  29. //{
  30. // SigSource sigSource = new SigSource(uow);
  31. // int i = 0;
  32. // sigSource.Name = item[i++];
  33. // sigSource.Code = item[i++];
  34. // sigSource.Addr = item[i++];
  35. // sigSource.Ch = int.Parse(item[i++]);
  36. //}
  37. }
  38. }
  39. }