/// 呼叫具体实现 /// <summary> /// 呼叫具体实现 /// </summary> /// <param name="phoneNum"></param> /// <param name="cdt"></param> private void MakeCall(string phoneNum, HollyContactHelper.ConDeviceType cdt, Action Success = null) { if (!Common.IsOldVersionContinue()) { return; } //定义回调事件 Action <object> callback = new Action <object>((x) => { ActCallOutResult = HollyContactHelper.Instance.ActCallOut(cdt, phoneNum); //测试代码 ==ActCallOutResult = false; ==测试代码 //记录外呼号码和事件 OutCallNumber = phoneNum; ActCallOutSuccess = Success; // 测试代码:ActCallOutResult = false; if (!ActCallOutResult) { //呼叫失败,自动休息 HollyContactHelper.Instance.RestStart(Main_BusyStatus); } else { OutCall(); } }); //置闲成功后调用 AfterToReadyCallBack(callback, "置闲后外呼"); }
/// 转接客服 /// <summary> /// 转接客服 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void dgvAgentList_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (NoCall) { return; } ConDeviceType = HollyContactHelper.ConDeviceType.分机号; OutNum = GetAgentNum(e.RowIndex); if (OutNum == "") { MessageBox.Show("分机号为空,不能转接"); cb_skill.Focus(); return; } DialogResult = System.Windows.Forms.DialogResult.OK; }
/// 转接技能组 /// <summary> /// 转接技能组 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnSkill_Click(object sender, EventArgs e) { if (NoCall) { return; } int sgid = GetSelectSKill(); if (sgid == -1) { MessageBox.Show("请选择一个技能组"); cb_skill.Focus(); return; } ConDeviceType = HollyContactHelper.ConDeviceType.技能组; OutNum = sgid.ToString(); DialogResult = System.Windows.Forms.DialogResult.OK; }
/// 外呼 /// <summary> /// 外呼 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void toolSbtnAgentMakeCall_Click(object sender, EventArgs e) { //预防代码进入 if (sender != null && !Common.IsOldVersionContinue()) { return; } Loger.Log4Net.Info("[Main] 点击按钮==外呼"); KeyBoard kform = new KeyBoard(); if (kform.ShowDialog() == System.Windows.Forms.DialogResult.OK) { string phoneNum = kform.ReturnNum; HollyContactHelper.ConDeviceType cdt = kform.ConDeviceType; //客户端呼出 BusinessProcess.OutBoundType = OutBoundTypeEnum.OT2_客户端呼出; //呼叫具体实现 MakeCall(phoneNum, cdt); } }
/// 转接客服 /// <summary> /// 转接客服 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnAgent_Click(object sender, EventArgs e) { if (NoCall) { return; } if (dgvAgentList.SelectedRows.Count > 0) { var row = dgvAgentList.SelectedRows[0]; ConDeviceType = HollyContactHelper.ConDeviceType.分机号; OutNum = GetAgentNum(row.Index); if (OutNum == "") { MessageBox.Show("分机号为空,不能转接"); cb_skill.Focus(); return; } DialogResult = System.Windows.Forms.DialogResult.OK; } else { MessageBox.Show("请先选择一个客服!"); } }