Пример #1
0
        //public void SetChannelValues(VMuktiEventArgs e)
        //{
        //    int ChannelId = (Convert.ToInt32(e._args[e._args.Count - 1].ToString()) - 1);
        //    _DiallerChannel[ChannelId].CurrentPhoneNo = long.Parse(e._args[0].ToString());

        //    channel1.CurrentPhoneNo = long.Parse(e._args[0].ToString());
        //    channel1.StartDate = DateTime.Parse(e._args[1].ToString());
        //    channel1.StartTime = e._args[2].ToString();
        //    channel1.CurrentCampainID = CampaingID;
        // //   channel1.LeadID = long.Parse("1");
        //    channel1.ChannelID = "1";
        //    channel1.UserID = CurrentUserID;
        //    channel1.ConfID = long.Parse("1");
        //    channel1.IsDNC = false;
        //    channel1.IsGlobal = false;
        //    //  channel1.DispositionID = long.Parse("1");
        // //   channel1.CallNote = "Hello";
        //}

        public void SetDisposition(VMuktiEventArgs e)
        {
            //if (ActiveChannel.CurrentDialStatus == "Automatic")
            //{
            int channelNo = int.Parse(e._args[4].ToString());

            ActiveChannel = _DiallerChannel[channelNo];

            ActiveChannel.DispositionID = long.Parse(e._args[0].ToString());
            ActiveChannel.CallNote      = e._args[1].ToString();
            int  tmpID     = -1;
            long parCallID = 0;

            if (ActiveChannel.DispositionID == 6)
            {
                ActiveChannel.IsDNC = false;
                clsDataService.User_Save(out parCallID, ActiveChannel.LeadID, ActiveChannel.CalledDate, ActiveChannel.StartDate, DateTime.Parse(ActiveChannel.StartTime), long.Parse(ActiveChannel.CallDuration.ToString()), ActiveChannel.DispositionID, ActiveChannel.CurrentCampainID, ActiveChannel.ConfID, ActiveChannel.CallNote, ActiveChannel.IsDNC, ActiveChannel.IsGlobal, ActiveChannel.UserID, "");
                clsDataService.SetCallBackNo(parCallID, ActiveChannel.LeadID, ActiveChannel.CallNote, DateTime.Parse(e._args[3].ToString()), bool.Parse(e._args[2].ToString()), false);
            }
            else if (ActiveChannel.DispositionID == 11)
            {
                ActiveChannel.IsDNC = true;
                clsDataService.User_Save(out parCallID, ActiveChannel.LeadID, ActiveChannel.CalledDate, ActiveChannel.StartDate, DateTime.Parse(ActiveChannel.StartTime), long.Parse(ActiveChannel.CallDuration.ToString()), ActiveChannel.DispositionID, ActiveChannel.CurrentCampainID, ActiveChannel.ConfID, ActiveChannel.CallNote, ActiveChannel.IsDNC, ActiveChannel.IsGlobal, ActiveChannel.UserID, "");
                clsDataService.UpdateDNCStatus(ActiveChannel.LeadID, ActiveChannel.UserID, true);
            }
            else
            {
                clsDataService.User_Save(out parCallID, ActiveChannel.LeadID, ActiveChannel.CalledDate, ActiveChannel.StartDate, DateTime.Parse(ActiveChannel.StartTime), long.Parse(ActiveChannel.CallDuration.ToString()), ActiveChannel.DispositionID, ActiveChannel.CurrentCampainID, ActiveChannel.ConfID, ActiveChannel.CallNote, ActiveChannel.IsDNC, ActiveChannel.IsGlobal, ActiveChannel.UserID, "");
            }
            ActiveChannel.CallResult = ClsChannel.CallStatus.NotInCall;
            ActiveChannel.StartTime  = PredictiveDialler.Common.ClsConstants.NullString;
        }
Пример #2
0
        public void SetDisposition(VMuktiAPI.VMuktiEventArgs e)
        {
            try
            {
                if (ActiveChannel.CurrentDialStatus == "Automatic")
                {
                    ActiveChannel.DispositionID = long.Parse(e._args[0].ToString());
                    ActiveChannel.CallNote      = e._args[1].ToString();

                    long parCallID = 0;

                    if (ActiveChannel.DispositionID == 6)
                    {
                        ActiveChannel.IsDNC = false;
                        clsDataService.User_Save(out parCallID, ActiveChannel.LeadID, ActiveChannel.CalledDate, ActiveChannel.StartDate, DateTime.Parse(ActiveChannel.StartTime), long.Parse(ActiveChannel.CallDuration.ToString()), ActiveChannel.DispositionID, ActiveChannel.CurrentCampainID, ActiveChannel.ConfID, ActiveChannel.CallNote, ActiveChannel.IsDNC, ActiveChannel.IsGlobal, ActiveChannel.UserID, ActiveChannel.RecordedFileName);
                        clsDataService.SetCallBackNo(parCallID, ActiveChannel.LeadID, ActiveChannel.CallNote, DateTime.Parse(e._args[3].ToString()), bool.Parse(e._args[2].ToString()), false);
                    }
                    else if (ActiveChannel.DispositionID == 11)
                    {
                        ActiveChannel.IsDNC = true;
                        clsDataService.User_Save(out parCallID, ActiveChannel.LeadID, ActiveChannel.CalledDate, ActiveChannel.StartDate, DateTime.Parse(ActiveChannel.StartTime), long.Parse(ActiveChannel.CallDuration.ToString()), ActiveChannel.DispositionID, ActiveChannel.CurrentCampainID, ActiveChannel.ConfID, ActiveChannel.CallNote, ActiveChannel.IsDNC, ActiveChannel.IsGlobal, ActiveChannel.UserID, ActiveChannel.RecordedFileName);
                        clsDataService.UpdateDNCStatus(ActiveChannel.LeadID, ActiveChannel.UserID, true);
                    }
                    else
                    {
                        clsDataService.User_Save(out parCallID, ActiveChannel.LeadID, ActiveChannel.CalledDate, ActiveChannel.StartDate, DateTime.Parse(ActiveChannel.StartTime), long.Parse(ActiveChannel.CallDuration.ToString()), ActiveChannel.DispositionID, ActiveChannel.CurrentCampainID, ActiveChannel.ConfID, ActiveChannel.CallNote, ActiveChannel.IsDNC, ActiveChannel.IsGlobal, ActiveChannel.UserID, ActiveChannel.RecordedFileName);
                    }
                    ActiveChannel.CallResult = ClsChannel.CallStatus.NotInCall;
                    ActiveChannel.StartTime  = Dialer_AutoProgressive.Common.ClsConstants.NullString;
                }
            }
            catch (Exception ex)
            {
                VMuktiHelper.ExceptionHandler(ex, "SetDisposition()", "ClsChannelManager.cs");
            }
        }