JobHistoryViewModel.cs 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. using System;
  2. using System.Collections.ObjectModel;
  3. using OpenSEMI.ClientBase;
  4. namespace VirgoUI.Client.Models.History.JobHistory
  5. {
  6. public class JobHistoryViewModel : BaseModel
  7. {
  8. public DateTime BeginDate { get; set; }
  9. public DateTime StartDateTime { get; set; }
  10. public DateTime EndDateTime { get; set; }
  11. public ObservableCollection<string> SourceLP { get; set; }
  12. public string SelectedValueLP { get; set; }
  13. public ModuleInfo FOUPA { get; set; }
  14. public JobHistoryItem Wafers { get; set; }
  15. #region Function
  16. public JobHistoryViewModel()
  17. {
  18. DisplayName = "Job History";
  19. var now = DateTime.Now;
  20. this.StartDateTime = now;
  21. this.BeginDate = now;
  22. this.StartDateTime = new DateTime(now.Year, now.Month, now.Day, 0, 0, 0, 0);
  23. this.EndDateTime = new DateTime(now.Year, now.Month, now.Day, 23, 59, 59, 999);
  24. SourceLP = new ObservableCollection<string>(new[] { "LP1", "LP2" });
  25. FOUPA = ModuleManager.ModuleInfos["LP1"];
  26. #region test data for job table
  27. Wafers = new JobHistoryItem();
  28. JobHistoryItem job1 = new JobHistoryItem() { JobNmae = "Job name 1", CarrierID = "CarrierID 1" };
  29. for (int i = 1; i <= 3; i++)
  30. {
  31. JobHistoryItem job = new JobHistoryItem() { JobNmae = job1.JobNmae + "_" + i.ToString(), CarrierID = job1.CarrierID + "_" + i.ToString() };
  32. job1.Children.Add(job);
  33. }
  34. JobHistoryItem job2 = new JobHistoryItem() { JobNmae = "Job name 2", CarrierID = "CarrierID 2" };
  35. for (int i = 1; i <= 2; i++)
  36. {
  37. JobHistoryItem job = new JobHistoryItem() { JobNmae = job2.JobNmae + "_" + i.ToString(), CarrierID = job2.CarrierID + "_" + i.ToString() };
  38. job2.Children.Add(job);
  39. }
  40. JobHistoryItem job3 = new JobHistoryItem() { JobNmae = "Job name 3", CarrierID = "CarrierID 3" };
  41. for (int i = 1; i <= 4; i++)
  42. {
  43. JobHistoryItem job = new JobHistoryItem() { JobNmae = job3.JobNmae + "_" + i.ToString(), CarrierID = job3.CarrierID + "_" + i.ToString() };
  44. job3.Children.Add(job);
  45. }
  46. Wafers.Children.Add(job1);
  47. Wafers.Children.Add(job2);
  48. Wafers.Children.Add(job3);
  49. #endregion
  50. }
  51. public void Query(string cjid, string carrierid, string loadport, string pjid, string sequencename)
  52. {
  53. string start = StartDateTime.ToString("yyyy/MM/dd HH:mm:ss.fff");
  54. string end = EndDateTime.ToString("yyyy/MM/dd HH:mm:ss.fff");
  55. }
  56. public void Export()
  57. {
  58. }
  59. #endregion
  60. }
  61. }