| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- 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 CtlIVRTurnagent : UserControl
- {
- IVRTurnagent _IVRTurnagent;
- public CtlIVRTurnagent(IVRTurnagent obj)
- {
- InitializeComponent();
- _IVRTurnagent = obj;
- this.Load += new EventHandler(CtlIVRTurnagent_Load);
- }
- void CtlIVRTurnagent_Load(object sender, EventArgs e)
- {
- this.tb_NodeID.Text = _IVRTurnagent.Pos;
- this.tb_NodeName.Text = _IVRTurnagent.Name;
- this.rtb_Note.Text = _IVRTurnagent.Note;
- cmb_HangupPos.DataSource = GlobalController.GetComBoBoxofIVR();
- this.cmb_HangupPos.DisplayMember = "Note";//2017-5-8将Name改为Note
- this.cmb_HangupPos.ValueMember = "ID";
- if (_IVRTurnagent.HangupPos != null)
- cmb_HangupPos.SelectedItem = _IVRTurnagent.HangupPos;
- this.cmb_FailPos.DataSource = GlobalController.GetComBoBoxofIVR();
- this.cmb_FailPos.DisplayMember = "Note";//2017-5-8将Name改为Note
- this.cmb_FailPos.ValueMember = "ID";
- if (_IVRTurnagent.FailPos != null)
- cmb_FailPos.SelectedItem = _IVRTurnagent.FailPos;
- this.cmb_successPos.DataSource= GlobalController.GetComBoBoxofIVR();
- this.cmb_successPos.DisplayMember = "Note";//2017-5-8将Name改为Note
- this.cmb_successPos.ValueMember = "ID";
- if (_IVRTurnagent.SuccessPos != null)
- cmb_successPos.SelectedItem = _IVRTurnagent.SuccessPos;
- this.tb_ExtenVar.Text = _IVRTurnagent.Exten;
- }
- private void btn_enter_Click(object sender, EventArgs e)
- {
- _IVRTurnagent.HangupPos = cmb_HangupPos.SelectedItem as IVRControlBase;
- _IVRTurnagent.SuccessPos = this.cmb_successPos.SelectedItem as IVRControlBase;
- _IVRTurnagent.FailPos = this.cmb_FailPos.SelectedItem as IVRControlBase;
- _IVRTurnagent.Pos = this.tb_NodeID.Text;
- _IVRTurnagent.Exten = this.tb_ExtenVar.Text;
- _IVRTurnagent.Name = this.tb_NodeName.Text;
- _IVRTurnagent.Note = this.rtb_Note.Text;
- //_IVRTurnagent .BandData =
- 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();
- }
- private void rtb_BindData_MouseDoubleClick(object sender, MouseEventArgs e)
- {
- FrmIVREdit frm = new FrmIVREdit(_IVRTurnagent.BandData);
- frm.Text = "转人工节点传输变量定义";
- if (frm.ShowDialog() == DialogResult.OK)
- {
- this.rtb_BindData.Text = frm.GetText();
- _IVRTurnagent.BandData = frm.Vars;
- }
- }
- }
- }
|