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