using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using CoreFS.CA06; using Pur.Entity.ck; using Pur.require_plan; using Pur.Entity.configureEntity; using Core.Mes.Client.Comm.Control; using com.hnshituo.pur.vo; using Pur.configure; using Infragistics.Win; namespace Pur.ck { public partial class PurCkStorage : FrmBase { public PurCkStorage() { InitializeComponent(); txt_createTimeS.Value = ((DateTime)txt_createTimeS.Value).AddMonths(-1); ultraGrid1.DisplayLayout.Bands[0].Override.AllowUpdate = DefaultableBoolean.False; } //菜单按钮事件 public override void ToolBar_Click(object sender, string ToolbarKey) { switch (ToolbarKey) { case "Query": GetPUR_CK_STORAGE(); break; } } /// /// 查询 /// private void GetPUR_CK_STORAGE() { CkStorage CkSto = new CkStorage(); CkSto.ItemCode = txt_itemCode.Text; CkSto.ItemName = txt_itemName.Text; //CkSto.InvPos = txt_invBin.Text; //CkSto.InvLogic = txt_invLogic.Text; //CkSto.InvPhysic = txt_invPhysic.Text; CkSto.SuppName = txt_suppName.Text; CkSto.OrderId = txt_orderId.Text; CkSto.InStockNo = txt_inStockNo.Text; CkSto.InvOrigQty =Convert.ToDouble(txt_invOrigQty.Value); if (!string.IsNullOrEmpty(txt_createTimeS.Text) && !string.IsNullOrEmpty(txt_createTimeE.Text)) { CkSto.CreateTime = Convert.ToDateTime(txt_createTimeS.Text); CkSto.UpdateTime = Convert.ToDateTime(txt_createTimeE.Text); } DataTable dt = this.GetJsonService().execute("com.hnshituo.pur.ck.service.CkStorageService", "find_Storage", new object[] { CkSto }); GridHelper.CopyDataToDatatable(dt,dataTable1,true); } /// /// 物料弹窗 /// /// /// private void txt_itemCode_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e) { FrmPurPlanMat mat = new FrmPurPlanMat(this.ob); mat.ShowDialog(); if (mat.getItemCode().ToString() == null) { return; } txt_itemCode.Text = mat.getItemCode().ToString(); txt_itemName.Text = mat.getItemName().ToString(); } /// /// 界面加载,库区下拉框加载 /// /// /// private void PurCkStorage_Load(object sender, EventArgs e) { txt_createTimeS.Text = DateTime.Now.AddMonths(-1).ToString(); txt_invOrigQty.Value = 2; LogicWareHouseEntity lhouse = new LogicWareHouseEntity(); lhouse.Validflag = "1"; DataTable dt = this.GetJsonService().execute("com.hnshituo.pur.configure.service.LogicSeatService", "getLogicSeat", new object[] { lhouse, 0, 0 }); if (dt.Rows.Count > 0) { txt_invLogic.DataSource = dt; this.txt_invLogic.DisplayMember = "invLogicName"; this.txt_invLogic.ValueMember = "invLogic"; } PhysicSeatEntity Phouse = new PhysicSeatEntity(); Phouse.Validflag = "1"; DataTable dt1 = this.GetJsonService().execute("com.hnshituo.pur.configure.service.ActualSeatService", "getActualSeat", new object[] { Phouse, 0, 0 }); if (dt1.Rows.Count > 0) { txt_invPhysic.DataSource = dt1; this.txt_invPhysic.DisplayMember = "invPhysicName"; this.txt_invPhysic.ValueMember = "invPhysic"; } ActualSeatPosEntity PosEntity = new ActualSeatPosEntity(); PosEntity.Validflag = "1"; DataTable dt3 = this.GetJsonService().execute("com.hnshituo.pur.configure.service.ActualSeatPosService", "find", new object[] { PosEntity, 0, 0 }); if (dt3.Rows.Count > 0) { txt_invBin.DataSource = dt3; this.txt_invBin.DisplayMember = "invPosName"; this.txt_invBin.ValueMember = "invPos"; } GetPUR_CK_STORAGE(); } /// /// 供应商弹窗 /// /// /// private void txt_suppName_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e) { Supp Sp = new Supp(); Sp.Validflag = "1"; //DataTable dt = this.GetJsonService().execute("com.hnshituo.pur.configure.service.SuppService", "find", new object[] {Sp,0,0 }); frmSuppSel Sky = new frmSuppSel(this.ob); Sky.ShowDialog(); if (Sky.strSUPP_CODE == null) return; txt_suppName.Text = Sky.strSUPP_NAME.ToString(); //Supp_Code = Sky.strSUPP_CODE.ToString(); } private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e) { } } }