/// 具体操作
        /// <summary>
        /// 具体操作
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="action"></param>
        /// <param name="oper"></param>
        private void ListenOper(object sender, ListenOperHandler action, OperForListen oper)
        {
            ItemUI ui = (sender as ToolStripMenuItem).Tag as ItemUI;

            if (ui != null && ui.data != null && !string.IsNullOrEmpty(ui.data.ExtensionNum) && ui.data.UserID > 0)
            {
                if (action(HollyContactHelper.ConDeviceType.客服工号, ui.data.agentDn))
                {
                    AgentTimeStateHelper.Instance.InsertListenAgentLog(oper, ui.data.UserID, ui.data.userName, ui.data.agentDn, ui.data.ExtensionNum, ui.data.CurrStatus);
                    switch (oper)
                    {
                    case OperForListen.强制签出:
                    case OperForListen.强制置忙:
                    case OperForListen.强制置闲:
                    case OperForListen.强拆:
                    {
                        ui.data.LockAgentLive(oper);
                        ShowData();
                    }
                    break;

                    case OperForListen.强插:
                        mianform.SetMainStatus(PhoneStatus.PS21_强插振铃);
                        break;

                    case OperForListen.监听:
                        mianform.SetMainStatus(PhoneStatus.PS19_监听振铃);
                        break;

                    case OperForListen.接管:
                        Main.Main_ConMonitor_Calltype = ui.data.AgentLive.CallDirection_Calltype;
                        break;
                    }
                }
                else
                {
                    MessageBox.Show(oper.ToString() + "失败!");
                }
            }
        }
Esempio n. 2
0
        /// 插入监控日志
        /// <summary>
        /// 插入监控日志
        /// </summary>
        /// <param name="AgentUserID"></param>
        /// <param name="ExtensionNum"></param>
        /// <param name="CurrentStatus"></param>
        /// <param name="CurrentOper"></param>
        /// <param name="Remark"></param>
        /// <returns></returns>
        public void InsertListenAgentLog(OperForListen CurrentOper, int AgentUserID, string AgentUserName, string AgentNum, string AgentExtensionNum, AgentStateForListen AgentStatus)
        {
            string remark = "监控人[{0} ({1})]<{2}>了在[{3}]状态的客服[{4} ({5})]";

            remark = string.Format(remark, LoginUser.TrueName, LoginUser.ExtensionNum, CurrentOper.ToString(), AgentStatus.ToString(), AgentUserName, AgentExtensionNum);
            agentService.InsertListenAgentLogAsync(CallRecordAuthorizeCode,
                                                   LoginUser.UserID.Value, LoginUser.TrueName, LoginUser.AgentNum, LoginUser.ExtensionNum, (int)CurrentOper,
                                                   AgentUserID, AgentUserName, AgentNum, AgentExtensionNum, (int)AgentStatus,
                                                   CCWebAgentTimeState.Vender.Holly, remark);
        }