PopupChoiceGroup.cs 999 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. using Core.Mes.Client.Comm.Tool;
  2. using CoreFS.CA06;
  3. using System;
  4. using System.Windows.Forms;
  5. namespace Core.StlMes.Client.Qcm
  6. {
  7. public partial class PopupChoiceGroup : FrmBase
  8. {
  9. private string _groupNo;
  10. public string GroupNo
  11. {
  12. get { return _groupNo; }
  13. set { _groupNo = value; }
  14. }
  15. public PopupChoiceGroup(string[] groupNos)
  16. {
  17. InitializeComponent();
  18. ultraComboEditor1.DataSource = groupNos;
  19. if (ultraComboEditor1.Items.Count > 0)
  20. {
  21. ultraComboEditor1.SelectedIndex = 0;
  22. }
  23. }
  24. private void btnOk_Click(object sender, EventArgs e)
  25. {
  26. if (ultraComboEditor1.SelectedItem == null)
  27. {
  28. MessageUtil.ShowWarning("请选择组号!");
  29. return;
  30. }
  31. _groupNo = ultraComboEditor1.Text;
  32. this.DialogResult = DialogResult.OK;
  33. }
  34. }
  35. }