e44f7b2a9c36b1d82e9ec7f4ae50619e3fe96cf4.svn-base 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  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. namespace Core.LZMes.Client.UIF
  12. {
  13. public partial class UIF041010 : CoreFS.CA06.FrmBase
  14. {
  15. public UIF041010()
  16. {
  17. InitializeComponent();
  18. }
  19. #region "Grid Event"
  20. /// <summary>
  21. /// 双击记录行弹出窗体,获取冷轧原料的详细信息(满足的双击记录行为条件)
  22. /// </summary>
  23. /// <param name="sender">控件</param>
  24. /// <param name="e"></param>
  25. private void ugrd_DoubleClickRow(object sender, Infragistics.Win.UltraWinGrid.DoubleClickRowEventArgs e)
  26. {
  27. try
  28. {
  29. if (e.Row != null && FixDBManager.CheckNullStr(e.Row.Cells["CONDITION_"].Value).Length > 0)
  30. {
  31. string _Condition = FixDBManager.CheckNullStr(e.Row.Cells["CONDITION_"].Value);
  32. UIF041011 dlg_frm = new UIF041011();
  33. dlg_frm.ob = this.ob;
  34. dlg_frm.Condition = " AND " + _Condition;
  35. dlg_frm.ShowDialog();
  36. }
  37. }
  38. catch (System.Exception ex)
  39. {
  40. System.Diagnostics.Debug.WriteLine(ex.ToString());
  41. }
  42. }
  43. #endregion
  44. #region "ToolBar Event"
  45. public override void ToolBar_Click(object sender, string ToolbarKey)
  46. {
  47. try
  48. {
  49. switch (ToolbarKey)
  50. {
  51. case "Query":
  52. Query_Slab_State();
  53. break;
  54. case "Exit":
  55. this.Close();
  56. break;
  57. }
  58. }
  59. catch (System.Exception ex)
  60. {
  61. System.Diagnostics.Debug.WriteLine(ex.ToString());
  62. }
  63. }
  64. private void Query_Slab_State()
  65. {
  66. try
  67. {
  68. //object obj = "";
  69. CoreClientParam ccp = new CoreClientParam();
  70. ccp.ServerName = "UIF.UIF04.UIF041010";
  71. ccp.MethodName = "Query_Slab_State";
  72. ccp.ServerParams = new object[] { "PL/TCM" };
  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. }