Exemple #1
0
        /// <summary>
        /// The purpose of this method is to add a packet to the audio stream.
        /// The packet has not yet been decoded.
        /// </summary>
        /// <param name="rawRtpBytes">raw bytes from the packet</param>
        /// <returns>ToneDetected enum indicating if any tones were detected</returns>
        public ToneDetected AddPacket(byte [] rawRtpBytes)
        {
            ToneDetected retval;

            byte []    bytes;
            RTPDecoder rtpDecoder;

            retval = ToneDetected.NONE;

            if (doRecordStream)
            {
                bytes = BitConverter.GetBytes(rawRtpBytes.Length);
                recordStream.Write(bytes, 0, bytes.Length);
                recordStream.Write(rawRtpBytes, 0, rawRtpBytes.Length);
            }

            try
            {
                rtpDecoder = new RTPDecoder(rawRtpBytes);
                if ((rtpDecoder.DecodedPayload != null) && (rtpDecoder.DecodedPayload.Length > 0))
                {
                    retval = audioStream.Add(rtpDecoder.DecodedPayload);
                }
            }
            catch (InvalidRTPPacketException invalidRTPPacketException)
            {
                invalidRTPPacketException.Data.Add("My Key", "VMukti--:--VmuktiModules--:--VmuktiModules--:--Call Center--:--ToneDetect--:--ToneDetect.Business--:--AudioStreamState.cs--:--InvalidRTPPacketException()--");
                ClsException.LogError(invalidRTPPacketException);
                ClsException.WriteToErrorLogFile(invalidRTPPacketException);
            }

            return(retval);
        }
Exemple #2
0
 public override bool MapData(DataRow row)
 {
     try
     {
         ID         = GetLong(row, "ID");
         FilterName = GetString(row, "FilterName");
         return(base.MapData(row));
     }
     catch (Exception ex)
     {
         ex.Data.Add("My Key", "VMukti--:--VmuktiModules--:--Call Center--:--ImportLeads--:--ImportLeads.Business--:--ClsFilter.cs--:--MapData(DataRow)--");
         ClsException.LogError(ex);
         ClsException.WriteToErrorLogFile(ex);
         System.Text.StringBuilder sb = new StringBuilder();
         sb.AppendLine(ex.Message);
         sb.AppendLine();
         sb.AppendLine("StackTrace : " + ex.StackTrace);
         sb.AppendLine();
         sb.AppendLine("Location : " + ex.Data["My Key"].ToString());
         sb.AppendLine();
         sb1 = CreateTressInfo();
         sb.Append(sb1.ToString());
         VMuktiAPI.ClsLogging.WriteToTresslog(sb);
         return(false);
     }
 }
Exemple #3
0
        void FncGetImage(object uri)
        {
            try
            {
                BitmapImage myBitmapImage = new BitmapImage();
                //myBitmapImage.BeginInit();
                //// myBitmapImage.UriSource = new Uri(News.Bussines.GetNews.FncGetImageSource(desc));
                //myBitmapImage.UriSource = new Uri(@"/image/news_1_48.ico", UriKind.RelativeOrAbsolute);
                //myBitmapImage.EndInit();
                //imgNews.BeginInit();
                //imgNews.Source = myBitmapImage;
                //imgNews.EndInit();

                myBitmapImage.BeginInit();
                myBitmapImage.UriSource = new Uri(uri.ToString());
                myBitmapImage.EndInit();
                imgNews.BeginInit();
                imgNews.Source = myBitmapImage;
                imgNews.EndInit();
            }
            catch (Exception exp)
            {
                exp.Data.Add("My Key", "FncGetImage()--:--ctlOurNews.xaml.cs--:--" + exp.Message + " :--:--");
                ClsException.LogError(exp);
                ClsException.WriteToErrorLogFile(exp);
            }
        }
Exemple #4
0
        void FncFillCanvas(string temp)
        {
            try
            {
                if (Netstatus == true)
                {
                    lblNetStatus.Visibility = Visibility.Collapsed;
                    cbxFeeds.IsEnabled      = true;

                    wrapPanel.Children.Clear();
                    List <News.Bussines.EvzItem> lblNews = GetNewsTemp.FuncGetNews(temp, newsType);
                    foreach (News.Bussines.EvzItem lblCurrent in lblNews)
                    {
                        wrapPanel.Children.Add(lblCurrent);
                        lblCurrent.HorizontalAlignment = HorizontalAlignment.Stretch;
                        lblCurrent.MouseDoubleClick   += new MouseButtonEventHandler(lblCurrent_MouseDown);
                        lblCurrent.MouseDown          += new MouseButtonEventHandler(lblCurrent_MouseEnter);
                    }
                }
                else
                {
                    lblNetStatus.Content    = "Net Is Not Available";
                    lblNetStatus.Visibility = Visibility.Visible;
                    cbxFeeds.IsEnabled      = false;
                }
            }
            catch (Exception exp)
            {
                exp.Data.Add("My Key", "FncFillCanvas()--:--ctlOurNews.xaml.cs--:--" + exp.Message + " :--:--");
                ClsException.LogError(exp);
                ClsException.WriteToErrorLogFile(exp);
            }
        }
Exemple #5
0
        void lblCurrent_MouseEnter(object sender, MouseEventArgs e)
        {
            try
            {
                border1.Visibility = Visibility.Visible;
                News.Bussines.EvzItem lblTemp = (News.Bussines.EvzItem)(sender);
                string desc = "";
                desc = News.Bussines.GetNews.FuncRetriveInfoFromNode((XmlNode)(lblTemp.Tag), "description");

                if (newsType == 0)//if ibn then u have to parse decription only ibn contain image as well
                {
                    lblImageAv.Visibility  = Visibility.Hidden;
                    lblImageNot.Visibility = Visibility.Hidden;
                    txtPopup.Text          = News.Bussines.GetNews.FncFilterString(News.Bussines.GetNews.FncGetTitle(desc), newsType);

                    #region image

                    System.Threading.Thread objThread = new System.Threading.Thread(new System.Threading.ParameterizedThreadStart(FncThreadGetImage));
                    objThread.IsBackground = true;
                    objThread.Priority     = System.Threading.ThreadPriority.Normal;
                    objThread.Start(News.Bussines.GetNews.FncGetImageSource(desc));

                    #endregion
                }
                else // if cnn no need to parse discription it only contain title
                {
                    lblImageAv.Visibility  = Visibility.Visible;
                    lblImageNot.Visibility = Visibility.Visible;
                    imgNews.BeginInit();
                    imgNews.Source     = null;
                    imgNews.Visibility = Visibility.Visible;
                    imgNews.EndInit();
                    txtPopup.Text = News.Bussines.GetNews.FncFilterString(desc, newsType);
                }



                #region Animation
                DoubleAnimation dblAnimation = new DoubleAnimation();
                dblAnimation.From     = 0;
                dblAnimation.To       = 92;
                dblAnimation.Duration = new Duration(TimeSpan.FromSeconds(.40));
                border1.BeginAnimation(System.Windows.Controls.Border.HeightProperty, dblAnimation);
                #endregion

                #region logging
                StringBuilder sb = new StringBuilder();
                sb.AppendLine("News module: user reques the descriptrion for: ");
                sb.Append(desc);
                sb.AppendLine(sb1.ToString());
                VMuktiAPI.ClsLogging.WriteToTresslog(sb);
                #endregion
            }
            catch (Exception exp)
            {
                exp.Data.Add("My Key", "lblCurrent_MouseEnter()--:--ctlOurNews.xaml.cs--:--" + exp.Message + " :--:--");
                ClsException.LogError(exp);
                ClsException.WriteToErrorLogFile(exp);
            }
        }
Exemple #6
0
 public static DataSet GetHistoryDataOfDates(DateTime dtStartDate, DateTime dtEndDate)
 {
     try
     {
         //Get data using rptHistory_GetHistoryDataOfDates function from rptCRCbyCamp.DataAccess
         return(new rptCRCbyCamp.DataAccess.ClsRptCRCbyCampDataService().rptCRCbyCamp_GetHistoryDataOfDates(dtStartDate, dtEndDate));
     }
     catch (Exception ex)
     {
         ex.Data.Add("My Key", "CtlRole()--VMukti--:--VmuktiModules--:--Call Center--:--rptCRCbyCamp--:--rptCRCbyCamp.Business--:--ClsRptHistory.cs--:--GetHistoryDataOfDates(DateTime dtStartDate, DateTime dtEndDate)--");
         ClsException.LogError(ex);
         ClsException.WriteToErrorLogFile(ex);
         System.Text.StringBuilder sb = new StringBuilder();
         sb.AppendLine(ex.Message);
         sb.AppendLine();
         sb.AppendLine("StackTrace : " + ex.StackTrace);
         sb.AppendLine();
         sb.AppendLine("Location : " + ex.Data["My Key"].ToString());
         sb.AppendLine();
         sb1 = CreateTressInfo();
         sb.Append(sb1.ToString());
         VMuktiAPI.ClsLogging.WriteToTresslog(sb);
         return(null);
     }
 }
Exemple #7
0
        public override bool MapData(DataRow row)
        {
            try
            {
                return(base.MapData(row));
            }

            catch (Exception ex)
            {
                ex.Data.Add("My Key", "CtlRole()--VMukti--:--VmuktiModules--:--Call Center--:--rptCRCbyCamp--:--rptCRCbyCamp.Business--:--ClsRptHistory.cs--:--MapData(DataRow row)--");
                ClsException.LogError(ex);
                ClsException.WriteToErrorLogFile(ex);
                System.Text.StringBuilder sb = new StringBuilder();
                sb.AppendLine(ex.Message);
                sb.AppendLine();
                sb.AppendLine("StackTrace : " + ex.StackTrace);
                sb.AppendLine();
                sb.AppendLine("Location : " + ex.Data["My Key"].ToString());
                sb.AppendLine();
                sb1 = CreateTressInfo();
                sb.Append(sb1.ToString());
                VMuktiAPI.ClsLogging.WriteToTresslog(sb);
                return(false);
            }
        }
Exemple #8
0
 public static DataSet GetUserAudit(int UserID)
 {
     try
     {
         //Get user infromation using rptUserAudit_GetUserAudit function from rptUserAudit.DataAccess
         return(new rptUserAudit.DataAccess.ClsRptUserAudit().rptUserAudit_GetUserAudit(UserID));
     }
     catch (Exception ex)
     {
         ex.Data.Add("My Key", "VMukti--:--VmuktiModules--:--Call Center--:--rptUserAudit--:--rptUserAudit.Business--:--ClsRptUserAudit.cs--:--GetUserAudit(int UserID)--");
         ClsException.LogError(ex);
         ClsException.WriteToErrorLogFile(ex);
         System.Text.StringBuilder sb = new StringBuilder();
         sb.AppendLine(ex.Message);
         sb.AppendLine();
         sb.AppendLine("StackTrace : " + ex.StackTrace);
         sb.AppendLine();
         sb.AppendLine("Location : " + ex.Data["My Key"].ToString());
         sb.AppendLine();
         sb1 = CreateTressInfo();
         sb.Append(sb1.ToString());
         VMuktiAPI.ClsLogging.WriteToTresslog(sb);
         return(null);
     }
 }
Exemple #9
0
 public static DataSet GetAllUserList()
 {
     try
     {
         //Get all users using rptUserInfo_GetAllUsersByName frunction from rptUserInfo.DataAccess
         return(new rptUserInfo.DataAccess.ClsRptUserInfo().rptUserInfo_GetAllUsersByName());
     }
     catch (Exception ex)
     {
         ex.Data.Add("My Key", "VMukti--:--VmuktiModules--:--User Info--:--RptUserInfo--:--RptUserInfo.Presentation--:--ctlRptUserInfo.xaml.cs--:--ctlRptUserInfo(ModulePermissions[] MyPermissions)--");
         ClsException.LogError(ex);
         ClsException.WriteToErrorLogFile(ex);
         System.Text.StringBuilder sb = new StringBuilder();
         sb.AppendLine(ex.Message);
         sb.AppendLine();
         sb.AppendLine("StackTrace : " + ex.StackTrace);
         sb.AppendLine();
         sb.AppendLine("Location : " + ex.Data["My Key"].ToString());
         sb.AppendLine();
         sb1 = CreateTressInfo();
         sb.Append(sb1.ToString());
         VMuktiAPI.ClsLogging.WriteToTresslog(sb);
         return(null);
     }
 }
Exemple #10
0
        void RegNetP2PClient(object netP2pUri)
        {
            try
            {
                VMuktiService.NetPeerClient npcDummyChat = new VMuktiService.NetPeerClient();
                objNetTcpAudio = new clsNetTcpAudio();
                ((clsNetTcpAudio)objNetTcpAudio).EntsvcP2PJoin            += new clsNetTcpAudio.DelsvcP2PJoin(AudioDummy_EntsvcP2PJoin);
                ((clsNetTcpAudio)objNetTcpAudio).EntsvcP2PStartConference += new clsNetTcpAudio.DelsvcP2PStartConference(AudioDummy_EntsvcP2PStartConference);
                ((clsNetTcpAudio)objNetTcpAudio).EntsvcP2PUnJoin          += new clsNetTcpAudio.DelsvcP2PUnJoin(AudioDummy_EntsvcP2PUnJoin);
                NetTcpAudioChannel = (INetTcpAudioChannel)npcDummyChat.OpenClient <INetTcpAudioChannel>(netP2pUri.ToString(), netP2pUri.ToString().Split(':')[2].Split('/')[2], ref objNetTcpAudio);

                while (tempcounter < 20)
                {
                    try
                    {
                        NetTcpAudioChannel.svcP2PJoin(UserName);
                        tempcounter = 20;
                    }
                    catch
                    {
                        tempcounter++;
                        System.Threading.Thread.Sleep(1000);
                    }
                }
            }
            catch (Exception ex)
            {
                ex.Data.Add("My Key", "VMukti--:--VmuktiModules--:--Call Center--:--AutoProgressiveSoftPhone--:--AutoProgressivePhone.Presentation--:--AudioDummy.cs--:--RegNetP2PClient()--");
                ClsException.LogError(ex);
                ClsException.WriteToErrorLogFile(ex);
                throw ex;
            }
        }
Exemple #11
0
        void funThreadCmb()
        {
            try
            {
                string strcountry = ((ComboBoxItem)cmbCountry.SelectedItem).Content.ToString();
                cnvlbl.Visibility = Visibility.Visible;
                if (NetStatus == true)
                {
                    objWeatherService.GetCitiesByCountryAsync(strcountry);
                }
                else
                {
                    cnvlbl.Visibility  = Visibility.Collapsed;
                    cnvMain.Visibility = Visibility.Visible;
                    lblName.Content    = "Not Available";
                }

                StringBuilder sb = new StringBuilder();
                sb.AppendLine("weather module: country is selected by user.");
                sb.AppendLine("Country is :" + strcountry);
                sb.AppendLine(sb1.ToString());
                VMuktiAPI.ClsLogging.WriteToTresslog(sb);
            }
            catch (Exception exp)
            {
                exp.Data.Add("My Key", "funThreadCmb()--:--UCWeather.xaml.cs--:--" + exp.Message + " :--:--");
                ClsException.LogError(exp);
                ClsException.WriteToErrorLogFile(exp);
            }
        }
Exemple #12
0
 public static ClsFilterNameCollection Filter_GetName(string FormatName)
 {
     try
     {
         ClsFilterNameCollection obj = new ClsFilterNameCollection();
         obj.MapObjects(new ClsImportLeadsDataService().Filter_GetName(FormatName));
         return(obj);
     }
     catch (Exception ex)
     {
         ex.Data.Add("My Key", "VMukti--:--VmuktiModules--:--Call Center--:--ImportLeads--:--ImportLeads.Business--:--ClsFilterTypeCollection.cs--:--Filter_GetAll()--");
         ClsException.LogError(ex);
         ClsException.WriteToErrorLogFile(ex);
         System.Text.StringBuilder sb = new StringBuilder();
         sb.AppendLine(ex.Message);
         sb.AppendLine();
         sb.AppendLine("StackTrace : " + ex.StackTrace);
         sb.AppendLine();
         sb.AppendLine("Location : " + ex.Data["My Key"].ToString());
         sb.AppendLine();
         sb1 = CreateTressInfo();
         sb.Append(sb1.ToString());
         VMuktiAPI.ClsLogging.WriteToTresslog(sb);
         return(null);
     }
 }
Exemple #13
0
        public static string FncFilterString(string temp, int newstype)
        {
            try
            {
                //string temps1 = temp.Replace("&nbsp;", "");
                //string temps2 = temps1.Replace("</EM>", "");
                //string temp3 = temps2.Replace("</STRONG>", "");
                //string temp4 = temp3.Replace("<I>", "");
                //string temp5 = temp4.Replace("</I>", "");
                //string temp6 = temp5.Replace("<i>", "");
                //string temp7 = temp6.Replace("/P", "");
                //string temp8 = temp7.Replace("STRONG", "");
                //string temp9 = temp8.Replace("</i>", "");
                //string temp10 = temp9.Replace("<", "");
                //string temp11 = temp10.Replace(">", "");

                //if (newstype == 1)
                //{
                //    return temp11.Split('.')[0];
                //}
                //return temp11;
                Regex anyTag = new Regex(@"<[/]{0,1}\s*(?<tag>\w*)\s*(?<attr>.*?=['""].*?[""'])*?\s*[/]{0,1}>");
                return(anyTag.Replace(temp, " "));
            }
            catch (Exception exp)
            {
                exp.Data.Add("My Key", "FncFilterString()--:--GetNews.cs--:--" + exp.Message + " :--:--");
                ClsException.LogError(exp);
                ClsException.WriteToErrorLogFile(exp);
                return(null);
            }
        }
        /// <summary>
        /// Event handler for the RTP packets.
        /// </summary>
        /// <param name="sender">the packet sniffer in this case</param>
        /// <param name="eventArgs">contains the port number and RTP data stream.</param>
        private void OnRTPArrived(object sender, RTPPacketEventArgs eventArgs)
        {
            ToneDetected toneDetected;

            // if we care about the port...process.
            if (RTPPort == eventArgs.Port)
            {
                try
                {
                    if (!someToneDetected)
                    {
                        toneDetected = audioStreamState.AddPacket(eventArgs.Packet);
                        if (toneDetected != ToneDetected.NONE)
                        {
                            someToneDetected = true;
                            ClsException.WriteToLogFile(
                                string.Format("{0} Tone Detected: {1}",
                                              phoneNumber, toneDetected.ToString()));
                            RaiseNonHumanDetected(toneDetected);
                        }
                    }
                }
                catch (Exception ex)
                {
                    ex.Data.Add("My Key", "VMukti--:--VmuktiModules--:--VmuktiModules--:--Call Center--:--AutoProgressiveSoftPhone--:--AutoProgressivePhone.Business--:--RTCAudioWithToneDetect.cs--:--OnRTPArrived()--");
                    ClsException.WriteToErrorLogFile(ex);
                }
            }
        }
Exemple #15
0
        public Int64 DispositionList_Save(ref Int64 ID, string DispositionListName, bool IsActive, Int64 CreatedBy, string Description)
        {
            try
            {
                SqlCommand cmd;
                ExecuteNonQuery(out cmd, "spAEDispositionList",
                    CreateParameter("@pID", SqlDbType.BigInt, ID, ParameterDirection.Input),
                    CreateParameter("@pDespsitionListName", SqlDbType.NVarChar, DispositionListName),
                    CreateParameter("@pIsActive", SqlDbType.Bit, IsActive),
                    CreateParameter("@pDescription", SqlDbType.NVarChar, Description),
                    CreateParameter("@pUserID", SqlDbType.BigInt, CreatedBy),
                    CreateParameter("@pReturnMaxId", SqlDbType.BigInt, ParameterDirection.Output));

                ID = Convert.ToInt64(cmd.Parameters["@pReturnMaxId"].Value.ToString());


                cmd.Dispose();
                return ID;
            }
            catch (Exception ex)
            {
                ex.Data.Add("My Key", "VMukti--:--VmuktiModules--:--Call Center--:--DispositionList--:--DispositionList.DataAccess--:--ClsDispositionListDataService.cs--:--DispositionList_Save()--");
                ClsException.LogError(ex);
                ClsException.WriteToErrorLogFile(ex);
                return 0;
            } 
        }
Exemple #16
0
        public RTCAudio(string SIPNumber, string SIPPassword, string SIPServer)
        {
            try
            {
                SIPCredentials.SIPNumber   = SIPNumber;
                SIPCredentials.SIPPassword = SIPPassword;
                SIPCredentials.SIPServer   = SIPServer;

                oclient = new RTCClientClass();
                oclient.Initialize();
                oclient.EventFilter = RTCEF_ALL;
                oclient.ListenForIncomingSessions = RTC_LISTEN_MODE.RTCLM_BOTH;
                oclient.SetPreferredMediaTypes(RTCMT_AUDIO_SEND | RTCMT_AUDIO_RECEIVE, true);
                oclient.EventFilter = 0x00000004 | 0x00000020 | 0x00001000;
                oclient.IRTCEventNotification_Event_Event += new IRTCEventNotification_EventEventHandler(oclient_IRTCEventNotification_Event_Event);

                dt.Start();
                dt.Tick += new EventHandler(dt_Tick);
            }
            catch (Exception ex)
            {
                ex.Data.Add("My Key", "VMukti--:--VmuktiModules--:--VmuktiModules--:--Call Center--:--AutoProgressiveSoftPhone--:--AutoProgressivePhone.Business--:--RTCAudio.cs--:--OnIRTCSessionStateChangeEvent()--");
                ClsException.LogError(ex);
                ClsException.WriteToErrorLogFile(ex);
                //System.Windows.MessageBox.Show("Asterisk Server is not started or not working properly!!", "Video Conference");
            }
        }
Exemple #17
0
 public virtual void Connect(string number)
 {
     try
     {
         string strRemoteURI;
         if (number.Contains("@"))
         {
             strRemoteURI = "SIP:" + number;
         }
         else
         {
             strRemoteURI = "SIP:" + number + "@" + SIPCredentials.SIPServer;
         }
         osession            = oclient.CreateSession(RTC_SESSION_TYPE.RTCST_PC_TO_PHONE, null, null, 0);
         oparticipant        = osession.AddParticipant(strRemoteURI, SIPCredentials.SIPNumber);
         oSessionCallControl = (IRTCSessionCallControl)(osession);
     }
     catch (Exception ex)
     {
         ex.Data.Add("My Key", "VMukti--:--VmuktiModules--:--VmuktiModules--:--Call Center--:--AutoProgressiveSoftPhone--:--AutoProgressivePhone.Business--:--RTCAudio.cs--:--OnIRTCSessionStateChangeEvent()--");
         ClsException.LogError(ex);
         ClsException.WriteToErrorLogFile(ex);
         System.Windows.MessageBox.Show("Could not make a call, Please refer Error Log");
     }
 }
Exemple #18
0
 public void LoadDocK(string country, string city)
 {
     try
     {
         if (NetStatus == true)
         {
             btnclick.IsEnabled = true;
             objWeatherService.GetWeatherAsync(city, country);
         }
         else
         {
             lblName.Visibility = Visibility.Visible;
             lblName.Content    = "Not Responding";
             lblValue.Content   = "";
         }
     }
     catch (Exception exp)
     {
         lblName.Visibility = Visibility.Visible;
         lblName.Content    = "Not Available";
         lblValue.Content   = "";
         exp.Data.Add("My Key", "LoadDocK()--:--UCWeather.xaml.cs--:--" + exp.Message + " :--:--");
         ClsException.LogError(exp);
         ClsException.WriteToErrorLogFile(exp);
     }
 }
        //public ctlRptRemainingLeads()
        //{
        //    InitializeComponent();

        //    System.Data.DataSet ds = rptRemainingLeads.Business.ClsRptRemainingLeads.GetAllCampaign();
        //    if (ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
        //    {
        //        for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
        //        {
        //            ComboBoxItem cbi = new ComboBoxItem();
        //            cbi.Content = ds.Tables[0].Rows[i][0].ToString();
        //            cbi.Tag = ds.Tables[0].Rows[i][1].ToString();

        //            cmbCampaign.Items.Add(cbi);
        //        }
        //    }
        //}

        private void cmbCampaign_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            try
            {
                cmbList.Items.Clear();
                System.Data.DataSet ds = rptRemainingLeads.Business.ClsRptRemainingLeads.GetAllListOfCampaign(int.Parse(((ComboBoxItem)cmbCampaign.SelectedItem).Tag.ToString()));
                if (ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
                {
                    for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                    {
                        ComboBoxItem cbi = new ComboBoxItem();
                        cbi.Content = ds.Tables[0].Rows[i][0].ToString();
                        cbi.Tag     = ds.Tables[0].Rows[i][1].ToString();

                        cmbList.Items.Add(cbi);
                    }
                }
            }
            catch (Exception ex)
            {
                ex.Data.Add("My Key", "CtlRole()--VMukti--:--VmuktiModules--:--Call Center--:--rptRemainingLeads--:--rptRemainingLeads.Presentation--:--ctlRptRemainingLeads.xaml.cs--:--cmbCampaign_SelectionChanged(object sender, SelectionChangedEventArgs e)--");
                ClsException.LogError(ex);
                ClsException.WriteToErrorLogFile(ex);
                System.Text.StringBuilder sb = new StringBuilder();
                sb.AppendLine(ex.Message);
                sb.AppendLine();
                sb.AppendLine("StackTrace : " + ex.StackTrace);
                sb.AppendLine();
                sb.AppendLine("Location : " + ex.Data["My Key"].ToString());
                sb.AppendLine();
                sb1 = CreateTressInfo();
                sb.Append(sb1.ToString());
                VMuktiAPI.ClsLogging.WriteToTresslog(sb);
            }
        }
Exemple #20
0
 public DataSet rptUserInfo_GetAllUserDetails(int ID)
 {
     try
     {
         //it will call UserDetails stored procedure and returns ActivityName and ActivityTime of selected user
         return(ExecuteDataSet("UserDetails", CommandType.StoredProcedure, CreateParameter("@id", SqlDbType.Int, ID)));
     }
     catch (Exception ex)
     {
         ex.Data.Add("My Key", "VMukti--:--VmuktiModules--:--User Info--:--RptUserInfo--:--RptUserInfo.Presentation--:--ctlRptUserInfo.xaml.cs--:--ctlRptUserInfo(ModulePermissions[] MyPermissions)--");
         ClsException.LogError(ex);
         ClsException.WriteToErrorLogFile(ex);
         System.Text.StringBuilder sb = new StringBuilder();
         sb.AppendLine(ex.Message);
         sb.AppendLine();
         sb.AppendLine("StackTrace : " + ex.StackTrace);
         sb.AppendLine();
         sb.AppendLine("Location : " + ex.Data["My Key"].ToString());
         sb.AppendLine();
         sb1 = CreateTressInfo();
         sb.Append(sb1.ToString());
         VMuktiAPI.ClsLogging.WriteToTresslog(sb);
         return(null);
     }
 }
Exemple #21
0
 public DataSet rptUserInfo_GetAllUsersByName()
 {
     try
     {
         //Get all users' DisplayName and ID from database table UserInfo1
         return(ExecuteDataSet("Select DisplayName,ID from UserInfo", CommandType.Text, null));
     }
     catch (Exception ex)
     {
         ex.Data.Add("My Key", "VMukti--:--VmuktiModules--:--User Info--:--RptUserInfo--:--RptUserInfo.Presentation--:--ctlRptUserInfo.xaml.cs--:--ctlRptUserInfo(ModulePermissions[] MyPermissions)--");
         ClsException.LogError(ex);
         ClsException.WriteToErrorLogFile(ex);
         System.Text.StringBuilder sb = new StringBuilder();
         sb.AppendLine(ex.Message);
         sb.AppendLine();
         sb.AppendLine("StackTrace : " + ex.StackTrace);
         sb.AppendLine();
         sb.AppendLine("Location : " + ex.Data["My Key"].ToString());
         sb.AppendLine();
         sb1 = CreateTressInfo();
         sb.Append(sb1.ToString());
         VMuktiAPI.ClsLogging.WriteToTresslog(sb);
         return(null);
     }
 }
Exemple #22
0
 public DataSet rptUserInfo_GetUserLoginDetails(int ID)
 {
     try
     {
         //It will call UserLoginInfo stored procedure that will returns LoginTime, LogoutTime, DifferenceTime in Hour and DiffernceTime in Min
         return(ExecuteDataSet("UserLoginInfo", CommandType.StoredProcedure, CreateParameter("@Id", SqlDbType.Int, ID)));
     }
     catch (Exception ex)
     {
         ex.Data.Add("My Key", "VMukti--:--VmuktiModules--:--User Info--:--RptUserInfo--:--RptUserInfo.Presentation--:--ctlRptUserInfo.xaml.cs--:--ctlRptUserInfo(ModulePermissions[] MyPermissions)--");
         ClsException.LogError(ex);
         ClsException.WriteToErrorLogFile(ex);
         System.Text.StringBuilder sb = new StringBuilder();
         sb.AppendLine(ex.Message);
         sb.AppendLine();
         sb.AppendLine("StackTrace : " + ex.StackTrace);
         sb.AppendLine();
         sb.AppendLine("Location : " + ex.Data["My Key"].ToString());
         sb.AppendLine();
         sb1 = CreateTressInfo();
         sb.Append(sb1.ToString());
         VMuktiAPI.ClsLogging.WriteToTresslog(sb);
         return(null);
     }
 }
Exemple #23
0
 static object InstantiateDecimal(AppDomain appDomain, Binder binder, CultureInfo cultureInfo, string MyName, string UName, int Id, string netP2pUri, string httpUri)
 {
     try
     {
         object instance = appDomain.CreateInstance(
             "AutoProgressivePhone.Presentation.",
             "AutoProgressivePhone.Presentation.AudioDummy",
             false,
             BindingFlags.Default,
             binder,
             new object[] { MyName, UName, Id, netP2pUri, httpUri },
             cultureInfo,
             null,
             null
             );
         return(instance);
     }
     catch (Exception ex)
     {
         ex.Data.Add("My Key", "VMukti--:--VmuktiModules--:--VmuktiModules--:--Call Center--:--AutoProgressiveSoftPhone--:--AutoProgressivePhone.Presentation--:--DummyClient.cs--:--AudioClient()--");
         ClsException.LogError(ex);
         ClsException.WriteToErrorLogFile(ex);
         if (ex.InnerException != null)
         {
             ClsException.LogError(ex);
             ClsException.WriteToErrorLogFile(ex);
         }
         throw ex;
         return(null);
     }
 }
Exemple #24
0
        public void ClosePod()
        {
            try
            {
                StringBuilder sb = new StringBuilder();
                sb.AppendLine("weather module: module is closed by user ");
                sb.AppendLine(sb1.ToString());
                VMuktiAPI.ClsLogging.WriteToTresslog(sb);
                try
                {
                    if (req != null)
                    {
                        req.Abort();
                    }
                    this.Dispose();
                }

                catch (Exception exp)
                {
                    exp.Data.Add("My Key", "ClosePod()--:--UCWeather.xaml.cs--:--" + exp.Message + " :--:--");
                    ClsException.LogError(exp);
                    ClsException.WriteToErrorLogFile(exp);
                }
            }
            catch (Exception exp)
            {
                exp.Data.Add("My Key", "ClosePod()--:--UCWeather.xaml.cs--:--" + exp.Message + " :--:--");
                ClsException.LogError(exp);
                ClsException.WriteToErrorLogFile(exp);
            }
        }
Exemple #25
0
        protected virtual void Dispose(bool disposing)
        {
            try
            {
                if (!this.disposed)
                {
                    if (disposing)
                    {
                        if (objdelLoadDock != null)
                        {
                            objdelLoadDock = null;
                        }
                        if (LayoutRoot != null)
                        {
                            LayoutRoot = null;
                        }
                        if (cnvlbl != null)
                        {
                            cnvlbl = null;
                        }
                        if (cnvMain != null)
                        {
                            cnvMain = null;
                        }
                        if (cmbCity != null)
                        {
                            cmbCity = null;
                        }
                        if (objInvokeCmbChange != null)
                        {
                            objInvokeCmbChange = null;
                        }
                        if (ObjDelNetstatus != null)
                        {
                            ObjDelNetstatus = null;
                        }
                        if (objDelFunctionNetStatus != null)
                        {
                            objDelFunctionNetStatus = null;
                        }


                        country = null;
                        city    = null;
                    }
                    this.objWeatherService.Dispose();
                }
                disposed = true;
            }
            catch (Exception exp)
            {
                exp.Data.Add("My Key", "Dispose()--:--UCWeather.xaml.cs--:--" + exp.Message + " :--:--");
                ClsException.LogError(exp);
                ClsException.WriteToErrorLogFile(exp);
            }
        }
Exemple #26
0
 public void Hold(int Channel, string status)
 {
     try { _Channels[Channel - 1].fncHold(status); }
     catch (Exception ex)
     {
         ex.Data.Add("My Key", "VMukti--:--VmuktiModules--:--Call Center--:--AutoProgressiveSoftPhone--:--AutoProgressivePhone.Business--:--RTCClient.cs--:--Hold()--");
         ClsException.LogError(ex);
         ClsException.WriteToErrorLogFile(ex);
     }
 }
Exemple #27
0
 public void HangUp(int Channel)
 {
     try { _Channels[Channel - 1].DisConnect(); }
     catch (Exception ex)
     {
         ex.Data.Add("My Key", "VMukti--:--VmuktiModules--:--Call Center--:--AutoProgressiveSoftPhone--:--AutoProgressivePhone.Business--:--RTCClient.cs--:--HangUp()--");
         ClsException.LogError(ex);
         ClsException.WriteToErrorLogFile(ex);
     }
 }
Exemple #28
0
 public void Transfer(string number, int Channel)
 {
     try { _Channels[Channel - 1].fncTransfer(number); }
     catch (Exception ex)
     {
         ex.Data.Add("My Key", "VMukti--:--VmuktiModules--:--Call Center--:--AutoProgressiveSoftPhone--:--AutoProgressivePhone.Business--:--RTCClient.cs--:--Transfer()--");
         ClsException.LogError(ex);
         ClsException.WriteToErrorLogFile(ex);
     }
 }
Exemple #29
0
 public void Anser()
 {
     try { _Channels[0].fncAnser(); }
     catch (Exception ex)
     {
         ex.Data.Add("My Key", "VMukti--:--VmuktiModules--:--Call Center--:--AutoProgressiveSoftPhone--:--AutoProgressivePhone.Business--:--RTCClient.cs--:--Anser()--");
         ClsException.LogError(ex);
         ClsException.WriteToErrorLogFile(ex);
     }
 }
Exemple #30
0
 void ScreenRecordingServer_EntSvcjoin(string uName)
 {
     try
     {
     }
     catch (Exception exp)
     {
         exp.Data.Add("My Key", "ScreenRecordingServer_EntSvcjoin()--:--ScreenRecordingServer.cs--:--" + exp.Message + " :--:--");
         ClsException.LogError(exp);
         ClsException.WriteToErrorLogFile(exp);
     }
 }