ae83ec1c0c5adc070d26489e783e11911cb648cc.svn-base 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583
  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 System.Collections;
  10. using CoreFS.CA06;
  11. namespace Core.LZMes.Client.UIM
  12. {
  13. public partial class UIM010101 : FrmBase
  14. {
  15. private int selectedIndex1 = -1;
  16. private int selectedIndex2 = -1;
  17. private int selectedIndex3 = -1;
  18. private bool rowClick1 = false;
  19. private bool rowClick2 = false;
  20. private bool rowClick3 = false;
  21. private ArrayList moveList = new ArrayList();
  22. public UIM010101()
  23. {
  24. InitializeComponent();
  25. }
  26. public override void ToolBar_Click(object sender, string ToolbarKey)
  27. {
  28. switch (ToolbarKey)
  29. {
  30. case "Query":
  31. this.DoQuery();
  32. break;
  33. case "Save":
  34. this.DoSave();
  35. break;
  36. case "Exit":
  37. this.Close();
  38. break;
  39. }
  40. }
  41. private void DoQuery()
  42. {
  43. ultraComboEditor1_ValueChanged(null, null);
  44. ultraComboEditor2_ValueChanged(null, null);
  45. ultraComboEditor3_ValueChanged(null, null);
  46. }
  47. private void DoSave()
  48. {
  49. //移垛时间
  50. string moveDate = "";
  51. if (this.ultraDateTimeEditor1.Value != null)
  52. {
  53. moveDate = this.ultraDateTimeEditor1.DateTime.ToString("yyyyMMddHHmmss");
  54. }
  55. string regId = this.UserInfo.GetUserID();
  56. string moveOrder = this.UserInfo.GetUserOrder();//班次
  57. string moverGroup = this.UserInfo.GetUserGroup();//班组
  58. CoreClientParam ccp = new CoreClientParam();
  59. ccp.ServerName = "UIM.UIM010100";
  60. ccp.MethodName = "moveColdCoil";
  61. ccp.ServerParams = new object[] { moveList,regId,moveOrder,moverGroup,moveDate };
  62. ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
  63. this.DoQuery();
  64. }
  65. private void UIM010101_Load(object sender, EventArgs e)
  66. {
  67. loadYardArea();
  68. }
  69. private void loadYardArea()
  70. {
  71. int areaType = 1;
  72. //查询区域信息
  73. CoreClientParam ccp = new CoreClientParam();
  74. ccp.ServerName = "UIM.UIM010040";
  75. ccp.MethodName = "queryYardAreas";
  76. ccp.ServerParams = new object[] { areaType };
  77. ccp = this.ExecuteQuery(ccp, CoreInvokeType.Internal);
  78. ArrayList list = (ArrayList)ccp.ReturnObject;
  79. int listSize = list.Count;
  80. Infragistics.Win.ValueListItem[] valueListItems1 = new Infragistics.Win.ValueListItem[listSize];
  81. Infragistics.Win.ValueListItem[] valueListItems2 = new Infragistics.Win.ValueListItem[listSize];
  82. Infragistics.Win.ValueListItem[] valueListItems3 = new Infragistics.Win.ValueListItem[listSize];
  83. for (int i = 0; i < listSize; i++)
  84. {
  85. Infragistics.Win.ValueListItem item1 = new Infragistics.Win.ValueListItem();
  86. Infragistics.Win.ValueListItem item2 = new Infragistics.Win.ValueListItem();
  87. Infragistics.Win.ValueListItem item3 = new Infragistics.Win.ValueListItem();
  88. Hashtable ht = (Hashtable)list[i];
  89. item1.DataValue = ((Hashtable)(ht["AREA_NO"]))["value"].ToString();
  90. item1.DisplayText = ht["AREA_NAME"].ToString();
  91. item2.DataValue = ((Hashtable)(ht["AREA_NO"]))["value"].ToString();
  92. item2.DisplayText = ht["AREA_NAME"].ToString();
  93. item3.DataValue = ((Hashtable)(ht["AREA_NO"]))["value"].ToString();
  94. item3.DisplayText = ht["AREA_NAME"].ToString();
  95. valueListItems1[i] = item1;
  96. valueListItems2[i] = item2;
  97. valueListItems3[i] = item3;
  98. }
  99. this.ultraComboEditor1.Items.AddRange(valueListItems1);
  100. this.ultraComboEditor2.Items.AddRange(valueListItems2);
  101. this.ultraComboEditor3.Items.AddRange(valueListItems3);
  102. }
  103. /// <summary>
  104. /// 根据钢卷号查询垛位
  105. /// </summary>
  106. private void findLoadLoc()
  107. {
  108. string coilNo = this.textBox1.Text.Trim();
  109. if ("".Equals(coilNo))
  110. {
  111. MessageBox.Show("请输入钢卷号!");
  112. return;
  113. }
  114. CoreClientParam ccp = new CoreClientParam();
  115. ccp.ServerName = "UIM.UIM010100";
  116. ccp.MethodName = "queryLoadLoc";
  117. ccp.ServerParams = new object[] { coilNo };
  118. ccp = this.ExecuteQuery(ccp,CoreInvokeType.Internal);
  119. String curLoadLoc = ccp.ReturnObject.ToString();
  120. this.textBox2.Text = curLoadLoc;
  121. }
  122. private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
  123. {
  124. if (13 == e.KeyChar)
  125. {
  126. findLoadLoc();
  127. }
  128. }
  129. private void button1_Click(object sender, EventArgs e)
  130. {
  131. findLoadLoc();
  132. }
  133. private void ultraComboEditor1_ValueChanged(object sender, EventArgs e)
  134. {
  135. moveList = new ArrayList();
  136. if (ultraComboEditor1.Value != null)
  137. {
  138. dataSet1.Tables[0].Clear();
  139. CoreClientParam ccp = new CoreClientParam();
  140. ccp.ServerName = "UIM.UIM010100";
  141. ccp.MethodName = "queryYardCoilsSx";
  142. ccp.ServerParams = new object[] { ultraComboEditor1.Value.ToString() };
  143. ccp.SourceDataTable = dataSet1.Tables[0];
  144. this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
  145. }
  146. if (sender == null)
  147. {
  148. return;
  149. }
  150. ultraComboEditor2_ValueChanged(null, null);
  151. ultraComboEditor3_ValueChanged(null, null);
  152. }
  153. private void ultraComboEditor2_ValueChanged(object sender, EventArgs e)
  154. {
  155. if (ultraComboEditor2.Value != null)
  156. {
  157. dataSet2.Tables[0].Clear();
  158. CoreClientParam ccp = new CoreClientParam();
  159. ccp.ServerName = "UIM.UIM010100";
  160. ccp.MethodName = "queryYardCoilsSx";
  161. ccp.ServerParams = new object[] { ultraComboEditor2.Value.ToString() };
  162. ccp.SourceDataTable = dataSet2.Tables[0];
  163. this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
  164. }
  165. if (sender == null)
  166. {
  167. return;
  168. }
  169. ultraComboEditor1_ValueChanged(null, null);
  170. ultraComboEditor3_ValueChanged(null, null);
  171. }
  172. private void ultraComboEditor3_ValueChanged(object sender, EventArgs e)
  173. {
  174. if (ultraComboEditor3.Value != null)
  175. {
  176. dataSet3.Tables[0].Clear();
  177. CoreClientParam ccp = new CoreClientParam();
  178. ccp.ServerName = "UIM.UIM010100";
  179. ccp.MethodName = "queryYardCoilsSx";
  180. ccp.ServerParams = new object[] { ultraComboEditor3.Value.ToString() };
  181. ccp.SourceDataTable = dataSet3.Tables[0];
  182. this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
  183. }
  184. if (sender == null)
  185. {
  186. return;
  187. }
  188. ultraComboEditor1_ValueChanged(null, null);
  189. ultraComboEditor2_ValueChanged(null, null);
  190. }
  191. private void ultraGrid1_AfterRowActivate(object sender, EventArgs e)
  192. {
  193. if (e == null)
  194. {
  195. rowClick1 = true;
  196. }
  197. if (rowClick1 && e != null)
  198. {
  199. rowClick1 = false;
  200. return;
  201. }
  202. if (ultraGrid1.ActiveRow != null)
  203. {
  204. if (selectedIndex1 > -1 && ultraGrid1.ActiveRow.Index != selectedIndex1)
  205. {
  206. ultraGrid1.Rows[selectedIndex1].Cells["CHK"].Value = "FALSE";
  207. }
  208. ultraGrid1.Rows[ultraGrid1.ActiveRow.Index].Cells["CHK"].Value = ultraGrid1.Rows[ultraGrid1.ActiveRow.Index].Cells["CHK"].Value.ToString().Equals("TRUE") ? "FALSE" : "TRUE";
  209. selectedIndex1 = ultraGrid1.ActiveRow.Index;
  210. }
  211. }
  212. private void ultraGrid2_AfterRowActivate(object sender, EventArgs e)
  213. {
  214. if (e == null)
  215. {
  216. rowClick2 = true;
  217. }
  218. if (rowClick2 && e != null)
  219. {
  220. rowClick2 = false;
  221. return;
  222. }
  223. if (ultraGrid2.ActiveRow != null)
  224. {
  225. if (selectedIndex2 > -1 && ultraGrid2.ActiveRow.Index != selectedIndex2)
  226. {
  227. ultraGrid2.Rows[selectedIndex2].Cells["CHK"].Value = "FALSE";
  228. }
  229. ultraGrid2.Rows[ultraGrid2.ActiveRow.Index].Cells["CHK"].Value = ultraGrid2.Rows[ultraGrid2.ActiveRow.Index].Cells["CHK"].Value.ToString().Equals("TRUE") ? "FALSE" : "TRUE";
  230. selectedIndex2 = ultraGrid2.ActiveRow.Index;
  231. }
  232. }
  233. private void ultraGrid3_AfterRowActivate(object sender, EventArgs e)
  234. {
  235. if (e == null)
  236. {
  237. rowClick3 = true;
  238. }
  239. if (rowClick3 && e != null)
  240. {
  241. rowClick3 = false;
  242. return;
  243. }
  244. if (ultraGrid3.ActiveRow != null)
  245. {
  246. if (selectedIndex3 > -1 && ultraGrid3.ActiveRow.Index != selectedIndex3)
  247. {
  248. ultraGrid3.Rows[selectedIndex3].Cells["CHK"].Value = "FALSE";
  249. }
  250. ultraGrid3.Rows[ultraGrid3.ActiveRow.Index].Cells["CHK"].Value = ultraGrid3.Rows[ultraGrid3.ActiveRow.Index].Cells["CHK"].Value.ToString().Equals("TRUE") ? "FALSE" : "TRUE";
  251. selectedIndex3 = ultraGrid3.ActiveRow.Index;
  252. }
  253. }
  254. private void ultraGrid1_MouseClick(object sender, MouseEventArgs e)
  255. {
  256. ultraGrid1_AfterRowActivate(null, null);
  257. }
  258. private void ultraGrid2_MouseClick(object sender, MouseEventArgs e)
  259. {
  260. ultraGrid2_AfterRowActivate(null, null);
  261. }
  262. private void ultraGrid3_MouseClick(object sender, MouseEventArgs e)
  263. {
  264. ultraGrid3_AfterRowActivate(null, null);
  265. }
  266. private void pictureBox1_MouseEnter(object sender, EventArgs e)
  267. {
  268. this.toolTip1.Show("从原堆放位置->临时堆放位置", this.pictureBox1);
  269. }
  270. private void pictureBox2_MouseEnter(object sender, EventArgs e)
  271. {
  272. this.toolTip1.Show("从到堆放位置->原堆放位置或从临时堆放位置->原堆放位置", this.pictureBox2);
  273. }
  274. private void pictureBox3_MouseEnter(object sender, EventArgs e)
  275. {
  276. this.toolTip1.Show("从原堆放位置->到堆放位置或从临时堆放位置->到堆放位置", this.pictureBox3);
  277. }
  278. private void pictureBox4_MouseEnter(object sender, EventArgs e)
  279. {
  280. this.toolTip1.Show("从到堆放位置->临时堆放位置", this.pictureBox4);
  281. }
  282. /// <summary>
  283. /// 从原堆放位置->临时堆放位置
  284. /// </summary>
  285. /// <param name="sender"></param>
  286. /// <param name="e"></param>
  287. private void pictureBox1_Click(object sender, EventArgs e)
  288. {
  289. string[] mCoil = null;
  290. int fromRowCount = dataSet1.Tables[0].Rows.Count;
  291. for (int i = 0; i < fromRowCount; i++)
  292. {
  293. Infragistics.Win.UltraWinGrid.UltraGridRow fromUGR = ultraGrid1.Rows[i];
  294. if (fromUGR.Cells["CHK"].Value.ToString().ToUpper().Equals("TRUE"))
  295. {
  296. if (fromUGR.Cells["COIL_NO"].Value == null || fromUGR.Cells["COIL_NO"].Value.ToString().Equals(""))
  297. {
  298. MessageBox.Show("原堆放位置上没有钢卷,请重新选择!");
  299. return;
  300. }
  301. int tmpRowCount = dataSet2.Tables[0].Rows.Count;
  302. for (int j = 0; j < tmpRowCount; j++)
  303. {
  304. Infragistics.Win.UltraWinGrid.UltraGridRow tmpUGR = ultraGrid2.Rows[j];
  305. if (tmpUGR.Cells["CHK"].Value.ToString().ToUpper().Equals("TRUE"))
  306. {
  307. if (tmpUGR.Cells["COIL_NO"].Value != null && !tmpUGR.Cells["COIL_NO"].Value.ToString().Equals(""))
  308. {
  309. MessageBox.Show("临时堆放位置上存在钢卷,请重新选择!");
  310. return;
  311. }
  312. mCoil = new string[3];
  313. mCoil[0] = fromUGR.Cells["CUR_LOAD_LOC"].Value.ToString();
  314. mCoil[2] = fromUGR.Cells["COIL_NO"].Value.ToString();
  315. mCoil[1] = tmpUGR.Cells["CUR_LOAD_LOC"].Value.ToString();
  316. moveList.Add(mCoil);
  317. fromUGR.Cells["COIL_NO"].Value = "";
  318. tmpUGR.Cells["COIL_NO"].Value = mCoil[2];
  319. break;
  320. }
  321. }
  322. break;
  323. }
  324. }
  325. }
  326. /// <summary>
  327. /// 从到堆放位置->临时堆放位置
  328. /// </summary>
  329. /// <param name="sender"></param>
  330. /// <param name="e"></param>
  331. private void pictureBox4_Click(object sender, EventArgs e)
  332. {
  333. string[] mCoil = null;
  334. int toRowCount = dataSet3.Tables[0].Rows.Count;
  335. for (int i = 0; i < toRowCount; i++)
  336. {
  337. Infragistics.Win.UltraWinGrid.UltraGridRow toUGR = ultraGrid3.Rows[i];
  338. if (toUGR.Cells["CHK"].Value.ToString().ToUpper().Equals("TRUE"))
  339. {
  340. if (toUGR.Cells["COIL_NO"].Value == null || toUGR.Cells["COIL_NO"].Value.ToString().Equals(""))
  341. {
  342. MessageBox.Show("到堆放位置上没有钢卷,请重新选择!");
  343. return;
  344. }
  345. int tmpRowCount = dataSet2.Tables[0].Rows.Count;
  346. for (int j = 0; j < tmpRowCount; j++)
  347. {
  348. Infragistics.Win.UltraWinGrid.UltraGridRow tmpUGR = ultraGrid2.Rows[j];
  349. if (tmpUGR.Cells["CHK"].Value.ToString().ToUpper().Equals("TRUE"))
  350. {
  351. if (tmpUGR.Cells["COIL_NO"].Value != null && !tmpUGR.Cells["COIL_NO"].Value.ToString().Equals(""))
  352. {
  353. MessageBox.Show("临时堆放位置上存在钢卷,请重新选择!");
  354. return;
  355. }
  356. mCoil = new string[3];
  357. mCoil[0] = toUGR.Cells["CUR_LOAD_LOC"].Value.ToString();
  358. mCoil[2] = toUGR.Cells["COIL_NO"].Value.ToString();
  359. mCoil[1] = tmpUGR.Cells["CUR_LOAD_LOC"].Value.ToString();
  360. moveList.Add(mCoil);
  361. toUGR.Cells["COIL_NO"].Value = "";
  362. tmpUGR.Cells["COIL_NO"].Value = mCoil[2] ;
  363. break;
  364. }
  365. }
  366. break;
  367. }
  368. }
  369. }
  370. /// <summary>
  371. /// 从原堆放位置->到堆放位置或从临时堆放位置->到堆放位置
  372. /// </summary>
  373. /// <param name="sender"></param>
  374. /// <param name="e"></param>
  375. private void pictureBox3_Click(object sender, EventArgs e)
  376. {
  377. string[] mCoil = new string[3];
  378. int fromRowCount = dataSet1.Tables[0].Rows.Count;
  379. Infragistics.Win.UltraWinGrid.UltraGridRow fromUGR = null;
  380. for (int i = 0; i < fromRowCount; i++)
  381. {
  382. fromUGR = ultraGrid1.Rows[i];
  383. if (fromUGR.Cells["CHK"].Value.ToString().ToUpper().Equals("TRUE"))
  384. {
  385. if (fromUGR.Cells["CUR_LOAD_LOC"].Value != null && !fromUGR.Cells["CUR_LOAD_LOC"].Value.ToString().Equals(""))
  386. {
  387. mCoil[0] = fromUGR.Cells["CUR_LOAD_LOC"].Value.ToString();
  388. mCoil[2] = fromUGR.Cells["COIL_NO"].Value.ToString();
  389. }
  390. break;
  391. }
  392. }
  393. int tmpRowCount = dataSet2.Tables[0].Rows.Count;
  394. Infragistics.Win.UltraWinGrid.UltraGridRow tmpUGR = null;
  395. for (int i = 0; i < tmpRowCount; i++)
  396. {
  397. tmpUGR = ultraGrid2.Rows[i];
  398. if (tmpUGR.Cells["CHK"].Value.ToString().ToUpper().Equals("TRUE"))
  399. {
  400. if (tmpUGR.Cells["CUR_LOAD_LOC"].Value != null && !tmpUGR.Cells["CUR_LOAD_LOC"].Value.ToString().Equals(""))
  401. {
  402. if (mCoil[0] != null && !mCoil[0].Equals(""))
  403. {
  404. MessageBox.Show("原堆放位置和临时堆放位置不能同时选中,请确认后再重新选择!");
  405. return;
  406. }
  407. mCoil[0] = tmpUGR.Cells["CUR_LOAD_LOC"].Value.ToString();
  408. mCoil[2] = tmpUGR.Cells["COIL_NO"].Value.ToString();
  409. }
  410. break;
  411. }
  412. }
  413. int toRowCount = dataSet3.Tables[0].Rows.Count;
  414. Infragistics.Win.UltraWinGrid.UltraGridRow toUGR = null;
  415. for (int i = 0; i < toRowCount; i++)
  416. {
  417. toUGR = ultraGrid3.Rows[i];
  418. if (toUGR.Cells["CHK"].Value.ToString().ToUpper().Equals("TRUE"))
  419. {
  420. if (toUGR.Cells["COIL_NO"].Value != null && !toUGR.Cells["COIL_NO"].Value.ToString().Equals(""))
  421. {
  422. MessageBox.Show("到堆放位置上存在钢卷,请确认后再重新选择!");
  423. return;
  424. }
  425. mCoil[1] = toUGR.Cells["CUR_LOAD_LOC"].Value.ToString();
  426. break;
  427. }
  428. }
  429. if (mCoil[1] == null || mCoil[1].Equals(""))
  430. {
  431. MessageBox.Show("原堆放位置或临时堆放位置没有选中的钢卷,请确认后再重新选择!");
  432. return;
  433. }
  434. if (mCoil[2] == null || mCoil[2].Equals(""))
  435. {
  436. MessageBox.Show("没有选择到堆放位置,请确认后再重新选择!");
  437. return;
  438. }
  439. moveList.Add(mCoil);
  440. if (fromUGR != null && fromUGR.Cells["COIL_NO"].Value != null && !fromUGR.Cells["COIL_NO"].Value.ToString().Equals(""))
  441. {
  442. fromUGR.Cells["COIL_NO"].Value = "";
  443. }
  444. else
  445. {
  446. tmpUGR.Cells["COIL_NO"].Value = "";
  447. }
  448. toUGR.Cells["COIL_NO"].Value = mCoil[2];
  449. }
  450. /// <summary>
  451. /// 从到堆放位置->原堆放位置或从临时堆放位置->原堆放位置
  452. /// </summary>
  453. /// <param name="sender"></param>
  454. /// <param name="e"></param>
  455. private void pictureBox2_Click(object sender, EventArgs e)
  456. {
  457. string[] mCoil = new string[3];
  458. int toRowCount = dataSet3.Tables[0].Rows.Count;
  459. Infragistics.Win.UltraWinGrid.UltraGridRow toUGR = null;
  460. for (int i = 0; i < toRowCount; i++)
  461. {
  462. toUGR = ultraGrid3.Rows[i];
  463. if (toUGR.Cells["CHK"].Value.ToString().ToUpper().Equals("TRUE"))
  464. {
  465. if (toUGR.Cells["CUR_LOAD_LOC"].Value != null && !toUGR.Cells["CUR_LOAD_LOC"].Value.ToString().Equals(""))
  466. {
  467. mCoil[0] = toUGR.Cells["CUR_LOAD_LOC"].Value.ToString();
  468. mCoil[2] = toUGR.Cells["COIL_NO"].Value.ToString();
  469. }
  470. break;
  471. }
  472. }
  473. int tmpRowCount = dataSet2.Tables[0].Rows.Count;
  474. Infragistics.Win.UltraWinGrid.UltraGridRow tmpUGR = null;
  475. for (int i = 0; i < tmpRowCount; i++)
  476. {
  477. tmpUGR = ultraGrid2.Rows[i];
  478. if (tmpUGR.Cells["CHK"].Value.ToString().ToUpper().Equals("TRUE"))
  479. {
  480. if (tmpUGR.Cells["CUR_LOAD_LOC"].Value != null && !tmpUGR.Cells["CUR_LOAD_LOC"].Value.ToString().Equals(""))
  481. {
  482. if (mCoil[0] != null && !mCoil[0].Equals(""))
  483. {
  484. MessageBox.Show("到堆放位置和临时堆放位置不能同时选中,请确认后再重新选择!");
  485. return;
  486. }
  487. mCoil[0] = tmpUGR.Cells["CUR_LOAD_LOC"].Value.ToString();
  488. mCoil[2] = tmpUGR.Cells["COIL_NO"].Value.ToString();
  489. }
  490. break;
  491. }
  492. }
  493. int fromRowCount = dataSet1.Tables[0].Rows.Count;
  494. Infragistics.Win.UltraWinGrid.UltraGridRow fromUGR = null;
  495. for (int i = 0; i < fromRowCount; i++)
  496. {
  497. fromUGR = ultraGrid1.Rows[i];
  498. if (fromUGR.Cells["CHK"].Value.ToString().ToUpper().Equals("TRUE"))
  499. {
  500. if (fromUGR.Cells["COIL_NO"].Value != null && !fromUGR.Cells["COIL_NO"].Value.ToString().Equals(""))
  501. {
  502. MessageBox.Show("原堆放位置上存在钢卷,请确认后再重新选择!");
  503. return;
  504. }
  505. mCoil[1] = fromUGR.Cells["CUR_LOAD_LOC"].Value.ToString();
  506. break;
  507. }
  508. }
  509. if (mCoil[2] == null || mCoil[2].Equals(""))
  510. {
  511. MessageBox.Show("到堆放位置或临时堆放位置没有选中的钢卷,请确认后再重新选择!");
  512. return;
  513. }
  514. if (mCoil[1] == null || mCoil[1].Equals(""))
  515. {
  516. MessageBox.Show("没有选择原堆放位置,请确认后再重新选择!");
  517. return;
  518. }
  519. moveList.Add(mCoil);
  520. if (toUGR != null && toUGR.Cells["COIL_NO"].Value != null && !toUGR.Cells["COIL_NO"].Value.ToString().Equals(""))
  521. {
  522. toUGR.Cells["COIL_NO"].Value = "";
  523. }
  524. else
  525. {
  526. tmpUGR.Cells["COIL_NO"].Value = "";
  527. }
  528. fromUGR.Cells["COIL_NO"].Value = mCoil[2];
  529. }
  530. }
  531. }