YdmBsSling.cs 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660
  1. using Core.Mes.Client.Comm.Format;
  2. using Core.Mes.Client.Comm.Server;
  3. using Core.Mes.Client.Comm.Tool;
  4. using Core.StlMes.Client.YdmBase;
  5. using Core.StlMes.Client.YdmBcPipeManage.Entity;
  6. using CoreFS.CA06;
  7. using Infragistics.Win.UltraWinEditors;
  8. using Infragistics.Win.UltraWinGrid;
  9. using System;
  10. using System.Collections;
  11. using System.Collections.Generic;
  12. using System.ComponentModel;
  13. using System.Data;
  14. using System.Drawing;
  15. using System.Linq;
  16. using System.Text;
  17. using System.Windows.Forms;
  18. namespace Core.StlMes.Client.YdmBcPipeManage.吊带
  19. {
  20. public partial class YdmBsSling : FrmBase
  21. {
  22. private string[] storageArr = null;
  23. public YdmBsSling()
  24. {
  25. InitializeComponent();
  26. EntityHelper.ShowGridCaption<YdmBsStorageEntity>(ultraGrid1.DisplayLayout.Bands[0]);
  27. EntityHelper.ShowGridCaption<YdmBsLocationEntity>(ultraGrid2.DisplayLayout.Bands[0]);
  28. EntityHelper.ShowGridCaption<YdmBsSlingEntity>(ultraGrid3.DisplayLayout.Bands[0]);
  29. EntityHelper.ShowGridCaption<YdmBsSlingEntity>(ultraGrid4.DisplayLayout.Bands[0]);
  30. EntityHelper.ShowGridCaption<YdmBsSlingEntity>(ultraGrid5.DisplayLayout.Bands[0]);
  31. }
  32. public override void ToolBar_Click(object sender, string ToolbarKey)
  33. {
  34. switch (ToolbarKey)
  35. {
  36. case "Query":
  37. doQuery();
  38. break;
  39. case "Add":
  40. //DoAdd();
  41. break;
  42. case "Update":
  43. DoUpdate();
  44. break;
  45. case "Delete":
  46. OutKu();
  47. break;
  48. case "Refresh":
  49. InsertKu();
  50. break;
  51. case "Remove":
  52. remove();
  53. break;
  54. case "RemoveIn":
  55. removeIn();
  56. break;
  57. case "Close":
  58. this.Close();
  59. break;
  60. }
  61. }
  62. private void remove()
  63. {
  64. this.ultraGrid4.UpdateData();
  65. YdmBsLocationEntity ydmBsLocation = null;
  66. foreach (UltraGridRow row in ultraGrid4.Rows)
  67. {
  68. if (row.Cells["CHK"].Value != null)
  69. {
  70. if (row.Cells["CHK"].Value.ToString().ToUpper() == "TRUE")
  71. {
  72. string LocationNo = row.Cells["LocationNo"].Value.ToString();
  73. List<YdmBsLocationEntity> location = EntityHelper.GetData<YdmBsLocationEntity>(
  74. "com.steering.pss.ydm.Stuffmanage.YdmBsSlingServer.doQueryLocationNo", new object[] { LocationNo }, this.ob);
  75. ydmBsLocation = location[0];
  76. decimal sling = decimal.Parse(row.Cells["Sling"].Value.ToString());
  77. var template = new YdmBsLocationEntity
  78. {
  79. LocationNo = LocationNo,
  80. Sling = sling+ydmBsLocation.Sling
  81. };
  82. var ccp1 = new CoreClientParam();
  83. ccp1.ServerName = "com.steering.pss.ydm.Stuffmanage.YdmBsSlingServer";
  84. ccp1.MethodName = "doUpdateSling";
  85. ccp1.ServerParams = new object[]
  86. {
  87. JSONFormat.Format(template)
  88. };
  89. ccp1 = ExecuteNonQuery(ccp1, CoreInvokeType.Internal);
  90. if (ccp1.ReturnCode == -1)
  91. {
  92. MessageUtil.ShowTips("撤销失败");
  93. return;
  94. }
  95. string resultNo = row.Cells["ResultNo"].Value.ToString();
  96. var ccp = new CoreClientParam();
  97. ccp.ServerName = "com.steering.pss.ydm.Stuffmanage.YdmBsSlingServer";
  98. ccp.MethodName = "DeleteInsert";
  99. ccp.ServerParams = new object[]
  100. {
  101. resultNo
  102. };
  103. ccp = ExecuteNonQuery(ccp, CoreInvokeType.Internal);
  104. if (ccp.ReturnCode == -1)
  105. {
  106. MessageUtil.ShowTips("撤销失败");
  107. return;
  108. }
  109. }
  110. }
  111. }
  112. MessageUtil.ShowTips("撤销成功");
  113. queryAll();
  114. }
  115. private void removeIn()
  116. {
  117. this.ultraGrid5.UpdateData();
  118. YdmBsSlingEntity st1 = this.ultraGrid5.ActiveRow.ListObject as YdmBsSlingEntity;
  119. string SlingNo = st1.SlingNo;
  120. YdmBsSlingEntity ydm = null;
  121. YdmBsLocationEntity YdmLocation = null;
  122. if (st1.Type == "3")
  123. {
  124. List<YdmBsSlingEntity> SlingLocation = EntityHelper.GetData<YdmBsSlingEntity>(
  125. "com.steering.pss.ydm.Stuffmanage.YdmBsSlingServer.QueryBySlingNo", new object[] { SlingNo }, this.ob);
  126. for (int i = 0; i <= SlingLocation.Count-1; i++)
  127. {
  128. ydm = SlingLocation[i];
  129. if (ydm.Type =="3")
  130. {
  131. List<YdmBsLocationEntity> location = EntityHelper.GetData<YdmBsLocationEntity>(
  132. "com.steering.pss.ydm.Stuffmanage.YdmBsSlingServer.doQueryLocationNo", new object[] { ydm.LocationNo }, this.ob);
  133. YdmLocation = location[0];
  134. var template = new YdmBsLocationEntity
  135. {
  136. LocationNo = ydm.LocationNo,
  137. Sling = YdmLocation.Sling - ydm.Sling
  138. };
  139. var ccp1 = new CoreClientParam();
  140. ccp1.ServerName = "com.steering.pss.ydm.Stuffmanage.YdmBsSlingServer";
  141. ccp1.MethodName = "doUpdateSling";
  142. ccp1.ServerParams = new object[]
  143. {
  144. JSONFormat.Format(template)
  145. };
  146. ccp1 = ExecuteNonQuery(ccp1, CoreInvokeType.Internal);
  147. if (ccp1.ReturnCode == -1)
  148. {
  149. MessageUtil.ShowTips("撤销失败");
  150. return;
  151. }
  152. var ccp = new CoreClientParam();
  153. ccp.ServerName = "com.steering.pss.ydm.Stuffmanage.YdmBsSlingServer";
  154. ccp.MethodName = "DeleteInsert";
  155. ccp.ServerParams = new object[]
  156. {
  157. ydm.ResultNo
  158. };
  159. ccp = ExecuteNonQuery(ccp, CoreInvokeType.Internal);
  160. if (ccp.ReturnCode == -1)
  161. {
  162. MessageUtil.ShowTips("撤销失败");
  163. return;
  164. }
  165. }
  166. else
  167. {
  168. var ccp2 = new CoreClientParam();
  169. ccp2.ServerName = "com.steering.pss.ydm.Stuffmanage.YdmBsSlingServer";
  170. ccp2.MethodName = "doUpdateFlag";
  171. ccp2.ServerParams = new object[]
  172. {
  173. ydm.SlingNo
  174. };
  175. ccp2 = ExecuteNonQuery(ccp2, CoreInvokeType.Internal);
  176. if (ccp2.ReturnCode == -1)
  177. {
  178. MessageUtil.ShowTips("撤销失败");
  179. return;
  180. }
  181. }
  182. }
  183. MessageUtil.ShowTips("撤销成功");
  184. queryAll();
  185. return;
  186. }
  187. else
  188. {
  189. MessageUtil.ShowTips("不是入库记录无法撤销!");
  190. return;
  191. }
  192. }
  193. private void doQuery()
  194. {
  195. string managementName = "";
  196. if (ultrlSection.Checked)
  197. {
  198. if (cbm_Dw.Text == "")
  199. {
  200. MessageBox.Show("请选择作业科室!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
  201. return;
  202. }
  203. else
  204. {
  205. managementName = this.cbm_Dw.Value.ToString().Trim();
  206. }
  207. }
  208. List<YdmBsStorageEntity> listSource = EntityHelper.GetData<YdmBsStorageEntity>(
  209. "com.steering.pss.ydm.Stuffmanage.YdmBsSlingServer.doQuery", new object[] { managementName }, this.ob);
  210. ydmBsStorageEntityBindingSource.DataSource = listSource;
  211. }
  212. private void OutKu()
  213. {
  214. YdmBsStorageEntity sto = this.ultraGrid1.ActiveRow.ListObject as YdmBsStorageEntity;
  215. this.ultraGrid2.UpdateData();
  216. string tagStorageNo = "";
  217. string tagStorageName = "";
  218. YdmBsLocationEntity ydmBsLocation = null;
  219. decimal slingNew = 0;
  220. string slingno = "";
  221. if (this.ultraComboEditor2.Text == "")
  222. {
  223. MessageUtil.ShowTips("请选择目标仓库!");
  224. return;
  225. }
  226. else
  227. {
  228. tagStorageNo = this.ultraComboEditor2.Value.ToString2();
  229. tagStorageName = this.ultraComboEditor2.Text.ToString2();
  230. }
  231. var list = new List<string>();
  232. foreach (UltraGridRow row in ultraGrid2.Rows)
  233. {
  234. if (row.Cells["CHK"].Value != null)
  235. {
  236. if (row.Cells["CHK"].Value.ToString().ToUpper() == "TRUE")
  237. {
  238. string LocationNo= row.Cells["LocationNo"].Value.ToString();
  239. List<YdmBsLocationEntity> location = EntityHelper.GetData<YdmBsLocationEntity>(
  240. "com.steering.pss.ydm.Stuffmanage.YdmBsSlingServer.doQueryLocationNo", new object[] { LocationNo }, this.ob);
  241. List<YdmBsSlingEntity> listSource = EntityHelper.GetData<YdmBsSlingEntity>(
  242. "com.steering.pss.ydm.Stuffmanage.YdmBsSlingServer.getSlingNo", new object[] { }, this.ob);
  243. slingno = listSource[0].SlingNo.ToString();
  244. ydmBsLocation = location[0];
  245. slingNew = decimal.Parse(row.Cells["Sling"].Value.ToString());
  246. if (ydmBsLocation.Sling != null)
  247. {
  248. if (ydmBsLocation.Sling == 0)
  249. {
  250. MessageUtil.ShowTips("数量为0不能出库");
  251. return;
  252. }
  253. if (ydmBsLocation.Sling.Value - slingNew < 0)
  254. {
  255. MessageUtil.ShowTips("出库数量为负数不能出库");
  256. return;
  257. }
  258. var template = new YdmBsSlingEntity
  259. {
  260. ResultNo = Guid.NewGuid().ToString(),
  261. SlingOld=ydmBsLocation.Sling.Value,
  262. SlingNew=ydmBsLocation.Sling.Value-slingNew,
  263. Sling = slingNew,
  264. LocationNo=ydmBsLocation.LocationNo,
  265. LocationName=ydmBsLocation.LocationName,
  266. CreateName=this.UserInfo.GetUserName(),
  267. StorageNo = sto.StorageNo,
  268. StorageName = sto.StorageName,
  269. TarStorageNo = tagStorageNo,
  270. TarStorageName = tagStorageName,
  271. SlingNo=slingno
  272. };
  273. list.Add(JSONFormat.Format(template));
  274. }
  275. else
  276. {
  277. MessageUtil.ShowTips("没有数量不能出库");
  278. return;
  279. }
  280. }
  281. }
  282. }
  283. var ccp = new CoreClientParam();
  284. ccp.ServerName = "com.steering.pss.ydm.Stuffmanage.YdmBsSlingServer";
  285. ccp.MethodName = "addSlingOut";
  286. ccp.ServerParams = new object[]
  287. {
  288. list
  289. };
  290. ccp = ExecuteNonQuery(ccp, CoreInvokeType.Internal);
  291. if (ccp.ReturnCode == -1)
  292. {
  293. MessageUtil.ShowTips("出库失败");
  294. return;
  295. }
  296. var tem = new YdmBsLocationEntity
  297. {
  298. LocationNo = ydmBsLocation.LocationNo,
  299. Sling = ydmBsLocation.Sling.Value - slingNew
  300. };
  301. var ccp2 = new CoreClientParam();
  302. ccp2.ServerName = "com.steering.pss.ydm.Stuffmanage.YdmBsSlingServer";
  303. ccp2.MethodName = "doUpdateSling";
  304. ccp2.ServerParams = new object[]
  305. {
  306. JSONFormat.Format(tem)
  307. };
  308. ccp2 = ExecuteNonQuery(ccp2, CoreInvokeType.Internal);
  309. if (ccp2.ReturnCode == -1)
  310. {
  311. MessageUtil.ShowTips("出库失败");
  312. return;
  313. }else {
  314. MessageUtil.ShowTips("出库成功");
  315. }
  316. queryAll();
  317. }
  318. private void InsertKu()
  319. {
  320. YdmBsStorageEntity sto = this.ultraGrid1.ActiveRow.ListObject as YdmBsStorageEntity;
  321. this.ultraGrid2.UpdateData();
  322. this.ultraGrid5.UpdateData();
  323. YdmBsSlingEntity st1 = this.ultraGrid5.ActiveRow.ListObject as YdmBsSlingEntity;
  324. YdmBsLocationEntity ydmBsLocation = null;
  325. decimal slingNew = 0;
  326. decimal sling = 0;
  327. var list = new List<string>();
  328. if (st1.Type != "3")
  329. {
  330. if (st1.Flag != null)
  331. {
  332. foreach (UltraGridRow row in ultraGrid2.Rows)
  333. {
  334. if (row.Cells["CHK"].Value != null)
  335. {
  336. if (row.Cells["CHK"].Value.ToString().ToUpper() == "TRUE")
  337. {
  338. string LocationNo = row.Cells["LocationNo"].Value.ToString();
  339. List<YdmBsLocationEntity> location = EntityHelper.GetData<YdmBsLocationEntity>(
  340. "com.steering.pss.ydm.Stuffmanage.YdmBsSlingServer.doQueryLocationNo", new object[] { LocationNo }, this.ob);
  341. ydmBsLocation = location[0];
  342. if (ydmBsLocation.Sling == null)
  343. {
  344. ydmBsLocation.Sling = 0;
  345. }
  346. slingNew = decimal.Parse(row.Cells["Sling"].Value.ToString());
  347. if (ydmBsLocation.Sling != null)
  348. {
  349. var template = new YdmBsSlingEntity
  350. {
  351. ResultNo = Guid.NewGuid().ToString(),
  352. SlingOld = ydmBsLocation.Sling.Value,
  353. SlingNew = ydmBsLocation.Sling.Value + slingNew,
  354. Sling = slingNew,
  355. LocationNo = ydmBsLocation.LocationNo,
  356. LocationName = ydmBsLocation.LocationName,
  357. CreateName = this.UserInfo.GetUserName(),
  358. StorageNo = sto.StorageNo,
  359. StorageName = sto.StorageName,
  360. SlingNo = st1.SlingNo
  361. };
  362. sling = st1.Sling.Value;
  363. if (sling - slingNew >= 0)
  364. {
  365. st1.Sling = sling - slingNew;
  366. list.Add(JSONFormat.Format(template));
  367. }
  368. else
  369. {
  370. MessageUtil.ShowTips("请重新分配吊带!");
  371. return;
  372. }
  373. var tem = new YdmBsLocationEntity
  374. {
  375. LocationNo = ydmBsLocation.LocationNo,
  376. Sling = ydmBsLocation.Sling.Value + slingNew
  377. };
  378. var ccp2 = new CoreClientParam();
  379. ccp2.ServerName = "com.steering.pss.ydm.Stuffmanage.YdmBsSlingServer";
  380. ccp2.MethodName = "doUpdateSling";
  381. ccp2.ServerParams = new object[]
  382. {
  383. JSONFormat.Format(tem)
  384. };
  385. ccp2 = ExecuteNonQuery(ccp2, CoreInvokeType.Internal);
  386. if (ccp2.ReturnCode == -1)
  387. {
  388. MessageUtil.ShowTips("入库失败");
  389. return;
  390. }
  391. }
  392. }
  393. }
  394. }
  395. }
  396. else
  397. {
  398. MessageUtil.ShowTips("已经入库无法再次入库!");
  399. return;
  400. }
  401. }
  402. else
  403. {
  404. MessageUtil.ShowTips("入库记录无法入库!");
  405. return;
  406. }
  407. var ccp = new CoreClientParam();
  408. ccp.ServerName = "com.steering.pss.ydm.Stuffmanage.YdmBsSlingServer";
  409. ccp.MethodName = "addSlingInsert";
  410. ccp.ServerParams = new object[]
  411. {
  412. list
  413. };
  414. ccp = ExecuteNonQuery(ccp, CoreInvokeType.Internal);
  415. if (ccp.ReturnCode == -1)
  416. {
  417. MessageUtil.ShowTips("入库失败");
  418. return;
  419. }
  420. var ccp3 = new CoreClientParam();
  421. ccp3.ServerName = "com.steering.pss.ydm.Stuffmanage.YdmBsSlingServer";
  422. ccp3.MethodName = "doUpdateInsertFlag";
  423. ccp3.ServerParams = new object[]
  424. {
  425. st1.ResultNo
  426. };
  427. ccp3 = ExecuteNonQuery(ccp3, CoreInvokeType.Internal);
  428. if (ccp3.ReturnCode == -1)
  429. {
  430. MessageUtil.ShowTips("入库失败");
  431. return;
  432. }
  433. else
  434. {
  435. MessageUtil.ShowTips("入库成功");
  436. }
  437. queryAll();
  438. }
  439. private void DoUpdate()
  440. {
  441. YdmBsStorageEntity sto = this.ultraGrid1.ActiveRow.ListObject as YdmBsStorageEntity;
  442. this.ultraGrid2.UpdateData();
  443. decimal slingOld = 0;
  444. decimal slingNew = 0;
  445. decimal sling = 0;
  446. string storageno = "";
  447. string storagename = "";
  448. string slingno = "";
  449. foreach (UltraGridRow row in ultraGrid2.Rows)
  450. {
  451. if (row.Cells["CHK"].Value != null)
  452. {
  453. if (row.Cells["CHK"].Value.ToString().ToUpper() == "TRUE")
  454. {
  455. YdmBsLocationEntity upg = this.ultraGrid2.ActiveRow.ListObject as YdmBsLocationEntity;
  456. List<YdmBsLocationEntity> location = EntityHelper.GetData<YdmBsLocationEntity>(
  457. "com.steering.pss.ydm.Stuffmanage.YdmBsSlingServer.doQueryLocationNo", new object[] { upg.LocationNo }, this.ob);
  458. if (upg.Sling != null)
  459. {
  460. if (location[0].Sling!= null)
  461. {
  462. slingOld = location[0].Sling.Value;
  463. }
  464. }
  465. if (upg.Sling != null)
  466. {
  467. sling = upg.Sling.Value;
  468. }
  469. var tem = new YdmBsLocationEntity
  470. {
  471. LocationNo = upg.LocationNo,
  472. Sling = sling
  473. };
  474. var ccp = new CoreClientParam();
  475. ccp.ServerName = "com.steering.pss.ydm.Stuffmanage.YdmBsSlingServer";
  476. ccp.MethodName = "doUpdateSling";
  477. ccp.ServerParams = new object[]
  478. {
  479. JSONFormat.Format(tem)
  480. };
  481. ccp = ExecuteNonQuery(ccp, CoreInvokeType.Internal);
  482. string locationname = upg.LocationName;
  483. string locationNo = upg.LocationNo;
  484. if (upg.Sling != null)
  485. {
  486. slingNew = upg.Sling.Value;
  487. }
  488. sling = slingNew-slingOld ;
  489. storageno = sto.StorageNo;
  490. storagename = sto.StorageName;
  491. List<YdmBsSlingEntity> listSource = EntityHelper.GetData<YdmBsSlingEntity>(
  492. "com.steering.pss.ydm.Stuffmanage.YdmBsSlingServer.getSlingNo", new object[] { }, this.ob);
  493. slingno = listSource[0].SlingNo.ToString();
  494. var template = new YdmBsSlingEntity
  495. {
  496. ResultNo = Guid.NewGuid().ToString(),
  497. SlingOld = slingOld,
  498. SlingNew = slingNew,
  499. Sling = sling,
  500. StorageNo = storageno,
  501. StorageName = storagename,
  502. LocationNo = locationNo,
  503. LocationName = locationname,
  504. CreateName = this.UserInfo.GetUserName(),
  505. SlingNo = slingno
  506. };
  507. var ccp2 = new CoreClientParam
  508. {
  509. ServerName = "com.steering.pss.ydm.Stuffmanage.YdmBsSlingServer",
  510. MethodName = "addSlingNull",
  511. ServerParams = new object[]
  512. {
  513. JSONFormat.Format(template)
  514. }
  515. };
  516. ccp2 = ExecuteNonQuery(ccp2, CoreInvokeType.Internal);
  517. if (ccp2.ReturnCode == -1)
  518. {
  519. MessageUtil.ShowTips("维护失败");
  520. return;
  521. }
  522. else
  523. {
  524. MessageUtil.ShowTips("维护成功!");
  525. }
  526. }
  527. }
  528. }
  529. queryAll();
  530. }
  531. private void getStoreAll()
  532. {
  533. //DataTable dt = ServerHelper.GetData("com.steering.ydm.bc.FrmFilpOutStorage.getStoreAll", new object[] { storageArr }, this.ob);
  534. DataTable dt = ServerHelper.GetData("com.steering.pss.ydm.Stuffmanage.YdmBsSlingServer.getStoreAll", new object[] { storageArr }, this.ob);
  535. if (dt.Rows.Count > 0)
  536. {
  537. ultraComboEditor2.DataSource = dt;
  538. ultraComboEditor2.DisplayMember = "STORAGE_NAME";
  539. ultraComboEditor2.ValueMember = "STORAGE_NO";
  540. }
  541. }
  542. private void frmLocationDefine_Load(object sender, EventArgs e)
  543. {
  544. //InitGrid2();
  545. //QueryTree();
  546. //getDepartMent();
  547. cbm_Dw.Enabled = false;
  548. YdmBaseClass.InitSection(cbm_Dw, this.ValidDataPurviewIds, this.ob);
  549. storageArr = WarehousePermissionsStore11(this.ValidDataPurviewIds, ob);
  550. getStoreAll();
  551. }
  552. public static string[] WarehousePermissionsStore11(String[] validDataPurviewIds, OpeBase ob)
  553. {
  554. DataTable dt = ServerHelper.GetData("com.steering.pss.ydm.Stuffmanage.YdmBsSlingServer.getWarehousePermissionsStore", new object[] { validDataPurviewIds }, ob);
  555. if (dt != null && dt.Rows.Count > 0)
  556. {
  557. string[] storages = new string[dt.Rows.Count];
  558. for (int i = 0; i < dt.Rows.Count; i++)
  559. {
  560. storages[i] = dt.Rows[i]["STORAGE_NO"].ToString();
  561. }
  562. return storages;
  563. }
  564. else
  565. {
  566. return new string[1] { "" };
  567. }
  568. }
  569. private void ultrlSection_CheckedChanged(object sender, EventArgs e)
  570. {
  571. cbm_Dw.Enabled = this.ultrlSection.Checked;
  572. }
  573. private void ultraGrid1_AfterRowActivate(object sender, EventArgs e)
  574. {
  575. queryAll();
  576. }
  577. private void queryAll()
  578. {
  579. UltraGridRow ugr = this.ultraGrid1.ActiveRow;
  580. string managementName = ultraGrid1.ActiveRow.Cells["MANAGEMENTNAME"].Value.ToString();
  581. string storgeNo = ultraGrid1.ActiveRow.Cells["STORAGENO"].Value.ToString();
  582. List<YdmBsLocationEntity> listSource = EntityHelper.GetData<YdmBsLocationEntity>(
  583. "com.steering.pss.ydm.Stuffmanage.YdmBsSlingServer.doQuerySling", new object[] { managementName }, this.ob);
  584. ydmBsLocationEntityBindingSource.DataSource = listSource;
  585. List<YdmBsSlingEntity> listSource1 = EntityHelper.GetData<YdmBsSlingEntity>(
  586. "com.steering.pss.ydm.Stuffmanage.YdmBsSlingServer.doQueryYdm", new object[] { storgeNo }, this.ob);
  587. ydmBsSlingEntityBindingSource.DataSource = listSource1;
  588. List<YdmBsSlingEntity> listSource2 = EntityHelper.GetData<YdmBsSlingEntity>(
  589. "com.steering.pss.ydm.Stuffmanage.YdmBsSlingServer.doQueryOut", new object[] { storgeNo }, this.ob);
  590. ydmBsSlingEntityBindingSource1.DataSource = listSource2;
  591. List<YdmBsSlingEntity> listSource3 = EntityHelper.GetData<YdmBsSlingEntity>(
  592. "com.steering.pss.ydm.Stuffmanage.YdmBsSlingServer.doQueryInsert", new object[] { storgeNo }, this.ob);
  593. ydmBsSlingEntityBindingSource2.DataSource = listSource3;
  594. }
  595. }
  596. }