UIF051010.cs 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9. using CoreFS.CA06;
  10. using Common;
  11. using System.Collections;
  12. namespace Core.LZMes.Client.UIF
  13. {
  14. public partial class UIF051010 : CoreFS.CA06.FrmBase
  15. {
  16. public UIF051010()
  17. {
  18. InitializeComponent();
  19. }
  20. #region "Grid Event"
  21. /// <summary>
  22. /// 双击记录行弹出窗体,获取冷轧原料的详细信息(满足的双击记录行为条件)
  23. /// </summary>
  24. /// <param name="sender">控件</param>
  25. /// <param name="e"></param>
  26. private void ugrd_DoubleClickRow(object sender, Infragistics.Win.UltraWinGrid.DoubleClickRowEventArgs e)
  27. {
  28. //try
  29. //{
  30. // if (e.Row != null && FixDBManager.CheckNullStr(e.Row.Cells["CONDITION_"].Value).Length > 0)
  31. // {
  32. // string _Condition = FixDBManager.CheckNullStr(e.Row.Cells["CONDITION_"].Value);
  33. // UIF051010 dlg_frm = new UIF051010();
  34. // dlg_frm.ob = this.ob;
  35. // dlg_frm.Condition = " AND " + _Condition;
  36. // dlg_frm.ShowDialog();
  37. // }
  38. //}
  39. //catch (System.Exception ex)
  40. //{
  41. // System.Diagnostics.Debug.WriteLine(ex.ToString());
  42. //}
  43. }
  44. #endregion
  45. #region "ToolBar Event"
  46. public override void ToolBar_Click(object sender, string ToolbarKey)
  47. {
  48. try
  49. {
  50. switch (ToolbarKey)
  51. {
  52. case "Query":
  53. Query_Slab_State();
  54. break;
  55. case "Exit":
  56. this.Close();
  57. break;
  58. }
  59. }
  60. catch (System.Exception ex)
  61. {
  62. System.Diagnostics.Debug.WriteLine(ex.ToString());
  63. }
  64. }
  65. private void Query_Slab_State()
  66. {
  67. try
  68. {
  69. CoreClientParam ccp = new CoreClientParam();
  70. ccp.ServerName = "UIF.UIF04.UIF041010";
  71. ccp.MethodName = "Query_Slab_State";
  72. ccp.ServerParams = new object[] { "CAL" };
  73. CoreClientParam obj = this.ExecuteQuery(ccp, CoreInvokeType.Internal);
  74. if (obj.ReturnInfo.Length == 0)
  75. {
  76. System.Collections.ArrayList rtnobj = obj.ReturnObject as System.Collections.ArrayList;
  77. if (rtnobj[0] != null)
  78. {
  79. this.dataSet1.Tables["TAB_HEIGHT"].Clear();
  80. System.Data.DataTable tab0 = FixDBManager.ConvertToDataTable(rtnobj[0] as System.Collections.ArrayList, this.dataSet1.Tables["TAB_HEIGHT"]);
  81. tab0.TableName = "TAB_HEIGHT";
  82. this.dataSet1.Tables["TAB_HEIGHT"].Merge(tab0);
  83. }
  84. if (rtnobj[1] != null)
  85. {
  86. this.dataSet1.Tables["TAB_WIDTH"].Clear();
  87. System.Data.DataTable tab1 = FixDBManager.ConvertToDataTable(rtnobj[1] as System.Collections.ArrayList, this.dataSet1.Tables["TAB_WIDTH"]);
  88. tab1.TableName = "TAB_WIDTH";
  89. this.dataSet1.Tables["TAB_WIDTH"].Merge(tab1);
  90. }
  91. if (rtnobj[2] != null)
  92. {
  93. this.dataSet1.Tables["TAB_APPEARANCE"].Clear();
  94. System.Data.DataTable tab2 = FixDBManager.ConvertToDataTable(rtnobj[2] as System.Collections.ArrayList, this.dataSet1.Tables["TAB_APPEARANCE"]);
  95. tab2.TableName = "TAB_APPEARANCE";
  96. this.dataSet1.Tables["TAB_APPEARANCE"].Merge(tab2);
  97. }
  98. if (rtnobj[3] != null)
  99. {
  100. this.dataSet1.Tables["TAB_CODETIEM"].Clear();
  101. System.Data.DataTable tab3 = FixDBManager.ConvertToDataTable(rtnobj[3] as System.Collections.ArrayList, this.dataSet1.Tables["TAB_CODETIEM"]);
  102. tab3.TableName = "TAB_CODETIEM";
  103. this.dataSet1.Tables["TAB_CODETIEM"].Merge(tab3);
  104. }
  105. if (rtnobj[4] != null)
  106. {
  107. this.dataSet1.Tables["TAB_STEEL"].Clear();
  108. System.Data.DataTable tab4 = FixDBManager.ConvertToDataTable(rtnobj[4] as System.Collections.ArrayList, this.dataSet1.Tables["TAB_STEEL"]);
  109. tab4.TableName = "TAB_STEEL";
  110. this.dataSet1.Tables["TAB_STEEL"].Merge(tab4);
  111. }
  112. if (rtnobj[5] != null)
  113. {
  114. this.dataSet1.Tables["TAB_COMMODITY"].Clear();
  115. System.Data.DataTable tab5 = FixDBManager.ConvertToDataTable(rtnobj[5] as System.Collections.ArrayList, this.dataSet1.Tables["TAB_COMMODITY"]);
  116. tab5.TableName = "TAB_COMMODITY";
  117. this.dataSet1.Tables["TAB_COMMODITY"].Merge(tab5);
  118. }
  119. this.dataSet1.AcceptChanges();
  120. }
  121. }
  122. catch (System.Exception ex)
  123. {
  124. System.Diagnostics.Debug.WriteLine(ex.ToString());
  125. }
  126. }
  127. #endregion
  128. #region "Init"
  129. private void UIF041010_Load(object sender, EventArgs e)
  130. {
  131. try
  132. {
  133. int panel_Width = (this.Parent.FindForm().Width - 12) / 2;
  134. int col_Width = panel_Width - 89 * 4;
  135. this.panel1.Width = panel_Width;
  136. this.ugrd_Height.DisplayLayout.Bands[0].Columns["TYPE_"].RowLayoutColumnInfo.PreferredCellSize = new System.Drawing.Size(col_Width, 0);
  137. this.ugrd_Width.DisplayLayout.Bands[0].Columns["TYPE_"].RowLayoutColumnInfo.PreferredCellSize = new System.Drawing.Size(col_Width, 0);
  138. this.ugrd_Apperaance.DisplayLayout.Bands[0].Columns["TYPE_"].RowLayoutColumnInfo.PreferredCellSize = new System.Drawing.Size(col_Width, 0);
  139. this.ugrd_ColdTime.DisplayLayout.Bands[0].Columns["TYPE_"].RowLayoutColumnInfo.PreferredCellSize = new System.Drawing.Size(col_Width, 0);
  140. this.ugrd_Steel.DisplayLayout.Bands[0].Columns["TYPE_"].RowLayoutColumnInfo.PreferredCellSize = new System.Drawing.Size(col_Width, 0);
  141. this.ugrd_Commodity.DisplayLayout.Bands[0].Columns["TYPE_"].RowLayoutColumnInfo.PreferredCellSize = new System.Drawing.Size(col_Width, 0);
  142. }
  143. catch (System.Exception ex)
  144. {
  145. System.Diagnostics.Debug.WriteLine(ex.ToString());
  146. }
  147. }
  148. #endregion
  149. }
  150. }