using Sunny.UI; using sunui.forms; 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.Model; using WMS.Untils; namespace WMS.UI.SynthesizeQuery { public partial class FrmPangLuGongWei : UIForm { private string _sourceStation = string.Empty; private string _materialCode = ""; private string _materialName = ""; private int _taskId = 0; public FrmPangLuGongWei(int taskId, string sourceStation, string materialCode, string materialName) { InitializeComponent(); _sourceStation = sourceStation; _materialCode = materialCode; _materialName = materialName; this.lbl_SourceStation.Text = sourceStation; _taskId = taskId; this.lbl_materialCode.Text = materialCode; this.lbl_materialName.Text = materialName; } private void LoadItemType() { List itemList = new List(); itemList.Add(new ListItem() { Text = "1-39-1", Value = "1-39-1" }); itemList.Add(new ListItem() { Text = "2-39-1", Value = "2-39-1" }); itemList.Add(new ListItem() { Text = "1-0-1", Value = "1-0-1" }); itemList.Add(new ListItem() { Text = "2-0-1", Value = "2-0-1" }); foreach (var item in itemList) { this.cmb_outStorePosition.Items.Add(item); } cmb_outStorePosition.SelectedIndex = 0; } private void FrmHandOutStore_Load(object sender, EventArgs e) { LoadItemType(); } private void button_confirm_Click(object sender, EventArgs e) { ListItem selProFlag = null; var midStorePosition = ComboBoxHelper.GetComboxSelectValue(this.cmb_outStorePosition, ref selProFlag); if (string.IsNullOrEmpty(midStorePosition)) { ShowErrorTip("请选择入库口!"); return; } DialogResult dr = MessageBox.Show("您确定要下发任务吗", "旁路工位下发任务", MessageBoxButtons.OKCancel, MessageBoxIcon.Question); if (dr == DialogResult.OK) { using (yunneiWCS.IyunneiWcfClient client = new yunneiWCS.IyunneiWcfClient()) { var result = client.IssueTaskForPangLuGongWei(_taskId, midStorePosition); if (result.result) { ShowSuccessTip(result.resMsg); this.Close(); } else { ShowErrorTip(result.resMsg); } } } } private void button_cancel_Click(object sender, EventArgs e) { this.Close(); } } }