colShowShiftGroup.cs 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Drawing;
  5. using System.Data;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9. using CoreFS.CA06;
  10. using Core.StlMes.Client.ZGMil.Entity;
  11. namespace Core.StlMes.Client.ZGMil.ResultConrtrol
  12. {
  13. public partial class colShowShiftGroup : UserControl
  14. {
  15. private OpeBase ob;
  16. public OpeBase Ob
  17. {
  18. get { return ob; }
  19. set { ob = value; }
  20. }
  21. private string shift;
  22. public string Shift
  23. {
  24. get { return shift; }
  25. set { shift = value; }
  26. }
  27. private string group;
  28. public string Group
  29. {
  30. get { return group; }
  31. set { group = value; }
  32. }
  33. public colShowShiftGroup()
  34. {
  35. InitializeComponent();
  36. }
  37. private void timer1_Tick(object sender, EventArgs e)
  38. {
  39. //DateTime SeverTime = NativeMethod.GetSeverTime(ob);
  40. //lblDate.Text = SeverTime.ToString("yyyy年MM月dd日 HH:mm:ss");
  41. }
  42. public void ShowShift()
  43. {
  44. string ShiftText = "";
  45. string GroupText = "";
  46. switch (shift)
  47. {
  48. case "1":
  49. ShiftText = "早";
  50. break;
  51. case "2":
  52. ShiftText = "中";
  53. break;
  54. case "3":
  55. ShiftText = "夜";
  56. break;
  57. }
  58. switch (group)
  59. {
  60. case "1":
  61. GroupText = "甲";
  62. break;
  63. case "2":
  64. GroupText = "乙";
  65. break;
  66. case "3":
  67. GroupText = "丙";
  68. break;
  69. case "4":
  70. GroupText = "丁";
  71. break;
  72. }
  73. lblShift.Text = ShiftText;
  74. lblGroup.Text = GroupText;
  75. }
  76. }
  77. }