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
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 placeEditForLock : Form
    {
        public placeEditForLock(string ID, string name, int islock, string remark,string lastModifier,string LastModifyTime)
        {
            InitializeComponent();
            label_ID.Text = ID;
            label_name.Text = name;
            textBox_remark.Text = remark;
            comboBox_lock.SelectedIndex = islock;
            tb_lastModifier.Text = lastModifier;
            tb_LastModifyTime.Text = LastModifyTime;
        }
 
        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());
                var postionName = label_name.Text;
                bool isLock = comboBox_lock.SelectedIndex == 0 ? false : true;
                var lockRemark = textBox_remark.Text;
                var lockUser = FLogin.user.UserName;//登陆人
 
                var res = FLogin.wcsWcf.unlockAndLockPosition(isLock, postionName, lockRemark, lockUser);
                WMS.EnumDefine.messages ms = new WMS.EnumDefine.messages(res.status == 200 ? 1 : 2, res.status == 200 ? "修改成功" : "修改失败");
                ms.Show();
                this.DialogResult = DialogResult.OK;
                this.Close();
            }
        }
 
        private void button_cancel_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}