ivr流程编辑器

CtlIVRCancelQueue.cs 2.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Drawing;
  5. using System.Data;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9. using HySoft.IVRFlowEditor.IVRControlUtility;
  10. using HySoft.IVRFlowEditor.Utility;
  11. namespace HySoft.IVRFlowEditor.IVRControl
  12. {
  13. public partial class CtlIVRCancelQueue : UserControl
  14. {
  15. IVRCancelQueue _IVRCancelQueue;
  16. public CtlIVRCancelQueue(IVRCancelQueue obj)
  17. {
  18. InitializeComponent();
  19. _IVRCancelQueue = obj;
  20. this.Load += new EventHandler(CtlIVRCancelQueue_Load);
  21. }
  22. void CtlIVRCancelQueue_Load(object sender, EventArgs e)
  23. {
  24. this.cmb_NextNode.DataSource = null;
  25. this.tb_NodeID.Text = _IVRCancelQueue.Pos;
  26. this.tb_NodeName.Text = _IVRCancelQueue.Name;
  27. this.rtb_Note.Text = _IVRCancelQueue.Note;
  28. this.cmb_NextNode.DataSource = GlobalController.GetComBoBoxofIVR();
  29. this.cmb_NextNode.DisplayMember = "Note";//2017-5-8将Name改为Note
  30. this.cmb_NextNode.ValueMember = "ID";
  31. if (_IVRCancelQueue.Next != null)
  32. this.cmb_NextNode.SelectedItem = _IVRCancelQueue.Next;
  33. this.rtb_Reason.Text = _IVRCancelQueue.Reason;
  34. }
  35. private void btn_enter_Click(object sender, EventArgs e)
  36. {
  37. _IVRCancelQueue.Name = tb_NodeName.Text;
  38. _IVRCancelQueue.Note = rtb_Note.Text;
  39. if (this.cmb_NextNode.SelectedItem != null)
  40. _IVRCancelQueue.Next = (this.cmb_NextNode.SelectedItem as IVRControlBase);
  41. this._IVRCancelQueue.Reason = this.rtb_Reason.Text;
  42. this.FindForm().DialogResult = DialogResult.OK;
  43. this.FindForm().Close();
  44. }
  45. private void btn_cancel_Click(object sender, EventArgs e)
  46. {
  47. this.FindForm().DialogResult = DialogResult.No;
  48. this.FindForm().Close();
  49. }
  50. }
  51. }