| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- 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;
- using UAS_MES.CustomControl.TextBoxWithIcon;
- namespace UAS_MES.CustomControl.CustomCheckBox
- {
- public partial class LockCheckBox : CheckBox
- {
- /// <summary>
- /// 存放工单的控件
- /// </summary>
- MaCodeSearchTextBox MaCtl;
- bool LeaveEvent1;
- public bool LeaveEvent
- {
- get
- {
- return LeaveEvent1;
- }
- set
- {
- LeaveEvent1 = value;
- }
- }
- public LockCheckBox()
- {
- InitializeComponent();
- }
- public void GetMakeCodeCtl(MaCodeSearchTextBox ctl)
- {
- MaCtl = ctl;
- }
- private void LockCheckBox_CheckStateChanged(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();
- }
- }
- }
- }
|