public string GetAllSearchLead(string UserId)
 {
     discoveryleadsRepository _DiscoveryLeadsRepository = new discoveryleadsRepository();
     try
     {
         List<string> lstlead = _DiscoveryLeadsRepository.GetLeadHistory(Guid.Parse(UserId));
         return new JavaScriptSerializer().Serialize(lstlead);
     }
     catch (Exception ex)
     {
         logger.Error(ex.StackTrace);
         logger.Error(ex.Message);
         return "data not found";
     }
 }
        public string GetAllSearchLead(string UserId)
        {
            discoveryleadsRepository _DiscoveryLeadsRepository = new discoveryleadsRepository();

            try
            {
                List <string> lstlead = _DiscoveryLeadsRepository.GetLeadHistory(Guid.Parse(UserId));
                return(new JavaScriptSerializer().Serialize(lstlead));
            }
            catch (Exception ex)
            {
                logger.Error(ex.StackTrace);
                logger.Error(ex.Message);
                return("data not found");
            }
        }
 public string AddLeadKeyword(string Keyword, string UserId)
 {
     try
     {
         Domain.Socioboard.Domain.DiscoveryLeads _DiscoveryLeads = new Domain.Socioboard.Domain.DiscoveryLeads();
         discoveryleadsRepository _DiscoveryLeadsRepository      = new discoveryleadsRepository();
         _DiscoveryLeads.Id      = new Guid();
         _DiscoveryLeads.Keyword = Keyword;
         _DiscoveryLeads.UserId  = Guid.Parse(UserId);
         _DiscoveryLeadsRepository.LeadKeyword(_DiscoveryLeads);
         List <string> lstlead = _DiscoveryLeadsRepository.GetLeadHistory(Guid.Parse(UserId));
         return(new JavaScriptSerializer().Serialize(lstlead));
     }
     catch (Exception ex)
     {
         logger.Error(ex.StackTrace);
         logger.Error(ex.Message);
         return(new JavaScriptSerializer().Serialize("Error"));
     }
 }
 public string AddLeadKeyword(string Keyword,string UserId)
 {
     try
     {
         Domain.Socioboard.Domain.DiscoveryLeads _DiscoveryLeads = new Domain.Socioboard.Domain.DiscoveryLeads();
         discoveryleadsRepository _DiscoveryLeadsRepository = new discoveryleadsRepository();
         _DiscoveryLeads.Id = new Guid();
         _DiscoveryLeads.Keyword = Keyword;
         _DiscoveryLeads.UserId = Guid.Parse(UserId);
         _DiscoveryLeadsRepository.LeadKeyword(_DiscoveryLeads);
         List<string> lstlead = _DiscoveryLeadsRepository.GetLeadHistory(Guid.Parse(UserId));
         return new JavaScriptSerializer().Serialize(lstlead);
        
     }
     catch (Exception ex)
     {
         logger.Error(ex.StackTrace);
         logger.Error(ex.Message);
          return new JavaScriptSerializer().Serialize("Error");
     }
 
 }