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(); } /// /// 清空按钮 /// public void Clear() { if (SystemCommon.ShowMessageBoxResultCancel("确定要删除任务吗?") == DialogResult.OK) { IBussFactory.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.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.Instance().GetexceData2(); if (ds != null) { List ckgoodsInfo = ConvertHelper.ConvertToList(ds); bgc_outMx.DataSource = ckgoodsInfo; } //DataTable ds2 = IBussFactory.Instance().GetexceData(); //if (ds2 != null) //{ // List RkgoodsInfo = ConvertHelper.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.Instance().DeleteEcxeData(plcId, type); BindData(); } } } }