| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- 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;
- using HySoft.IVRFlowEditor.Model;
- namespace HySoft.IVRFlowEditor.IVRControl
- {
- public partial class CtlIVRQueue : UserControl
- {
- IVRQueue _IVRQueue;
- public CtlIVRQueue(IVRQueue obj)
- {
- InitializeComponent();
- _IVRQueue = obj;
- this.Load += new EventHandler(CtlIVRQueue_Load);
- }
- void CtlIVRQueue_Load(object sender, EventArgs e)
- {
- this.tb_NodeID.Text = _IVRQueue.Pos;
- this.tb_NodeName.Text = _IVRQueue.Name;
- this.rtb_Note.Text = _IVRQueue.Note;
- cmb_HangupPos.DataSource = GlobalController.GetComBoBoxofIVR();
- this.cmb_HangupPos.DisplayMember = "Note";//2017-5-8将Name改为Note
- this.cmb_HangupPos.ValueMember = "ID";
- if (_IVRQueue.HangupPos != null)
- cmb_HangupPos.SelectedItem = _IVRQueue.HangupPos;
- this.cmb_NoAgentPos.DataSource = GlobalController.GetComBoBoxofIVR();
- this.cmb_NoAgentPos.DisplayMember = "Note";//2017-5-8将Name改为Note
- this.cmb_NoAgentPos.ValueMember = "ID";
- if (_IVRQueue.NoAgentPos != null)
- cmb_NoAgentPos.SelectedItem = _IVRQueue.NoAgentPos;
- this.cmb_NoFreePos.DataSource = GlobalController.GetComBoBoxofIVR();
- this.cmb_NoFreePos.DisplayMember = "Note";//2017-5-8将Name改为Note
- this.cmb_NoFreePos.ValueMember = "ID";
- if (_IVRQueue.NoFreePos != null)
- cmb_NoFreePos.SelectedItem = _IVRQueue.NoFreePos;
- this.cmb_successPos.DataSource = GlobalController.GetComBoBoxofIVR();
- this.cmb_successPos.DisplayMember = "Note";//2017-5-8将Name改为Note
- this.cmb_successPos.ValueMember = "ID";
- if (_IVRQueue.SuccessPos != null)
- cmb_successPos.SelectedItem = _IVRQueue.SuccessPos;
- GlobalController.BindComBoBoxOfEnumDesc(this.cmb_GroupType, _IVRQueue.GroupType);
- GlobalController.BindComBoBoxOfEnumDesc(this.cmb_Strategy, _IVRQueue.Strategy);
- GlobalController.BindComBoBoxOfEnumDesc(this.cmb_VipLevelType, _IVRQueue.VipLevelType);
- this.tb_Group.Text = _IVRQueue.Group;
- this.tb_VipLevel.Text = _IVRQueue.VipLevel;
- this.tb_ExtenVar.Text = _IVRQueue.ExtenVar;
- this.tb_AgentVar.Text = _IVRQueue.AgentVar;
- }
- private void btn_enter_Click(object sender, EventArgs e)
- {
- _IVRQueue.Pos = this.tb_NodeID.Text;
- _IVRQueue.Name = this.tb_NodeName.Text;
- _IVRQueue.Note = this.rtb_Note.Text;
- _IVRQueue.HangupPos = cmb_HangupPos.SelectedItem as IVRControlBase;
- _IVRQueue.SuccessPos = this.cmb_successPos.SelectedItem as IVRControlBase;
- _IVRQueue.NoAgentPos = this.cmb_NoAgentPos.SelectedItem as IVRControlBase;
- _IVRQueue.NoFreePos = this.cmb_NoFreePos.SelectedItem as IVRControlBase;
- _IVRQueue.VipLevelType = GlobalController.GetEnumByComBoBoxValueOFDesc<NumberType>(this.cmb_VipLevelType.Text);
- _IVRQueue.GroupType = GlobalController.GetEnumByComBoBoxValueOFDesc<NumberType>(this.cmb_GroupType.Text);
- _IVRQueue.Strategy = GlobalController.GetEnumByComBoBoxValueOFDesc<StrategyType>(this.cmb_Strategy.Text);
- _IVRQueue.Group = this.tb_Group.Text;
- _IVRQueue.VipLevel = this.tb_VipLevel.Text;
- _IVRQueue.ExtenVar = this.tb_ExtenVar.Text;
- _IVRQueue.AgentVar = this.tb_AgentVar.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();
- }
- }
- }
|