ReSetCheckBox.cs 762 B

12345678910111213141516171819202122232425262728293031
  1. using System.Windows.Forms;
  2. using UAS_MES_NEW.Entity;
  3. namespace UAS_MES_NEW.CustomControl.CustomCheckBox
  4. {
  5. public partial class ReSetCheckBox : CheckBox
  6. {
  7. DataOperate.DataHelper dh = SystemInf.dh;
  8. public ReSetCheckBox()
  9. {
  10. InitializeComponent();
  11. }
  12. private void ReSetCheckBox_Layout(object sender, LayoutEventArgs e)
  13. {
  14. if (dh != null)
  15. {
  16. if (dh.getFieldDataByCondition("Step", "st_ifreset", "st_code='" + User.CurrentStepCode + "'").ToString() == "-1")
  17. {
  18. Checked = true;
  19. }
  20. else
  21. {
  22. Checked = false;
  23. }
  24. }
  25. }
  26. }
  27. }