Ejemplo n.º 1
0
        async private void Btn_apply_Click(object sender, EventArgs e)
        {
            string res = "";

            if (string.IsNullOrEmpty(cb_type_no.SelectedItem.ToString()))
            {
                MessageBox.Show("零件号不能为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
            if (rdb_type_no.CheckState == CheckState.Checked)
            {
                res = await mesService.CommitTypeStationAsync(GetProductTypeNumOfStation());
            }
            else if (rdb_sn.CheckState == CheckState.Checked)
            {
                //按二维码设置站位
            }
            if (res == "0")
            {
                MessageBox.Show("更新失败!");
            }
            else if (res == "1")
            {
                MessageBox.Show("更新成功!");
            }
            else
            {
                MessageBox.Show("更新状态:" + res);
            }
        }