schangxiang@126.com
2025-07-30 a16904bd86f89e97a5e507e08003506c5dd8642e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
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<ListItem> itemList = new List<ListItem>();
            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();
        }
 
    }
}