PurCkStorage.cs 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  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 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. namespace Pur.ck
  18. {
  19. public partial class PurCkStorage : FrmBase
  20. {
  21. public PurCkStorage()
  22. {
  23. InitializeComponent();
  24. txt_createTimeS.Value = ((DateTime)txt_createTimeS.Value).AddMonths(-1);
  25. ultraGrid1.DisplayLayout.Bands[0].Override.AllowUpdate = DefaultableBoolean.False;
  26. }
  27. //菜单按钮事件
  28. public override void ToolBar_Click(object sender, string ToolbarKey)
  29. {
  30. switch (ToolbarKey)
  31. {
  32. case "Query":
  33. GetPUR_CK_STORAGE();
  34. break;
  35. }
  36. }
  37. /// <summary>
  38. /// 查询
  39. /// </summary>
  40. private void GetPUR_CK_STORAGE()
  41. {
  42. CkStorage CkSto = new CkStorage();
  43. CkSto.ItemCode = txt_itemCode.Text;
  44. CkSto.ItemName = txt_itemName.Text;
  45. //CkSto.InvPos = txt_invBin.Text;
  46. //CkSto.InvLogic = txt_invLogic.Text;
  47. //CkSto.InvPhysic = txt_invPhysic.Text;
  48. CkSto.SuppName = txt_suppName.Text;
  49. CkSto.OrderId = txt_orderId.Text;
  50. CkSto.InStockNo = txt_inStockNo.Text;
  51. CkSto.InvOrigQty =Convert.ToDouble(txt_invOrigQty.Value);
  52. if (!string.IsNullOrEmpty(txt_createTimeS.Text) && !string.IsNullOrEmpty(txt_createTimeE.Text))
  53. {
  54. CkSto.CreateTime = Convert.ToDateTime(txt_createTimeS.Text);
  55. CkSto.UpdateTime = Convert.ToDateTime(txt_createTimeE.Text);
  56. }
  57. DataTable dt = this.GetJsonService().execute<DataTable>("com.hnshituo.pur.ck.service.CkStorageService", "find_Storage", new object[] { CkSto });
  58. GridHelper.CopyDataToDatatable(dt,dataTable1,true);
  59. }
  60. /// <summary>
  61. /// 物料弹窗
  62. /// </summary>
  63. /// <param name="sender"></param>
  64. /// <param name="e"></param>
  65. private void txt_itemCode_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
  66. {
  67. FrmPurPlanMat mat = new FrmPurPlanMat(this.ob);
  68. mat.ShowDialog();
  69. if (mat.getItemCode().ToString() == null)
  70. {
  71. return;
  72. }
  73. txt_itemCode.Text = mat.getItemCode().ToString();
  74. txt_itemName.Text = mat.getItemName().ToString();
  75. }
  76. /// <summary>
  77. /// 界面加载,库区下拉框加载
  78. /// </summary>
  79. /// <param name="sender"></param>
  80. /// <param name="e"></param>
  81. private void PurCkStorage_Load(object sender, EventArgs e)
  82. {
  83. txt_createTimeS.Text = DateTime.Now.AddMonths(-1).ToString();
  84. txt_invOrigQty.Value = 2;
  85. LogicWareHouseEntity lhouse = new LogicWareHouseEntity();
  86. lhouse.Validflag = "1";
  87. DataTable dt = this.GetJsonService().execute<DataTable>("com.hnshituo.pur.configure.service.LogicSeatService", "getLogicSeat", new object[] { lhouse, 0, 0 });
  88. if (dt.Rows.Count > 0)
  89. {
  90. txt_invLogic.DataSource = dt;
  91. this.txt_invLogic.DisplayMember = "invLogicName";
  92. this.txt_invLogic.ValueMember = "invLogic";
  93. }
  94. PhysicSeatEntity Phouse = new PhysicSeatEntity();
  95. Phouse.Validflag = "1";
  96. DataTable dt1 = this.GetJsonService().execute<DataTable>("com.hnshituo.pur.configure.service.ActualSeatService", "getActualSeat", new object[] { Phouse, 0, 0 });
  97. if (dt1.Rows.Count > 0)
  98. {
  99. txt_invPhysic.DataSource = dt1;
  100. this.txt_invPhysic.DisplayMember = "invPhysicName";
  101. this.txt_invPhysic.ValueMember = "invPhysic";
  102. }
  103. ActualSeatPosEntity PosEntity = new ActualSeatPosEntity();
  104. PosEntity.Validflag = "1";
  105. DataTable dt3 = this.GetJsonService().execute<DataTable>("com.hnshituo.pur.configure.service.ActualSeatPosService", "find", new object[] { PosEntity, 0, 0 });
  106. if (dt3.Rows.Count > 0)
  107. {
  108. txt_invBin.DataSource = dt3;
  109. this.txt_invBin.DisplayMember = "invPosName";
  110. this.txt_invBin.ValueMember = "invPos";
  111. }
  112. GetPUR_CK_STORAGE();
  113. }
  114. /// <summary>
  115. /// 供应商弹窗
  116. /// </summary>
  117. /// <param name="sender"></param>
  118. /// <param name="e"></param>
  119. private void txt_suppName_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
  120. {
  121. Supp Sp = new Supp();
  122. Sp.Validflag = "1";
  123. //DataTable dt = this.GetJsonService().execute<DataTable>("com.hnshituo.pur.configure.service.SuppService", "find", new object[] {Sp,0,0 });
  124. frmSuppSel Sky = new frmSuppSel(this.ob);
  125. Sky.ShowDialog();
  126. if (Sky.strSUPP_CODE == null)
  127. return;
  128. txt_suppName.Text = Sky.strSUPP_NAME.ToString();
  129. //Supp_Code = Sky.strSUPP_CODE.ToString();
  130. }
  131. private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
  132. {
  133. }
  134. }
  135. }