| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Drawing;
- using System.Data;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- using UAS_MES.PublicMethod;
- namespace UAS_MES.CustomControl.CustomCheckBox
- {
- public partial class LockCheckBox : CheckBox
- {
- /// <summary>
- /// 存放工单的控件
- /// </summary>
- Control MaCtl;
- public LockCheckBox()
- {
- InitializeComponent();
- }
- public void GetMakeCodeCtl(Control ctl)
- {
- MaCtl = ctl;
- }
- public void LockCheckBox_CheckedChanged(object sender, EventArgs e)
- {
- if (Checked)
- {
- if (MaCtl.Text != "")
- {
- string ErrorMessage;
- if (LogicHandler.CheckMakeStatus(MaCtl.Text, out ErrorMessage))
- MaCtl.Enabled = false;
- else
- {
- Checked = false;
- BaseUtil.ShowError(ErrorMessage);
- }
- }
- else
- {
- Checked = false;
- BaseUtil.ShowError("工单号不能为空");
- }
- }
- else {
- MaCtl.Enabled = true;
- MaCtl.Focus();
- }
- }
- }
- }
|