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