BaoKai_202508_Wms_Jingwang_.../WMS.FrmReport/FrmEc.cs

117 lines
3.5 KiB
C#
Raw Permalink Normal View History

2025-08-24 21:52:42 +08:00
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.Common;
using WMS.Frm.Base;
using WMS.Model.CK;
using WMS.Model.RK;
namespace WMS.FrmReport
{
public partial class FrmEc : FormBase
{
string plcId = "";
string type = "";
string locid = "";
String outstand = "";
public FrmEc()
{
InitializeComponent();
}
/// <summary>
/// 清空按钮
/// </summary>
public void Clear()
{
if (SystemCommon.ShowMessageBoxResultCancel("确定要删除任务吗?") == DialogResult.OK)
{
IBussFactory<Business.BussAutoRk>.Instance().DeleteEcxeData(plcId, type);
BindData();
}
}
private void ctrlButtons4_Click(object sender, EventArgs e)
{
if (locid.Trim().Length == 0)
{
SystemCommon.ShowInfoMessageBox("库位为空不能出库");
return;
}
if (SystemCommon.ShowMessageBoxResultCancel("确定要完成任务吗?") == DialogResult.OK)
{
IBussFactory<Business.BussAutoRk>.Instance().UpdateEcxeData(plcId, type, "2");
BindData();
}
}
private void gridView3_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e)
{
if (gridView3.RowCount > 0)
{
locid = gridView3.GetFocusedRowCellValue("LOCATION_ID").ToString();
plcId = gridView3.GetFocusedRowCellValue("PlcID").ToString();
type = "in";
}
}
void BindData()
{
DataTable ds = IBussFactory<Business.BussAutoRk>.Instance().GetexceData2();
if (ds != null)
{
List<PickingWaveGoodsModel> ckgoodsInfo = ConvertHelper<PickingWaveGoodsModel>.ConvertToList(ds);
bgc_outMx.DataSource = ckgoodsInfo;
}
//DataTable ds2 = IBussFactory<Business.BussAutoRk>.Instance().GetexceData();
//if (ds2 != null)
//{
// List<AutoRkGoodsInfo> RkgoodsInfo = ConvertHelper<AutoRkGoodsInfo>.ConvertToList(ds2);
// bindingSource1.DataSource = RkgoodsInfo;
//}
}
private void FrmEc_Load(object sender, EventArgs e)
{
BindData();
}
private void gdv_Kcmx_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e)
{
if (gdv_Kcmx.RowCount > 0)
{
plcId = gdv_Kcmx.GetFocusedRowCellValue("plcId").ToString();
locid = gdv_Kcmx.GetFocusedRowCellValue("LOC_ID").ToString();
//outstand= gdv_Kcmx.GetFocusedRowCellValue("outstand").ToString();
type = "out";
}
}
private void ctrlButtons2_Click(object sender, EventArgs e)
{
BindData();
}
private void ctrlButtons1_Click(object sender, EventArgs e)
{
if (SystemCommon.ShowMessageBoxResultCancel("确定要删除任务吗?") == DialogResult.OK)
{
IBussFactory<Business.BussAutoRk>.Instance().DeleteEcxeData(plcId, type);
BindData();
}
}
}
}