schangxiang@126.com
2025-09-04 9fcc7df37205632d94665af7fc7ea56650e79789
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
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;
 
namespace WMS.UI.Basic
{
    public partial class placeEdit : Form
    {
        public placeEdit(string ID,string name,int islock,int isfree,int enable,int types)
        {
            InitializeComponent();
            label_ID.Text = ID;
            label_name.Text = name;
            comboBox_lock.SelectedIndex = islock;
            comboBox_free.SelectedIndex = isfree;
            comboBox_enabel.SelectedIndex = enable;
            comboBox_type.SelectedIndex = types;
        }
 
        private void button_confirm_Click(object sender, EventArgs e)
        {
            DialogResult dr = MessageBox.Show("确认要修改库位吗", "库位编辑", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
            if (dr == DialogResult.OK)
            {
                WMS.yunneiWCS.position editPosition = new yunneiWCS.position();
                editPosition.positionId = Convert.ToInt64(label_ID.Text.Trim());
                editPosition.positionName=label_name.Text;
                editPosition.isLock=comboBox_lock.SelectedIndex==0?false:true;
                editPosition.isfree = comboBox_free.SelectedIndex == 0 ? false : true;
                editPosition.enable = comboBox_enabel.SelectedIndex == 0 ? false : true;
                editPosition.positionType =(byte)comboBox_type.SelectedIndex;
                string res = FLogin.wcsWcf.editPlace(editPosition);
                WMS.EnumDefine.messages ms = new WMS.EnumDefine.messages(res=="修改成功"?1:2, res);
                ms.Show();
                this.DialogResult = DialogResult.OK;
                this.Close();
            }
        }
 
        private void button_cancel_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}