| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150 |
- 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;
- }
- }
- /// <summary>
- /// 查询
- /// </summary>
- 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<DataTable>("com.hnshituo.pur.ck.service.CkStorageService", "find_Storage", new object[] { CkSto });
- GridHelper.CopyDataToDatatable(dt,dataTable1,true);
- }
-
-
- /// <summary>
- /// 物料弹窗
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- 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();
-
- }
- /// <summary>
- /// 界面加载,库区下拉框加载
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- 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<DataTable>("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<DataTable>("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<DataTable>("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();
- }
- /// <summary>
- /// 供应商弹窗
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void txt_suppName_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
- {
- Supp Sp = new Supp();
- Sp.Validflag = "1";
- //DataTable dt = this.GetJsonService().execute<DataTable>("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)
- {
- }
- }
- }
|