예제 #1
0
        public bool InvokeTransferPhone(int phoneType, string phoneNo, string message)
        {
            bool result = false;

            if (CloseForCountdown)
            {
                //当前窗口和电话不对应
                MessageBoxAdapter.ShowError("当前窗口马上将自动关闭,无法响应您的操作");
                return(result);
            }


            if (MakeCall != null)
            {
                MakeCallEventArgs tpe = new MakeCallEventArgs {
                    CallServiceId = PageData.CallServiceId, Uuid = PageData.UuidOfIPCC, PhoneType = phoneType, PhoneNo = phoneNo, Message = message
                };
                MakeCall(this, tpe);
                if (!tpe.Cancel)
                {
                    //没有取消,则记录日志
                    result = true;
                }
            }
            return(result);
        }
예제 #2
0
        public bool InvokeTransferPhone(int phoneType, string phoneNo, string message)
        {
            bool result = false;

            if (MakeCall != null)
            {
                if (EnvironmentVar.DialBackFlag == "1")
                {
                    MessageBoxAdapter.ShowInfo("请用手机或者其余的座机进行回拨");
                    return(false);
                }

                //if (!TheMotherWin.isSignInToIPCC)
                //{
                //    MessageBoxAdapter.ShowInfo("请确保已登录到IPCC或座席处于空闲状态!");
                //    return false;
                //}

                if (phoneType == 98)
                {
                    //回拨老人电话
                    frmCallsDialog calldialog = new frmCallsDialog();
                    object         oRets      = webBrowser.Document.InvokeScript("getServiceObjectPhoneNos", new object[] { PageData.CallServiceId.ToString() });
                    if (oRets != null && oRets.ToString() != "[]")
                    {
                        List <string> phoneNos = JsonConvert.DeserializeObject <List <string> >(oRets.ToString());
                        calldialog.PhoneNos     = phoneNos;
                        calldialog.ChooseCallNo = phoneNo;
                    }
                    if (calldialog.PhoneNos != null && calldialog.PhoneNos.Count > 1)
                    {
                        calldialog.ShowDialog();
                        if (calldialog.DialogResult == System.Windows.Forms.DialogResult.OK)
                        {
                            phoneNo = calldialog.ChooseCallNo;
                        }
                        else
                        {
                            //主动撤销
                            return(false);
                        }
                    }
                }
                MakeCallEventArgs tpe = new MakeCallEventArgs {
                    CallServiceId = PageData.CallServiceId, Uuid = PageData.UuidOfIPCC, PhoneType = phoneType, PhoneNo = phoneNo, Message = message
                };
                MakeCall(this, tpe);
                if (!tpe.Cancel)
                {
                    //没有取消,则记录日志
                    result = true;
                }
            }
            return(result);
        }