Ejemplo n.º 1
0
 private void PhoneCallStart(CallViewBarEvents.PhoneCallStart.CallLogBar e)
 {
     CallLogBarParams = new CallLogArgs()  {
         ContactId = e.PhoneCallArgs.ContactId,
         ContactNo = e.PhoneCallArgs.ContactNo,
         CallMethod = e.PhoneCallArgs.CallMethod
     };
     ContactPerson = e.PhoneCallArgs.ContactPerson;
     this.InitiatePhoneCall();
 }
Ejemplo n.º 2
0
        private void PhoneCallAttempt(CallViewBarEvents.PhoneCallAttempt e)
        {
            if (m_CampaignBookingModule != null)
                m_CampaignBookingModule.m_oCallViewBar_CallAttemptMade();

            if (m_CampaignListModule != null)
                m_CampaignListModule.CallAttemptMade();
        }
Ejemplo n.º 3
0
        private void PhoneCallStart(CallViewBarEvents.PhoneCallStart.FrmSalesConsultant e)
        {
            m_oCallLogBar.Visible = true;
            m_oCallViewBar.Visible = false;
            m_oCallLogRemarksBar.Visible = true;
            m_oFollowUpBar.Visible = false;

            //m_oCallLogRemarksBar.CallMethod = m_oCallLogBar.CallLogBarParams.CallMethod;
            //m_oCallLogRemarksBar.ContactPerson = e.ContactPerson;
            //m_oCallLogRemarksBar.LoadContactPerson();

            //m_oCallLogBar.CallLogBarParams = new FrmSalesConsultant.CallLogArgs()
            //{
            //    ContactId = e.ContactId,
            //    ContactNo = e.ContactNo
            //};
            //m_oCallLogBar.CallLogBarParams.CallMethod = e.CallMethod;

            //m_oCallLogBar.ContactPerson = e.ContactPerson;
            //m_oCallLogBar.InitiatePhoneCall();

            #region Log
            var m_efDbContext = new BrightPlatformEntities(UserSession.EntityConnection);
            audio_settings _item = m_efDbContext.audio_settings.FirstOrDefault(i => i.user_id == UserSession.CurrentUser.UserId);
            var log = BrightSalesFacade.Logger;

            log.SetLogField(LoggingField.called_number, e.PhoneCallArgs.ContactNo);
            log.SetLogField(LoggingField.called_number_type, e.PhoneCallArgs.CallMethod.GetEnumDescription());

            if (_item != null && _item.mode == 0) {
                log.SetLogField(LoggingField.call_engine, "ozeki");
                m_BrightSalesProperty.CommonProperty.CallModeAudioSettings = 0;
            }
            else {
                log.SetLogField(LoggingField.call_engine, "external");
            }

            user u = m_efDbContext.users.FirstOrDefault(i => i.id == UserSession.CurrentUser.UserId);
            sip_accounts sip = m_efDbContext.sip_accounts.FirstOrDefault(i => i.id == u.sip_id);

            int iTotalWidthTab = this.Width;
            string CallingDetails = string.Format("{0}({1}) -> {2}       Activity: Calling {0}.      Account: {3} ", e.PhoneCallArgs.ContactNo, e.PhoneCallArgs.CallMethod.GetEnumDescription(), e.PhoneCallArgs.ContactNo.ToSwedishPhoneNumber(), sip.username);

            if (iTotalWidthTab < 1600)
            {

            }
            else
            {
                int iTotalWidth = 0;
                Size tabSize;
                for (int i = 0; i < tcSalesConsultant.TabPages.Count; i++)
                {
                    if (tcSalesConsultant.TabPages[i].PageVisible)
                    {
                        tabSize = TextRenderer.MeasureText(tcSalesConsultant.TabPages[i].Text, tcSalesConsultant.Font);
                        iTotalWidth += tabSize.Width + 20;
                    }
                }

                int iDiff = (iTotalWidthTab - iTotalWidth);

                Size s = TextRenderer.MeasureText(CallingDetails, tcSalesConsultant.Font);
                int iSpaceWidth = 10;
                CallingDetails += new string(' ', int.Parse((Math.Ceiling(double.Parse((iDiff / iSpaceWidth).ToString()))).ToString()) + 50);
            }

            tcSalesConsultant.CustomHeaderButtons[0].Caption = CallingDetails;
            tcSalesConsultant.CustomHeaderButtons[0].Visible = true;
            log.SendInfo("call_start", "call details");
            #endregion
        }
Ejemplo n.º 4
0
 private void PhoneCallStart(CallViewBarEvents.PhoneCallStart.CallLogRemarks e)
 {
     CallMethod = e.PhoneCallArgs.CallMethod;
     ContactPerson = e.PhoneCallArgs.ContactPerson;
     this.LoadContactPerson();
 }