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(); } } }