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 HySoft.IVRFlowEditor.IVRControlUtility; using HySoft.IVRFlowEditor.Utility; namespace HySoft.IVRFlowEditor.IVRControl { public partial class CtlIVRCancelQueue : UserControl { IVRCancelQueue _IVRCancelQueue; public CtlIVRCancelQueue(IVRCancelQueue obj) { InitializeComponent(); _IVRCancelQueue = obj; this.Load += new EventHandler(CtlIVRCancelQueue_Load); } void CtlIVRCancelQueue_Load(object sender, EventArgs e) { this.cmb_NextNode.DataSource = null; this.tb_NodeID.Text = _IVRCancelQueue.Pos; this.tb_NodeName.Text = _IVRCancelQueue.Name; this.rtb_Note.Text = _IVRCancelQueue.Note; this.cmb_NextNode.DataSource = GlobalController.GetComBoBoxofIVR(); this.cmb_NextNode.DisplayMember = "Note";//2017-5-8将Name改为Note this.cmb_NextNode.ValueMember = "ID"; if (_IVRCancelQueue.Next != null) this.cmb_NextNode.SelectedItem = _IVRCancelQueue.Next; this.rtb_Reason.Text = _IVRCancelQueue.Reason; } private void btn_enter_Click(object sender, EventArgs e) { _IVRCancelQueue.Name = tb_NodeName.Text; _IVRCancelQueue.Note = rtb_Note.Text; if (this.cmb_NextNode.SelectedItem != null) _IVRCancelQueue.Next = (this.cmb_NextNode.SelectedItem as IVRControlBase); this._IVRCancelQueue.Reason = this.rtb_Reason.Text; this.FindForm().DialogResult = DialogResult.OK; this.FindForm().Close(); } private void btn_cancel_Click(object sender, EventArgs e) { this.FindForm().DialogResult = DialogResult.No; this.FindForm().Close(); } } }