| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- 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.Model;
- using HySoft.IVRFlowEditor.Utility;
- namespace HySoft.IVRFlowEditor.IVRControl
- {
- public partial class CtlIVRTransfeOut : UserControl
- {
- IVRTransfeOut _IVRTransfeOut;
- public CtlIVRTransfeOut(IVRTransfeOut obj)
- {
- InitializeComponent();
- _IVRTransfeOut = obj;
- this.Load += new EventHandler(CtlIVRTransfeOut_Load);
- }
- void CtlIVRTransfeOut_Load(object sender, EventArgs e)
- {
- this.cmb_CalleeNumType.DataSource = System.Enum.GetNames(typeof(NumberType));
- this.cmb_CalleeNumType.SelectedItem = _IVRTransfeOut.CalleeNumType.ToString();
- this.tb_NodeID.Text = _IVRTransfeOut.Pos;
- this.tb_NodeName.Text = _IVRTransfeOut.Name;
- this.rtb_Note.Text = _IVRTransfeOut.Note;
- this.cmb_CalleeNum.Text = _IVRTransfeOut.CalleeNum;
- this.tb_TimeOut.Text = _IVRTransfeOut.Timeout.ToString();
- this.cmb_successNextNode.DataSource = GlobalController.GetComBoBoxofIVR();
- this.cmb_successNextNode.DisplayMember = "Note";//2017-5-8将Name改为Note
- this.cmb_successNextNode.ValueMember = "ID";
- if (_IVRTransfeOut.SuccessPos != null)
- this.cmb_successNextNode.SelectedItem = _IVRTransfeOut.SuccessPos;
- this.cmb_failNextNode.DataSource = GlobalController.GetComBoBoxofIVR();
- this.cmb_failNextNode.DisplayMember = "Name";
- this.cmb_failNextNode.ValueMember = "ID";
- if (_IVRTransfeOut.FailPos != null)
- this.cmb_failNextNode.SelectedItem = _IVRTransfeOut.FailPos;
- }
- private void btn_enter_Click(object sender, EventArgs e)
- {
- _IVRTransfeOut.Name = tb_NodeName.Text;
- _IVRTransfeOut.Note = rtb_Note.Text;
- _IVRTransfeOut.CalleeNum = this.cmb_CalleeNum.Text;
- _IVRTransfeOut.CalleeNumType = (NumberType)Enum.Parse(typeof(NumberType), this.cmb_CalleeNumType.Text);
- _IVRTransfeOut.Timeout = Int32.Parse(this.tb_TimeOut.Text);
- if (this.cmb_successNextNode.SelectedItem != null)
- _IVRTransfeOut.SuccessPos = (this.cmb_successNextNode.SelectedItem as IVRControlBase);
- if (this.cmb_failNextNode.SelectedItem != null)
- _IVRTransfeOut.FailPos = (this.cmb_failNextNode.SelectedItem as IVRControlBase);
- 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 cmb_CalleeNumType_SelectedIndexChanged(object sender, EventArgs e)
- {
- GlobalController.BindComboBoxOFVar(this.cmb_CalleeNum, GlobalController.GetEnumByComBoBoxValueOFDesc<NumberType>(this.cmb_CalleeNumType.Text));
-
- }
- }
- }
|