FrmStraighteningResult1.cs 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344
  1. using System;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using System.ComponentModel;
  5. using System.Data;
  6. using System.Drawing;
  7. using System.Linq;
  8. using System.Text;
  9. using System.Windows.Forms;
  10. using CoreFS.CA06;
  11. using Core.Mes.Client.Comm.Server;
  12. using Core.Mes.Client.Comm.Control;
  13. using Core.StlMes.Client.ZGMil;
  14. using com.steering.mes.zgmil.entity;
  15. using Infragistics.Win.UltraWinGrid;
  16. namespace Core.StlMes.Client.ZGMil.ResultConrtrol
  17. {
  18. public partial class FrmStraighteningResult1 : UserControl
  19. {
  20. private Infragistics.Win.UltraWinGrid.UltraGrid _grid = null;
  21. public FrmStraighteningResult1()
  22. {
  23. InitializeComponent();
  24. GridHelper.InitCardGrid(StraightDataSource4, ultraGrid4);
  25. _grid = this.ultraGrid4;
  26. }
  27. private MilStraighteningResultEntity _StraighPlan = new MilStraighteningResultEntity();
  28. public MilStraighteningResultEntity Value
  29. {
  30. get { return _StraighPlan; }
  31. set
  32. {
  33. if (value != null)
  34. {
  35. _StraighPlan = value;
  36. UpdateData();
  37. }
  38. }
  39. }
  40. private bool isCellSelect = false;
  41. public bool IsCellSelect
  42. {
  43. get { return isCellSelect; }
  44. set { isCellSelect = value; }
  45. }
  46. private void ultraGrid4_CellChange(object sender, CellEventArgs e)
  47. {
  48. this.IsCellSelect = true;
  49. }
  50. public void UpdateData()
  51. {
  52. StraightDataSource4.Rows[0]["Remark"] = _StraighPlan.Remark;
  53. //上料支数
  54. //StraightDataSource4.Rows[0]["OperatingTable"] = _StraighPlan.LotNo;
  55. //上料长度
  56. StraightDataSource4.Rows[0]["RollingSpeed"] = _StraighPlan.RollingSpeed;
  57. //使用长度
  58. StraightDataSource4.Rows[0]["MainMotorSpeed"] = _StraighPlan.MainMotorSpeed;
  59. //未使用长度
  60. //StraightDataSource4.Rows[0]["RollAngle"] = _StraighPlan.PlineCode;
  61. ////切损去向
  62. //StraightDataSource4.Rows[0]["RollSpace"] = _StraighPlan.RollerSpace;
  63. //倍尺数
  64. StraightDataSource4.Rows[0]["RollerUpAngle11"] = _StraighPlan.RollerUpAngle11;
  65. //单倍长度
  66. StraightDataSource4.Rows[0]["RollerDownAngle11"] = _StraighPlan.RollerDownAngle11;
  67. ////计划单倍总支数
  68. StraightDataSource4.Rows[0]["RollerUpAngle12"] = _StraighPlan.RollerUpAngle12;
  69. StraightDataSource4.Rows[0]["RollerDownAngle12"] = _StraighPlan.RollerDownAngle12;
  70. StraightDataSource4.Rows[0]["RollerUpAngle13"] = _StraighPlan.RollerUpAngle13;
  71. StraightDataSource4.Rows[0]["RollerDownAngle13"] = _StraighPlan.RollerDownAngle13;
  72. StraightDataSource4.Rows[0]["RollerUpAngle14"] = _StraighPlan.RollerUpAngle14;
  73. StraightDataSource4.Rows[0]["RollerDownAngle14"] = _StraighPlan.RollerDownAngle14;
  74. StraightDataSource4.Rows[0]["RollerUpAngle15"] = _StraighPlan.RollerUpAngle15;
  75. StraightDataSource4.Rows[0]["RollerDownAngle15"] = _StraighPlan.RollerDownAngle15;
  76. //StraightDataSource4.Rows[0]["ScrapNumDeatil"] = _StraighPlan.CapillarySize;
  77. //StraightDataSource4.Rows[0]["StraingNumDeatil"] = _StraighPlan.CapillarySize;
  78. StraightDataSource4.Rows[0]["MiddleRollerSpace"] = _StraighPlan.MiddleRollerSpace;
  79. StraightDataSource4.Rows[0]["ScrapNum1"] = _StraighPlan.ScrapNum1;
  80. ////开始时间
  81. StraightDataSource4.Rows[0]["ScrapNum2"] = _StraighPlan.ScrapNum2;
  82. ////结束时间
  83. StraightDataSource4.Rows[0]["ScrapNum3"] = _StraighPlan.ScrapNum3;
  84. StraightDataSource4.Rows[0]["QualifiedNum1"] = _StraighPlan.QualifiedNum1;
  85. StraightDataSource4.Rows[0]["QualifiedNum2"] = _StraighPlan.QualifiedNum2;
  86. StraightDataSource4.Rows[0]["QualifiedNum3"] = _StraighPlan.QualifiedNum3;
  87. StraightDataSource4.Rows[0]["ScrapNum"] = _StraighPlan.ScrapNum;
  88. StraightDataSource4.Rows[0]["QualifiedNum"] = _StraighPlan.QualifiedNum;
  89. //StraightDataSource4.Rows[0]["StraightNo2"] = _StraighPlan.ExecutiveProducer;
  90. //StraightDataSource4.Rows[0]["StraightNo3"] = _StraighPlan.ProducerTime;
  91. ////开始时间
  92. StraightDataSource4.Rows[0]["RollerUpAngle21"] = _StraighPlan.RollerUpAngle21;
  93. ////结束时间
  94. StraightDataSource4.Rows[0]["RollerDownAngle21"] = _StraighPlan.RollerDownAngle21;
  95. StraightDataSource4.Rows[0]["RollerDownAngle22"] = _StraighPlan.RollerDownAngle22;
  96. ////单倍长度
  97. StraightDataSource4.Rows[0]["RollerDownAngle23"] = _StraighPlan.RollerDownAngle23;
  98. ////计划单倍总支数
  99. StraightDataSource4.Rows[0]["RollerDownAngle24"] = _StraighPlan.RollerDownAngle24;
  100. StraightDataSource4.Rows[0]["RollerDownAngle25"] = _StraighPlan.RollerDownAngle25;
  101. StraightDataSource4.Rows[0]["RollerUpAngle22"] = _StraighPlan.RollerUpAngle22;
  102. StraightDataSource4.Rows[0]["RollerUpAngle23"] = _StraighPlan.RollerUpAngle23;
  103. StraightDataSource4.Rows[0]["RollerUpAngle24"] = _StraighPlan.RollerUpAngle24;
  104. StraightDataSource4.Rows[0]["RollerUpAngle25"] = _StraighPlan.RollerUpAngle25;
  105. StraightDataSource4.Rows[0]["RollerUpAngle31"] = _StraighPlan.RollerUpAngle31;
  106. StraightDataSource4.Rows[0]["RollerUpAngle32"] = _StraighPlan.RollerUpAngle32;
  107. ////开始时间
  108. StraightDataSource4.Rows[0]["RollerUpAngle33"] = _StraighPlan.RollerUpAngle33;
  109. ////结束时间
  110. StraightDataSource4.Rows[0]["RollerUpAngle34"] = _StraighPlan.RollerUpAngle34;
  111. StraightDataSource4.Rows[0]["RollerUpAngle35"] = _StraighPlan.RollerUpAngle35;
  112. StraightDataSource4.Rows[0]["RollerDownAngle31"] = _StraighPlan.RollerDownAngle31;
  113. ////开始时间
  114. StraightDataSource4.Rows[0]["RollerDownAngle32"] = _StraighPlan.RollerDownAngle32;
  115. StraightDataSource4.Rows[0]["RollerDownAngle33"] = _StraighPlan.RollerDownAngle33;
  116. StraightDataSource4.Rows[0]["RollerDownAngle34"] = _StraighPlan.RollerDownAngle34;
  117. StraightDataSource4.Rows[0]["RollerDownAngle35"] = _StraighPlan.RollerDownAngle35;
  118. StraightDataSource4.Rows[0]["RollerSpace15"] = _StraighPlan.RollerSpace15;
  119. StraightDataSource4.Rows[0]["RollerSpace21"] = _StraighPlan.RollerSpace21;
  120. StraightDataSource4.Rows[0]["RollerSpace22"] = _StraighPlan.RollerSpace22;
  121. StraightDataSource4.Rows[0]["RollerSpace23"] = _StraighPlan.RollerSpace23;
  122. StraightDataSource4.Rows[0]["RollerSpace24"] = _StraighPlan.RollerSpace24;
  123. StraightDataSource4.Rows[0]["RollerSpace25"] = _StraighPlan.RollerSpace25;
  124. ////结束时间
  125. StraightDataSource4.Rows[0]["RollerSpace31"] = _StraighPlan.RollerSpace31;
  126. StraightDataSource4.Rows[0]["RollerSpace32"] = _StraighPlan.RollerSpace32;
  127. StraightDataSource4.Rows[0]["RollerSpace33"] = _StraighPlan.RollerSpace33;
  128. ////开始时间
  129. StraightDataSource4.Rows[0]["RollerSpace34"] = _StraighPlan.RollerSpace34;
  130. StraightDataSource4.Rows[0]["RollerSpace35"] = _StraighPlan.RollerSpace35;
  131. StraightDataSource4.Rows[0]["SootBlowingTime"] = _StraighPlan.SootBlowingTime;
  132. StraightDataSource4.Rows[0]["RollerSpace11"] = _StraighPlan.RollerSpace11;
  133. StraightDataSource4.Rows[0]["RollerSpace12"] = _StraighPlan.RollerSpace12;
  134. StraightDataSource4.Rows[0]["RollerSpace13"] = _StraighPlan.RollerSpace13;
  135. StraightDataSource4.Rows[0]["RollerSpace14"] = _StraighPlan.RollerSpace14;
  136. //StraightDataSource4.Rows[0]["Angle3#"] = _StraighPlan.GuideDiscMotorLoca;
  137. //StraightDataSource4.Rows[0]["Angle5#"] = _StraighPlan.DbLoca;
  138. ////开始时间
  139. StraightDataSource4.Rows[0]["InMatNum"] = _StraighPlan.InMatNum;
  140. ////结束时间
  141. //StraightDataSource4.Rows[0]["StraightNo1"] = _StraighPlan.st;
  142. StraightDataSource4.Rows[0]["ExecutiveProducer"] = _StraighPlan.ExecutiveProducer;
  143. StraightDataSource4.Rows[0]["StartTime"] = _StraighPlan.StartTime;
  144. StraightDataSource4.Rows[0]["EndTime"] = _StraighPlan.EndTime;
  145. StraightDataSource4.Rows[0]["ChangeNum"] = _StraighPlan.ChangeNum;
  146. }
  147. public void DataClear()
  148. {
  149. //if (_StraighPlan != null)
  150. //{
  151. // StraightDataSource4.Rows[0]["Remark"] = "";
  152. // //上料支数
  153. // //StraightDataSource4.Rows[0]["OperatingTable"] = _StraighPlan.LotNo;
  154. // //上料长度
  155. // StraightDataSource4.Rows[0]["Speed"] = "";
  156. // //使用长度
  157. // StraightDataSource4.Rows[0]["ORDER_SIZE_SCOPE"] = "";
  158. // //未使用长度
  159. // //StraightDataSource4.Rows[0]["RollAngle"] = _StraighPlan.PlineCode;
  160. // ////切损去向
  161. // //StraightDataSource4.Rows[0]["RollSpace"] = _StraighPlan.RollerSpace;
  162. // //倍尺数
  163. // StraightDataSource4.Rows[0]["Up1"] = "";
  164. // //单倍长度
  165. // StraightDataSource4.Rows[0]["Down1"] = "";
  166. // ////计划单倍总支数
  167. // StraightDataSource4.Rows[0]["Up2"] = "";
  168. // StraightDataSource4.Rows[0]["Down2"] = "";
  169. // StraightDataSource4.Rows[0]["Up3"] = "";
  170. // StraightDataSource4.Rows[0]["Down3"] = "";
  171. // StraightDataSource4.Rows[0]["Up4"] = "";
  172. // StraightDataSource4.Rows[0]["Down4"] = "";
  173. // StraightDataSource4.Rows[0]["Up5"] = "";
  174. // StraightDataSource4.Rows[0]["Down5"] = "";
  175. // //StraightDataSource4.Rows[0]["ScrapNumDeatil"] = _StraighPlan.CapillarySize;
  176. // //StraightDataSource4.Rows[0]["StraingNumDeatil"] = _StraighPlan.CapillarySize;
  177. // StraightDataSource4.Rows[0]["ScrapNumDeatil1"] = "";
  178. // ////开始时间
  179. // StraightDataSource4.Rows[0]["ScrapNumDeatil2"] = "";
  180. // ////结束时间
  181. // StraightDataSource4.Rows[0]["ScrapNumDeatil3"] = "";
  182. // StraightDataSource4.Rows[0]["StraingNumDeatil1"] = "";
  183. // StraightDataSource4.Rows[0]["StraingNumDeatil2"] = "";
  184. // StraightDataSource4.Rows[0]["StraingNumDeatil3"] = "";
  185. // StraightDataSource4.Rows[0]["ScrapNum"] = "";
  186. // StraightDataSource4.Rows[0]["StraightNum"] = "";
  187. // //StraightDataSource4.Rows[0]["StraightNo2"] = _StraighPlan.ExecutiveProducer;
  188. // //StraightDataSource4.Rows[0]["StraightNo3"] = _StraighPlan.ProducerTime;
  189. // ////开始时间
  190. // StraightDataSource4.Rows[0]["RollAngleUp21"] = "";
  191. // ////结束时间
  192. // StraightDataSource4.Rows[0]["RollAngleDown21"] = "";
  193. // StraightDataSource4.Rows[0]["RollAngleDown22"] = "";
  194. // ////单倍长度
  195. // StraightDataSource4.Rows[0]["RollAngleDown23"] = "";
  196. // ////计划单倍总支数
  197. // StraightDataSource4.Rows[0]["RollAngleDown24"] = "";
  198. // StraightDataSource4.Rows[0]["RollAngleDown25"] = "";
  199. // StraightDataSource4.Rows[0]["RollAngleUp22"] = "";
  200. // StraightDataSource4.Rows[0]["RollAngleUp23"] = "";
  201. // StraightDataSource4.Rows[0]["RollAngleUp24"] = "";
  202. // StraightDataSource4.Rows[0]["RollAngleUp25"] = "";
  203. // StraightDataSource4.Rows[0]["RollAngleUp31"] = "";
  204. // StraightDataSource4.Rows[0]["RollAngleUp32"] = "";
  205. // ////开始时间
  206. // StraightDataSource4.Rows[0]["RollAngleUp33"] = "";
  207. // ////结束时间
  208. // StraightDataSource4.Rows[0]["RollAngleUp34"] = "";
  209. // StraightDataSource4.Rows[0]["RollAngleUp35"] = "";
  210. // StraightDataSource4.Rows[0]["RollAngleDown31"] = "";
  211. // ////开始时间
  212. // StraightDataSource4.Rows[0]["RollAngleDown32"] = "";
  213. // StraightDataSource4.Rows[0]["RollAngleDown33"] = "";
  214. // StraightDataSource4.Rows[0]["RollAngleDown34"] = "";
  215. // StraightDataSource4.Rows[0]["RollAngleDown35"] = "";
  216. // StraightDataSource4.Rows[0]["RollSpace15"] = "";
  217. // StraightDataSource4.Rows[0]["RollSpace21"] = "";
  218. // StraightDataSource4.Rows[0]["RollSpace22"] = "";
  219. // StraightDataSource4.Rows[0]["RollSpace23"] = "";
  220. // StraightDataSource4.Rows[0]["RollSpace24"] = "";
  221. // StraightDataSource4.Rows[0]["RollSpace25"] = "";
  222. // ////结束时间
  223. // StraightDataSource4.Rows[0]["RollSpace31"] = "";
  224. // StraightDataSource4.Rows[0]["RollSpace32"] = "";
  225. // StraightDataSource4.Rows[0]["RollSpace33"] = ""; ;
  226. // ////开始时间
  227. // StraightDataSource4.Rows[0]["RollSpace34"] = "";
  228. // StraightDataSource4.Rows[0]["RollSpace35"] = "";
  229. // StraightDataSource4.Rows[0]["BlowDustTime"] = "";
  230. // StraightDataSource4.Rows[0]["RollSpace11"] = "";
  231. // StraightDataSource4.Rows[0]["RollSpace12"] = "";
  232. // StraightDataSource4.Rows[0]["RollSpace13"] = "";
  233. // StraightDataSource4.Rows[0]["RollSpace14"] = "";
  234. // //StraightDataSource4.Rows[0]["Angle3#"] = _StraighPlan.GuideDiscMotorLoca;
  235. // //StraightDataSource4.Rows[0]["Angle5#"] = _StraighPlan.DbLoca;
  236. // ////开始时间
  237. // StraightDataSource4.Rows[0]["InMatNum"] = "";
  238. // ////结束时间
  239. // //StraightDataSource4.Rows[0]["StraightNo1"] = _StraighPlan.st;
  240. // StraightDataSource4.Rows[0]["ExecutiveProducer"] = "";
  241. // StraightDataSource4.Rows[0]["StartTime"] = "";
  242. // ////开始时间
  243. // StraightDataSource4.Rows[0]["EndTime"] = "";
  244. // StraightDataSource4.Rows[0]["ChangeClassNum"] = "";
  245. }
  246. public void NoUsing1()
  247. {
  248. this.ultraGrid4.DisplayLayout.Bands[0].Columns["RollerUpAngle11"].CellActivation = Infragistics.Win.UltraWinGrid.Activation.Disabled;
  249. this.ultraGrid4.DisplayLayout.Bands[0].Columns["RollerUpAngle12"].CellActivation = Infragistics.Win.UltraWinGrid.Activation.Disabled;
  250. this.ultraGrid4.DisplayLayout.Bands[0].Columns["RollerUpAngle13"].CellActivation = Infragistics.Win.UltraWinGrid.Activation.Disabled;
  251. this.ultraGrid4.DisplayLayout.Bands[0].Columns["RollerDownAngle11"].CellActivation = Infragistics.Win.UltraWinGrid.Activation.Disabled;
  252. this.ultraGrid4.DisplayLayout.Bands[0].Columns["RollerDownAngle12"].CellActivation = Infragistics.Win.UltraWinGrid.Activation.Disabled;
  253. this.ultraGrid4.DisplayLayout.Bands[0].Columns["RollerDownAngle13"].CellActivation = Infragistics.Win.UltraWinGrid.Activation.Disabled;
  254. this.ultraGrid4.DisplayLayout.Bands[0].Columns["RollerSpace11"].CellActivation = Infragistics.Win.UltraWinGrid.Activation.Disabled;
  255. this.ultraGrid4.DisplayLayout.Bands[0].Columns["RollerSpace12"].CellActivation = Infragistics.Win.UltraWinGrid.Activation.Disabled;
  256. this.ultraGrid4.DisplayLayout.Bands[0].Columns["RollerSpace13"].CellActivation = Infragistics.Win.UltraWinGrid.Activation.Disabled;
  257. this.ultraGrid4.DisplayLayout.Bands[0].Columns["ScrapNum1"].CellActivation = Infragistics.Win.UltraWinGrid.Activation.Disabled;
  258. this.ultraGrid4.DisplayLayout.Bands[0].Columns["QualifiedNum1"].CellActivation = Infragistics.Win.UltraWinGrid.Activation.Disabled;
  259. }
  260. public void Using1()
  261. {
  262. this.ultraGrid4.DisplayLayout.Bands[0].Columns["RollerUpAngle11"].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  263. this.ultraGrid4.DisplayLayout.Bands[0].Columns["RollerUpAngle12"].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  264. this.ultraGrid4.DisplayLayout.Bands[0].Columns["RollerUpAngle13"].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  265. this.ultraGrid4.DisplayLayout.Bands[0].Columns["RollerDownAngle11"].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  266. this.ultraGrid4.DisplayLayout.Bands[0].Columns["RollerDownAngle12"].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  267. this.ultraGrid4.DisplayLayout.Bands[0].Columns["RollerDownAngle13"].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  268. this.ultraGrid4.DisplayLayout.Bands[0].Columns["RollerSpace11"].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  269. this.ultraGrid4.DisplayLayout.Bands[0].Columns["RollerSpace12"].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  270. this.ultraGrid4.DisplayLayout.Bands[0].Columns["RollerSpace13"].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  271. this.ultraGrid4.DisplayLayout.Bands[0].Columns["ScrapNum1"].CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly;
  272. this.ultraGrid4.DisplayLayout.Bands[0].Columns["QualifiedNum1"].CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly;
  273. }
  274. public void NoUsing2()
  275. {
  276. this.ultraGrid4.DisplayLayout.Bands[0].Columns["RollerUpAngle21"].CellActivation = Infragistics.Win.UltraWinGrid.Activation.Disabled;
  277. this.ultraGrid4.DisplayLayout.Bands[0].Columns["RollerUpAngle22"].CellActivation = Infragistics.Win.UltraWinGrid.Activation.Disabled;
  278. this.ultraGrid4.DisplayLayout.Bands[0].Columns["RollerUpAngle23"].CellActivation = Infragistics.Win.UltraWinGrid.Activation.Disabled;
  279. this.ultraGrid4.DisplayLayout.Bands[0].Columns["RollerDownAngle21"].CellActivation = Infragistics.Win.UltraWinGrid.Activation.Disabled;
  280. this.ultraGrid4.DisplayLayout.Bands[0].Columns["RollerDownAngle22"].CellActivation = Infragistics.Win.UltraWinGrid.Activation.Disabled;
  281. this.ultraGrid4.DisplayLayout.Bands[0].Columns["RollerDownAngle23"].CellActivation = Infragistics.Win.UltraWinGrid.Activation.Disabled;
  282. this.ultraGrid4.DisplayLayout.Bands[0].Columns["RollerSpace21"].CellActivation = Infragistics.Win.UltraWinGrid.Activation.Disabled;
  283. this.ultraGrid4.DisplayLayout.Bands[0].Columns["RollerSpace22"].CellActivation = Infragistics.Win.UltraWinGrid.Activation.Disabled;
  284. this.ultraGrid4.DisplayLayout.Bands[0].Columns["RollerSpace23"].CellActivation = Infragistics.Win.UltraWinGrid.Activation.Disabled;
  285. this.ultraGrid4.DisplayLayout.Bands[0].Columns["ScrapNum2"].CellActivation = Infragistics.Win.UltraWinGrid.Activation.Disabled;
  286. this.ultraGrid4.DisplayLayout.Bands[0].Columns["QualifiedNum2"].CellActivation = Infragistics.Win.UltraWinGrid.Activation.Disabled;
  287. }
  288. public void Using2()
  289. {
  290. this.ultraGrid4.DisplayLayout.Bands[0].Columns["RollerUpAngle21"].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  291. this.ultraGrid4.DisplayLayout.Bands[0].Columns["RollerUpAngle22"].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  292. this.ultraGrid4.DisplayLayout.Bands[0].Columns["RollerUpAngle23"].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  293. this.ultraGrid4.DisplayLayout.Bands[0].Columns["RollerDownAngle21"].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  294. this.ultraGrid4.DisplayLayout.Bands[0].Columns["RollerDownAngle22"].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  295. this.ultraGrid4.DisplayLayout.Bands[0].Columns["RollerDownAngle23"].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  296. this.ultraGrid4.DisplayLayout.Bands[0].Columns["RollerSpace21"].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  297. this.ultraGrid4.DisplayLayout.Bands[0].Columns["RollerSpace22"].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  298. this.ultraGrid4.DisplayLayout.Bands[0].Columns["RollerSpace23"].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  299. this.ultraGrid4.DisplayLayout.Bands[0].Columns["ScrapNum2"].CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly;
  300. this.ultraGrid4.DisplayLayout.Bands[0].Columns["QualifiedNum2"].CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly;
  301. }
  302. private void ultraGrid4_CellDataError(object sender, CellDataErrorEventArgs e)
  303. {
  304. e.RaiseErrorEvent = false;
  305. //e.StayInEditMode = true;
  306. bool result = false;
  307. try
  308. {
  309. DateTime.Parse(this.ultraGrid4.Rows[0].Cells["StartTime"].ToString());
  310. result = true;
  311. }
  312. catch
  313. {
  314. }
  315. if (!result)
  316. {
  317. MessageBox.Show("您输入的开始时间格式不正确,请重新输入。", "提示:", MessageBoxButtons.OK, MessageBoxIcon.Warning);
  318. }
  319. }
  320. }
  321. }