206 lines
6.9 KiB
C#
206 lines
6.9 KiB
C#
|
||
using DevExpress.Office.Utils;
|
||
using System;
|
||
using System.Collections.Generic;
|
||
using System.ComponentModel;
|
||
using System.Data;
|
||
using System.Drawing;
|
||
using System.Linq;
|
||
using System.Text;
|
||
using System.Threading.Tasks;
|
||
using System.Windows.Forms;
|
||
using WMS.Business;
|
||
using WMS.Business.Base;
|
||
using WMS.Business.CK;
|
||
using WMS.Business.SC;
|
||
using WMS.Ctrl;
|
||
using WMS.Frm.Base;
|
||
using WMS.IData;
|
||
using WMS.Model.Base;
|
||
using WMS.Model.CK;
|
||
using WMS.Model.RK;
|
||
using WMS.Model.SC;
|
||
using static System.Windows.Forms.VisualStyles.VisualStyleElement.StartPanel;
|
||
|
||
namespace WMS.FrmSC
|
||
{
|
||
public partial class FormCUX_WMS_PO_HEADES_ITF : FormBase
|
||
{
|
||
public FormCUX_WMS_PO_HEADES_ITF()
|
||
{
|
||
InitializeComponent();
|
||
}
|
||
|
||
public override void Refresh()
|
||
{
|
||
dt_Start.DateTime = System.DateTime.Now.AddDays(-7);
|
||
dt_End.DateTime = System.DateTime.Now.AddDays(0);
|
||
Get_CUX_WMS_PO_HEADES_ITF(dt_Start.DateTime.ToString(), dt_End.DateTime.ToString());
|
||
|
||
}
|
||
|
||
|
||
private void FormCUX_WMS_PO_HEADES_ITF_Load(object sender, EventArgs e)
|
||
{
|
||
|
||
DataTable dt = IBussFactory<BussCUX_WMS_PO_HEADES_ITF>.Instance().Get_cux_wms_subinventory_itf_zh();
|
||
if (dt != null)
|
||
{
|
||
lookUpEdit1.Properties.DisplayMember = "SUBINVENTORY_CODE";
|
||
lookUpEdit1.Properties.ValueMember = "SUBINVENTORY_DESC";
|
||
lookUpEdit1.Properties.DataSource = dt;
|
||
|
||
|
||
// 变量 = this.lookUpEdit.Editvalue.Tostring() //是ookUpEdit.Properties.ValueMember的值
|
||
//变量 = this.lookUpEdit.Text.Trim() //是ookUpEdit.Properties.DisplayMember 的值
|
||
|
||
|
||
|
||
}
|
||
|
||
|
||
|
||
this.dateEdit1.DateTime = System.DateTime.Now.AddDays(-7);
|
||
dateEdit2.DateTime = System.DateTime.Now.AddDays(0);
|
||
|
||
//LoadForm load = new LoadForm();
|
||
//DevExpress.XtraSplashScreen.SplashScreenManager.ShowForm(load, load.GetType(), false, true, false, 50);
|
||
//DevExpress.XtraSplashScreen.SplashScreenManager.Default.SetWaitFormDescription("正在处理数据,请等待....");
|
||
dt_Start.DateTime = System.DateTime.Now.AddDays(-7);
|
||
dt_End.DateTime = System.DateTime.Now.AddDays(0);
|
||
Get_CUX_WMS_PO_HEADES_ITF(dt_Start.DateTime.ToString(), dt_End.DateTime.ToString());
|
||
//Get_CUX_WMS_PO_RETURN_ITF();
|
||
|
||
//DevExpress.XtraSplashScreen.SplashScreenManager.CloseForm();
|
||
}
|
||
|
||
List<Mod_CUX_WMS_PO_HEADES_ITF> listOrderA = new List<Mod_CUX_WMS_PO_HEADES_ITF>();
|
||
|
||
private void Get_CUX_WMS_PO_HEADES_ITF (string startTime, string endTime)
|
||
{
|
||
listOrderA = IBussFactory<BussCUX_WMS_PO_HEADES_ITF>.Instance().GetCUX_WMS_PO_HEADES_ITF( startTime, endTime);
|
||
if (listOrderA != null)
|
||
{
|
||
bindingSource1.Clear();
|
||
bindingSource1.DataSource = listOrderA;
|
||
//gridControlCustom3.DataSource = listOrder;
|
||
}
|
||
|
||
}
|
||
|
||
private void Get_CUX_WMS_PO_LINES_ITF (int PO_HEADER_ID)
|
||
{
|
||
Mod_CUX_WMS_PO_LINES_ITF model = new Mod_CUX_WMS_PO_LINES_ITF();
|
||
model.PO_HEADER_ID = PO_HEADER_ID;
|
||
List<Mod_CUX_WMS_PO_LINES_ITF> listOrder = IBussFactory<BussCUX_WMS_PO_HEADES_ITF>.Instance().GetCUX_WMS_PO_LINES_ITF(model);
|
||
if (listOrder != null)
|
||
{
|
||
bindingSource2.Clear();
|
||
bindingSource2.DataSource = listOrder;
|
||
|
||
|
||
DataTable dt = IBussFactory<BussCUX_WMS_PO_HEADES_ITF>.Instance().GetRKctl(this.txtSEGMENT1.Text);
|
||
gridControlCustom6.DataSource = dt;
|
||
}
|
||
}
|
||
|
||
|
||
private void Get_CUX_WMS_PO_RETURN_ITF ()
|
||
{
|
||
|
||
|
||
|
||
|
||
Mod_CUX_WMS_PO_RETURN_ITF model = new Mod_CUX_WMS_PO_RETURN_ITF();
|
||
model.PO_HEADER_ID = 0;
|
||
List<Mod_CUX_WMS_PO_RETURN_ITF> listOrder = IBussFactory<BussCUX_WMS_PO_HEADES_ITF>.Instance().GetCUX_WMS_PO_RETURN_ITF(model,this.dateEdit1.DateTime.ToString(),this.dateEdit2.DateTime.ToString());
|
||
if (listOrder != null)
|
||
{
|
||
bindingSource3.Clear();
|
||
bindingSource3.DataSource = listOrder;
|
||
}
|
||
}
|
||
|
||
|
||
private void gdv_order_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e)
|
||
{
|
||
if (gdv_order.RowCount == 0)
|
||
{
|
||
return;
|
||
}
|
||
if (gdv_order.FocusedRowHandle < 0)
|
||
{
|
||
return;
|
||
}
|
||
string PO_HEADER_ID = gdv_order.GetFocusedRowCellValue("PO_HEADER_ID").ToString();
|
||
string SEGMENT1 = gdv_order.GetFocusedRowCellValue("SEGMENT1").ToString();
|
||
string CLOSED_CODE = gdv_order.GetFocusedRowCellValue("CLOSED_CODE").ToString();
|
||
this.txtSEGMENT1.Text = SEGMENT1;
|
||
txtPO_HEADER_ID.Text = PO_HEADER_ID;
|
||
|
||
txtCLOSED_CODE.Text = CLOSED_CODE;
|
||
|
||
Get_CUX_WMS_PO_LINES_ITF(int.Parse(PO_HEADER_ID));
|
||
|
||
}
|
||
|
||
private void ctrlButtons4_Click(object sender, EventArgs e)
|
||
{
|
||
DevExpress.Utils.WaitDialogForm loadForm = new DevExpress.Utils.WaitDialogForm("请稍后...", "正在查询数据");
|
||
|
||
Get_CUX_WMS_PO_HEADES_ITF(dt_Start.DateTime.ToString(), dt_End.DateTime.ToString());
|
||
|
||
|
||
loadForm.Dispose();
|
||
loadForm.Close();
|
||
|
||
}
|
||
|
||
private void ctrlButtons1_Click(object sender, EventArgs e)
|
||
{
|
||
if (this.txtSEGMENT1.Text == "")
|
||
{
|
||
return;
|
||
}
|
||
|
||
if (this.txtCLOSED_CODE.Text != "OPEN")
|
||
{
|
||
MessageBox.Show("采购单:" + this.txtSEGMENT1.Text + " 已关闭");
|
||
return ;
|
||
}
|
||
|
||
if (this.lookUpEdit1.EditValue == null || this.lookUpEdit1.EditValue.ToString() == "请选择")
|
||
{
|
||
MessageBox.Show("请选择字库编码");
|
||
return;
|
||
}
|
||
|
||
|
||
|
||
IBussFactory<WMS.Business.RK.BussWareNotice>.Instance().InsertOrderCgData(listOrderA,this.txtSEGMENT1.Text.Trim(), txtPO_HEADER_ID.Text.Trim(),this.lookUpEdit1.Text.Trim());
|
||
MessageBox.Show("操作完成");
|
||
}
|
||
|
||
private void gridView4_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e)
|
||
{
|
||
|
||
//if (gridView4.RowCount == 0)
|
||
//{
|
||
// return;
|
||
//}
|
||
//if (gridView4.FocusedRowHandle < 0)
|
||
//{
|
||
// return;
|
||
//}
|
||
//string PO_HEADER_ID = gdv_order.GetFocusedRowCellValue("PO_HEADER_ID").ToString();
|
||
DataTable dt = IBussFactory<BussCUX_WMS_PO_HEADES_ITF>.Instance().GetRKctl(this.txtSEGMENT1.Text);
|
||
gridControlCustom6.DataSource = dt;
|
||
}
|
||
|
||
private void ctrlButtons2_Click(object sender, EventArgs e)
|
||
{
|
||
Get_CUX_WMS_PO_RETURN_ITF();
|
||
}
|
||
}
|
||
}
|