123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- 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;
- namespace FileWatcher
- {
- 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;
- // MaCtl.Text = "";
- // BaseUtil.ShowError(ErrorMessage);
- //}
- }
- else
- {
- Checked = false;
- MaCtl.Text = "";
- BaseUtil.ShowError("工单号不能为空");
- }
- }
- else
- {
- MaCtl.Enabled = true;
- MaCtl.Focus();
- }
- }
- }
- }
|