FrmCkStorageConfirm.cs 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543
  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;using Pur.Entity;
  10. using Pur.Entity.ck;
  11. using Pur.require_plan;
  12. using Pur.Entity.configureEntity;
  13. using Core.Mes.Client.Comm.Control;
  14. using com.hnshituo.pur.vo;
  15. using Pur.configure;
  16. using Infragistics.Win;
  17. using Pur.PublicTools;
  18. using Infragistics.Win.UltraWinGrid;
  19. using Pur.Pop_upWindow;
  20. using Core.Mes.Client.Comm.Tool;
  21. using System.Collections;
  22. namespace Pur.ck
  23. {
  24. public partial class FrmCkStorageConfirm : FrmPmsBase
  25. {
  26. public FrmCkStorageConfirm()
  27. {
  28. InitializeComponent();
  29. txt_createTimeE.Value = System.DateTime.Now;
  30. txt_createTimeS.Value = ((DateTime)txt_createTimeE.Value).AddMonths(-1);
  31. //ultraGrid1.DisplayLayout.Bands[0].Override.AllowUpdate = DefaultableBoolean.False;
  32. }
  33. //菜单按钮事件
  34. public override void ToolBar_Click(object sender, string ToolbarKey)
  35. {
  36. switch (ToolbarKey)
  37. {
  38. case "Query":
  39. if (ultraTabControl2.SelectedTab.Key=="0")
  40. {
  41. GetPUR_CK_STORAGE();
  42. getPur_Ck_StorageSuorce();
  43. }
  44. else
  45. {
  46. getPur_Ck_StorageSuorce();
  47. }
  48. break;
  49. case "cockInv":
  50. cockInv();
  51. break;
  52. case "unCockInv":
  53. unCockInv();
  54. break;
  55. case "MovingInvPhy":
  56. MovingInvPhy();
  57. break;
  58. case "CanCelMovingInvPhy":
  59. CanCelMovingInvPhy();
  60. break;
  61. case "doexport":
  62. doexport();
  63. break;
  64. }
  65. }
  66. public void doexport()
  67. {
  68. if (ultraTabControl2.ActiveTab.Key == "0")
  69. GridHelper.ulGridToExcel(ultraGrid1, ultraGrid1.Text);
  70. else
  71. GridHelper.ulGridToExcel(ultraGrid5, ultraGrid5.Text);
  72. }
  73. /// <summary>
  74. /// 查询
  75. /// </summary>
  76. private void GetPUR_CK_STORAGE()
  77. {
  78. dataTable2.Rows.Clear();
  79. dataTable3.Rows.Clear();
  80. CkStorage CkSto = new CkStorage();
  81. CkSto.InvId = txt_InvId.Text;
  82. CkSto.ItemCode = txt_itemCode.Text;
  83. CkSto.ItemName = txt_itemName.Text;
  84. CkSto.SuppName = txt_suppName.Text;
  85. CkSto.OrderId = txt_orderId.Text;
  86. CkSto.InStockNo = txt_inStockNo.Text;
  87. CkSto.InvQty = Convert.ToDouble(txt_invOrigQty.Value);
  88. CkSto.CreateName = txtItemClass.Text;
  89. if (!string.IsNullOrEmpty(txt_createTimeS.Text) && !string.IsNullOrEmpty(txt_createTimeE.Text))
  90. {
  91. CkSto.CreateTime = Convert.ToDateTime(txt_createTimeS.Text);
  92. CkSto.UpdateTime = Convert.ToDateTime(txt_createTimeE.Text).AddDays(1);
  93. }
  94. CkSto.YkStatus = "1";
  95. string depid = this.UserInfo.GetDeptid();
  96. DataTable dt = this.execute<DataTable>("com.hnshituo.pur.ck.service.CkStorageService", "find_StorageByStatus", new object[] { CkSto, depid });
  97. GridHelper.CopyDataToDatatable(dt, dataTable1, true);
  98. GridHelper.RefreshAndAutoSize(ultraGrid1);
  99. //publicPms.autoGridColumnWSize(ultraGrid1.DisplayLayout.Bands[0]);
  100. foreach (UltraGridRow ugr in ultraGrid1.Rows)
  101. {
  102. //标记待检状态入库单
  103. if (ugr.Cells["USESTATUS"].Value.ToString() == "不可用")
  104. {
  105. ugr.Cells["USESTATUS"].Appearance.ForeColor = Color.Red;// System.Drawing.Color.FromArgb(255, 128, 0);
  106. ugr.Cells["STATUS"].Appearance.ForeColor = Color.Red;// System.Drawing.Color.FromArgb(255, 128, 0);
  107. }
  108. else
  109. {
  110. ugr.Cells["USESTATUS"].Appearance.ForeColor = Color.Black;
  111. ugr.Cells["STATUS"].Appearance.ForeColor = Color.Black;// System.Drawing.Color.FromArgb(255, 128, 0);
  112. }
  113. }
  114. }
  115. /// <summary>
  116. /// 获取移库记录
  117. /// </summary>
  118. private void getPur_Ck_StorageSuorce()
  119. {
  120. //dataTable7.Rows.Clear();
  121. //CkStorage CkSto = new CkStorage();
  122. //CkSto.InvId = txt_InvId.Text;
  123. //CkSto.ItemCode = txt_itemCode.Text;
  124. //CkSto.ItemName = txt_itemName.Text;
  125. //if (txt_invBin.Value != null)
  126. //{
  127. // CkSto.DeleteName = txt_invBin.Text;
  128. //}
  129. ////CkSto.InvLogic = txt_invLogic.Text;
  130. //if (txt_invPhysic.Value != null)
  131. //{
  132. // CkSto.DeleteUserid = txt_invPhysic.Text;
  133. //}
  134. //CkSto.SuppName = txt_suppName.Text;
  135. //CkSto.OrderId = txt_orderId.Text;
  136. //CkSto.InStockNo = txt_inStockNo.Text;
  137. //CkSto.InvQty = Convert.ToDouble(txt_invOrigQty.Value);
  138. //if (!string.IsNullOrEmpty(txt_createTimeS.Text) && !string.IsNullOrEmpty(txt_createTimeE.Text))
  139. //{
  140. // CkSto.CreateTime = Convert.ToDateTime(txt_createTimeS.Text);
  141. // CkSto.UpdateTime = Convert.ToDateTime(txt_createTimeE.Text).AddDays(1);
  142. //}
  143. ////查询源移库记录
  144. //CkSto.Status = "11";
  145. //DataTable dt = this.execute<DataTable>("com.hnshituo.pur.ck.service.CkStorageService", "find_Storage", new object[] { CkSto });
  146. //GridHelper.CopyDataToDatatable(dt, dataTable4, true);
  147. //GridHelper.RefreshAndAutoSize(ultraGrid2);
  148. dataTable6.Rows.Clear();
  149. CkStorage CkSto = new CkStorage();
  150. CkSto.InvId = txt_InvId.Text;
  151. CkSto.ItemCode = txt_itemCode.Text;
  152. CkSto.ItemName = txt_itemName.Text;
  153. //CkSto.InvLogic = txt_invLogic.Text;
  154. CkSto.SuppName = txt_suppName.Text;
  155. CkSto.OrderId = txt_orderId.Text;
  156. CkSto.InStockNo = txt_inStockNo.Text;
  157. CkSto.InvQty = Convert.ToDouble(txt_invOrigQty.Value);
  158. if (!string.IsNullOrEmpty(txt_createTimeS.Text) && !string.IsNullOrEmpty(txt_createTimeE.Text))
  159. {
  160. CkSto.CreateTime = Convert.ToDateTime(txt_createTimeS.Text);
  161. CkSto.UpdateTime = Convert.ToDateTime(txt_createTimeE.Text).AddDays(1);
  162. }
  163. string[] datePurviewIds = this.ValidDataPurviewIds;
  164. //查询源移库记录
  165. //CkSto.Status = "11";
  166. DataTable dt = this.execute<DataTable>("com.hnshituo.pur.ck.service.CkStorageUseService", "getCkConfirm", new object[] { CkSto,UserInfo.GetDeptid() });
  167. GridHelper.CopyDataToDatatable(dt, dataTable6, true);
  168. GridHelper.RefreshAndAutoSize(ultraGrid5);
  169. }
  170. /// <summary>
  171. /// 解冻库存
  172. /// </summary>
  173. private void unCockInv()
  174. {
  175. UltraGridRow ugr = ultraGrid1.ActiveRow;
  176. CkStorage ck = new CkStorage();
  177. ck.InvId = ugr.Cells["InvId"].Value.ToString();
  178. ck.UseStatus = "1";
  179. if (MessageUtil.ShowYesNoAndQuestion("确定解冻库存【" + ck.InvId + "】?").Equals(DialogResult.No))
  180. {
  181. return;
  182. }
  183. CoreResult re1 = this.execute<CoreResult>("com.hnshituo.pur.ck.service.CkStorageService", "doUpdate", new object[] { ck });
  184. if (re1.Resultcode == -1)
  185. {
  186. MessageBox.Show("解冻失败:" + re1.Resultmsg, "");
  187. return;
  188. }
  189. MessageBox.Show("解冻成功!");
  190. GetPUR_CK_STORAGE();
  191. getPur_Ck_StorageSuorce();
  192. }
  193. /// <summary>
  194. /// 冻结库存
  195. /// </summary>
  196. private void cockInv()
  197. {
  198. UltraGridRow ugr = ultraGrid1.ActiveRow;
  199. CkStorage ck = new CkStorage();
  200. ck.InvId = ugr.Cells["InvId"].Value.ToString();
  201. ck.UseStatus = "0";
  202. if (MessageUtil.ShowYesNoAndQuestion("确定冻结库存【" + ck.InvId + "】?").Equals(DialogResult.No))
  203. {
  204. return;
  205. }
  206. CoreResult re1 = this.execute<CoreResult>("com.hnshituo.pur.ck.service.CkStorageService", "doUpdate", new object[] { ck });
  207. if (re1.Resultcode == -1)
  208. {
  209. MessageBox.Show("冻结失败:" + re1.Resultmsg, "");
  210. return;
  211. }
  212. MessageBox.Show("冻结成功!");
  213. GetPUR_CK_STORAGE();
  214. getPur_Ck_StorageSuorce();
  215. }
  216. /// <summary>
  217. /// 物料弹窗
  218. /// </summary>
  219. /// <param name="sender"></param>
  220. /// <param name="e"></param>
  221. private void txt_itemCode_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
  222. {
  223. FrmPurPlanMat mat = new FrmPurPlanMat(this.ob);
  224. mat.ShowDialog();
  225. if (mat.getItemCode() != null)
  226. {
  227. txt_itemCode.Text = mat.getItemCode().ToString();
  228. txt_itemName.Text = mat.getItemName().ToString();
  229. }
  230. }
  231. /// <summary>
  232. /// 界面加载,库区下拉框加载
  233. /// </summary>
  234. /// <param name="sender"></param>
  235. /// <param name="e"></param>
  236. private void PurCkStorage_Load(object sender, EventArgs e)
  237. {
  238. txt_createTimeS.Text = DateTime.Now.AddMonths(-1).ToString();
  239. //获取
  240. PurCkInBillEntity CkInBillEntity = new PurCkInBillEntity();
  241. DataTable dt_GropByItem = this.execute<DataTable>("com.hnshituo.pur.ck.service.CkInBillService", "GetCkInBill_GropByItem", new object[] { CkInBillEntity });
  242. comm.FilComboboxAdd(txtItemClass, dt_GropByItem, "basecode", "basename", "", true, "", "");
  243. //LogicWareHouseEntity lhouse = new LogicWareHouseEntity();
  244. //lhouse.Validflag = "1";
  245. //DataTable dt = this.execute<DataTable>("com.hnshituo.pur.configure.service.LogicSeatService", "getLogicSeat", new object[] { lhouse, 0, 0 });
  246. //if (dt.Rows.Count > 0)
  247. //{
  248. // txt_invLogic.DataSource = dt;
  249. // this.txt_invLogic.DisplayMember = "invLogicName";
  250. // this.txt_invLogic.ValueMember = "invLogic";
  251. //}
  252. //PhysicSeatEntity Phouse = new PhysicSeatEntity();
  253. //Phouse.Validflag = "1";
  254. //DataTable dt1 = this.execute<DataTable>("com.hnshituo.pur.configure.service.ActualSeatService", "getActualSeat", new object[] { Phouse, 0, 0 });
  255. //if (dt1.Rows.Count > 0)
  256. //{
  257. // txt_invPhysic.DataSource = dt1;
  258. // this.txt_invPhysic.DisplayMember = "invPhysicName";
  259. // this.txt_invPhysic.ValueMember = "invPhysic";
  260. //}
  261. //ActualSeatPosEntity PosEntity = new ActualSeatPosEntity();
  262. //PosEntity.Validflag = "1";
  263. //DataTable dt3 = this.execute<DataTable>("com.hnshituo.pur.configure.service.ActualSeatPosService", "find", new object[] { PosEntity, 0, 0 });
  264. //if (dt3.Rows.Count > 0)
  265. //{
  266. // txt_invBin.DataSource = dt3;
  267. // this.txt_invBin.DisplayMember = "invPosName";
  268. // this.txt_invBin.ValueMember = "invPos";
  269. //}
  270. GridHelper.SetExcludeColumnsActive(ultraGrid5.DisplayLayout.Bands[0]);
  271. GridHelper.SetExcludeColumnsActive(ultraGrid1.DisplayLayout.Bands[0], "Check", "MoveQtyKC", "MoveQty");
  272. //GetPUR_CK_STORAGE();
  273. }
  274. /// <summary>
  275. /// 供应商弹窗
  276. /// </summary>
  277. /// <param name="sender"></param>
  278. /// <param name="e"></param>
  279. private void txt_suppName_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
  280. {
  281. Supp Sp = new Supp();
  282. Sp.Validflag = "1";
  283. //DataTable dt = this.execute<DataTable>("com.hnshituo.pur.configure.service.SuppService", "find", new object[] {Sp,0,0 });
  284. frmSuppSel Sky = new frmSuppSel(this.ob);
  285. Sky.ShowDialog();
  286. if (Sky.strSUPP_CODE == null)
  287. return;
  288. txt_suppName.Text = Sky.strSUPP_NAME.ToString();
  289. //Supp_Code = Sky.strSUPP_CODE.ToString();
  290. }
  291. /// <summary>
  292. /// 激活库存表
  293. /// </summary>
  294. /// <param name="sender"></param>
  295. /// <param name="e"></param>
  296. private void ultraGrid1_AfterRowActivate(object sender, EventArgs e)
  297. {
  298. //GetPUR_CK_STORAGE_USE();
  299. //GetPUR_CK_STORAGE_POS();
  300. }
  301. /// <summary>
  302. /// 查询库存使用表
  303. /// </summary>
  304. private void GetPUR_CK_STORAGE_USE()
  305. {
  306. if (ultraGrid1.ActiveRow != null)
  307. {
  308. PurCkStorageUseEntity CkStorageUseEntity = new PurCkStorageUseEntity();
  309. CkStorageUseEntity.InvId = ultraGrid1.ActiveRow.Cells["INVID"].Value.ToString();
  310. CkStorageUseEntity.Validflag = "1";
  311. DataTable dt = this.execute<DataTable>("com.hnshituo.pur.ck.service.CkStorageUseService", "find", new object[] { CkStorageUseEntity,0,0 });
  312. //按创建时间降序
  313. if (dt.Rows.Count > 1)
  314. {
  315. dt.DefaultView.Sort = "CREATETIME DESC";
  316. dt = dt.DefaultView.ToTable();
  317. }
  318. GridHelper.CopyDataToDatatable(dt, dataTable3, true);
  319. }
  320. }
  321. /// <summary>
  322. /// 查询库存库位
  323. /// </summary>
  324. private void GetPUR_CK_STORAGE_POS()
  325. {
  326. if (ultraGrid1.ActiveRow != null)
  327. {
  328. PurCkStoragePosEntity CkStoragePosEntity = new PurCkStoragePosEntity();
  329. CkStoragePosEntity.InvId = ultraGrid1.ActiveRow.Cells["INVID"].Value.ToString();
  330. DataTable dt = this.execute<DataTable>("com.hnshituo.pur.ck.service.CkStoragePosService", "getCkStoragePos_ByInvId", new object[] { CkStoragePosEntity });
  331. //按创建时间降序
  332. if (dt.Rows.Count > 1)
  333. {
  334. dt.DefaultView.Sort = "CREATETIME DESC";
  335. dt = dt.DefaultView.ToTable();
  336. }
  337. GridHelper.CopyDataToDatatable(dt, dataTable2, true);
  338. }
  339. //publicPms.autoGridColumnWSize(ultraGrid2.DisplayLayout.Bands[0]);
  340. }
  341. /// <summary>
  342. /// 勾选库存记录
  343. /// </summary>
  344. /// <param name="sender"></param>
  345. /// <param name="e"></param>
  346. private void ultraGrid1_CellChange(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
  347. {
  348. object o = e.Cell.Value;
  349. ultraGrid1.UpdateData();
  350. //UltraGridRow[] ugrs = GridHelper.GetRowsWithKey(ultraGrid1, new string[] { "Check" }, new string[] { e.Cell.Value.ToString()});
  351. //判断库区是否全相同
  352. //UltraGridRow[] ugrsPhysic = GridHelper.GetRowsWithKey(ultraGrid1, new string[] { "Check","invPhysic" }, new string[] { e.Cell.Value.ToString(),e.Cell.Row.Cells["invPhysic"].Value.ToString() });
  353. //判断库位是否全相同
  354. //UltraGridRow[] ugrsPhysicPos = GridHelper.GetRowsWithKey(ultraGrid1, new string[] { "Check", "invPos" }, new string[] { e.Cell.Value.ToString(), e.Cell.Row.Cells["invPos"].Value.ToString() });
  355. if (e.Cell.Column.Key == "MoveQtyKC")
  356. {
  357. double bMoveQtyKC = 0;
  358. double.TryParse(e.Cell.Row.Cells["MoveQtyKC"].Value.ToString(), out bMoveQtyKC);
  359. double bINVQTYWEIGHT = 0;
  360. double.TryParse(e.Cell.Row.Cells["INVQTYWEIGHT"].Value.ToString(), out bINVQTYWEIGHT);
  361. double bITEMUOMCONEFFICIENT = 0;
  362. double.TryParse(e.Cell.Row.Cells["ITEMUOMCONEFFICIENT"].Value.ToString(), out bITEMUOMCONEFFICIENT);
  363. if(bMoveQtyKC>bINVQTYWEIGHT)
  364. {
  365. MessageUtil.ShowTips("移库数量不能>库存数量");
  366. e.Cell.Value = o;
  367. return;
  368. }
  369. else
  370. {
  371. if (e.Cell.Row.Cells["itemUom"].Value.ToString() == "基吨")
  372. {
  373. e.Cell.Row.Cells["MoveQty"].Value = Math.Round(bMoveQtyKC * bITEMUOMCONEFFICIENT, 3);
  374. }
  375. else
  376. {
  377. e.Cell.Row.Cells["MoveQty"].Value = Math.Round(bMoveQtyKC / bITEMUOMCONEFFICIENT, 3);
  378. }
  379. }
  380. }
  381. if (e.Cell.Column.Key == "MoveQty")
  382. {
  383. double bMoveQty = 0;
  384. double.TryParse(e.Cell.Row.Cells["MoveQty"].Value.ToString(), out bMoveQty);
  385. double bINVQTY = 0;
  386. double.TryParse(e.Cell.Row.Cells["INVQTY"].Value.ToString(), out bINVQTY);
  387. double bITEMUOMCONEFFICIENT = 0;
  388. double.TryParse(e.Cell.Row.Cells["ITEMUOMCONEFFICIENT"].Value.ToString(), out bITEMUOMCONEFFICIENT);
  389. if (bMoveQty > bINVQTY)
  390. {
  391. MessageUtil.ShowTips("移库数量不能>采购数量");
  392. e.Cell.Value = o;
  393. return;
  394. }
  395. else
  396. {
  397. if (e.Cell.Row.Cells["itemUom"].Value.ToString() == "基吨")
  398. {
  399. e.Cell.Row.Cells["MoveQtyKC"].Value = Math.Round(bMoveQty / bITEMUOMCONEFFICIENT, 3);
  400. }
  401. else
  402. {
  403. e.Cell.Row.Cells["MoveQtyKC"].Value = Math.Round(bMoveQty * bITEMUOMCONEFFICIENT, 3);
  404. }
  405. }
  406. }
  407. }
  408. /// <summary>
  409. /// 移库操作
  410. /// </summary>
  411. /// <param name="sender"></param>
  412. /// <param name="e"></param>
  413. private void btn_MovePhysic_Click(object sender, EventArgs e)
  414. {
  415. MovingInvPhy();
  416. }
  417. /// <summary>
  418. /// 确认
  419. /// </summary>
  420. private void MovingInvPhy()
  421. {
  422. ultraGrid1.UpdateData();
  423. if (ultraTabControl2.SelectedTab.Key != "0")
  424. {
  425. MessageUtil.ShowTips("请切换tab页面到“库存记录”,再进行操作");
  426. return;
  427. }
  428. ArrayList al = new ArrayList();
  429. foreach (UltraGridRow ugr in ultraGrid1.Rows)
  430. {
  431. if ((bool)ugr.Cells["Check"].Value)
  432. {
  433. al.Add(ugr.Cells["InvId"].Value.ToString());
  434. }
  435. }
  436. if (ultraGrid1.Rows.Where(t => t.Selected).Count() > 0 && al.Count <= 0)
  437. {
  438. foreach (UltraGridRow ugr in ultraGrid1.Rows.Where(t => t.Selected))
  439. {
  440. al.Add(ugr.Cells["InvId"].Value.ToString());
  441. }
  442. }
  443. if(al.Count<1)
  444. {
  445. MessageUtil.ShowTips("请勾选需要确认的记录");
  446. return;
  447. }
  448. CoreResult re1 = this.execute<CoreResult>("com.hnshituo.pur.ck.service.CkStorageService", "MoveInvConfirm", new object[] { al, UserInfo.GetUserName() });
  449. if (re1.Resultcode == -1)
  450. {
  451. MessageBox.Show("操作失败:" + re1.Resultmsg, "");
  452. return;
  453. }
  454. MessageBox.Show("确认成功!");
  455. GetPUR_CK_STORAGE();
  456. getPur_Ck_StorageSuorce();
  457. }
  458. /// <summary>
  459. /// 撤销移库
  460. /// </summary>
  461. private void CanCelMovingInvPhy()
  462. {
  463. if (ultraTabControl2.SelectedTab.Key != "1")
  464. {
  465. MessageUtil.ShowTips("请切换tab页面到“移库记录”,再撤销移库确认");
  466. return;
  467. }
  468. if(ultraGrid5.ActiveRow!=null)
  469. {
  470. if (comm.ConfirmOption("确定撤销库存记录号【" + ultraGrid5.ActiveRow.Cells["INVIDNEW"].Value.ToString() + "】的移库确认"))
  471. {
  472. CkStorage ck = new CkStorage();
  473. ck.InvId = ultraGrid5.ActiveRow.Cells["INVIDNEW"].Value.ToString();
  474. ck.UpdateName = UserInfo.GetUserName();
  475. ck.UpdateUserid = UserInfo.GetUserID();
  476. CoreResult re1 = this.execute<CoreResult>("com.hnshituo.pur.ck.service.CkStorageService", "CancelMoveInvConfirm", new object[] { ck });
  477. if (re1.Resultcode == -1)
  478. {
  479. MessageBox.Show("撤销失败:" + re1.Resultmsg, "");
  480. return;
  481. }
  482. MessageBox.Show("撤销成功!");
  483. GetPUR_CK_STORAGE();
  484. getPur_Ck_StorageSuorce();
  485. }
  486. }
  487. else
  488. {
  489. MessageUtil.ShowTips("请选择移库记录");
  490. return;
  491. }
  492. }
  493. /// <summary>
  494. /// 选择新库位
  495. /// </summary>
  496. /// <param name="sender"></param>
  497. /// <param name="e"></param>
  498. private void txtPhysicPosNew_ValueChanged(object sender, EventArgs e)
  499. {
  500. //获取库位编码
  501. }
  502. private void ultraGrid2_AfterRowActivate(object sender, EventArgs e)
  503. {
  504. CkStorage CkSto = new CkStorage();
  505. CkSto.InvIdSource = ultraGrid2.ActiveRow.Cells["InvId"].Value.ToString();
  506. DataTable dt = this.execute<DataTable>("com.hnshituo.pur.ck.service.CkStorageService", "find_Storage", new object[] { CkSto });
  507. GridHelper.CopyDataToDatatable(dt, dataTable7, true);
  508. GridHelper.RefreshAndAutoSize(ultraGrid4);
  509. }
  510. }
  511. }