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 WMS.Frm.Base; using WMS.Model.RK; using WMS.Common; using DevExpress.XtraEditors.Repository; using DevExpress.XtraReports.UI; using WMS.Ctrl; using WMS.FrmBaseData; using System.Threading; using WMS.Model.Base; using WMS.Model.Stock; using WMS.Business.RK; using WMS.Business; using WMS.Model; using System.Configuration; using System.Net; using WMS.Business.Base; using System.Net.Sockets; using DevExpress.Utils.DirectXPaint; namespace WMS.FrmRK { public partial class FrmAutoOnGoods : FormBase { string instand = "0"; /// /// 主要用于反原点 /// string ScInsand = "0"; /// /// 上架的明细 /// List LotGoodsData = new List(); /// /// 当前上架的数据 /// List goodsUp = new List(); /// /// 查询wms订单数据 /// //List goodsProductData = new List(); public FrmAutoOnGoods() { InitializeComponent(); ThreadExceptionDialog.CheckForIllegalCrossThreadCalls = false; DevExpress.Data.CurrencyDataController.DisableThreadingProblemsDetection = true; } private void FrmOnGoods_Load(object sender, EventArgs e) { #region 加载数据 try { RkData(); } catch (Exception ex) { } #endregion } //List dataIn = new List(); private void RkData() { List onListData = WMS.Business.IBussFactory.Instance().GetUpShelfGoodsData(); if (onListData != null) { bgcrkmx.DataSource = onListData; } } string ctl = ""; string plcId = ""; private void ctrlButtons1_Click(object sender, EventArgs e) { } private void ctrlButtons4_Click(object sender, EventArgs e) { RkData(); } private void gridView2_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e) { if (gridView2.RowCount > 0) { plcId = gridView2.GetFocusedRowCellValue("PlcID").ToString(); ctl = gridView2.GetFocusedRowCellValue("CTL").ToString(); } } private void ctrlButtons3_Click(object sender, EventArgs e) { ////删除 //if (SystemCommon.ShowMessageBoxResult("确定选择删除任务号:" + plcId + " 入库任务吗?") == DialogResult.OK) //{ // IBussFactory.Instance().DeleteEcxeData(plcId, "in"); //} if (ctl.Trim().Length == 0) { return; } if (SystemCommon.ShowMessageBoxResult("确定选择删除任务号:" + plcId + " 入库任务吗?") == DialogResult.OK) { string err = WMS.Business.IBussFactory.Instance().DeleteTaskData(ctl); if (err.Trim().Length > 0) { SystemCommon.ShowInfoMessageBox("删除失败" + err); return; } RkData(); SystemCommon.ShowInfoMessageBox("删除成功"); ctl = ""; } } private void ctrlButtons2_Click(object sender, EventArgs e) { if (SystemCommon.ShowMessageBoxResult("确定手动完成任务号:" + plcId + " 入库吗?") == DialogResult.OK) { IBussFactory.Instance().UpdateEcxeData(plcId, "in", "2"); RkData(); SystemCommon.ShowInfoMessageBox("入库任务确认完成成功"); } } private void ctrlButtons5_Click(object sender, EventArgs e) { if (SystemCommon.ShowMessageBoxResult("确定对任务号:" + plcId + " 状态初始化吗?") == DialogResult.OK) { IBussFactory.Instance().UpdateEcxeData(plcId, "in", "0"); RkData(); SystemCommon.ShowInfoMessageBox("入库任务初始化成功"); } } } }