Пример #1
0
        public async Task <ProspectSearchCriteria> GetProspectSearchCriteriaAsync(ProspectSearchCriteria prospectSearchCriteria)
        {
            IDBRepository dbObejct = FactoryClass.CreateDBRepositoryObject();
            IEnumerable <ProspectSearchCriteria> prospectSearchCriteriaList = await dbObejct.GetExisitingProspectSearchCriteriaAsync(prospectSearchCriteria);

            return(prospectSearchCriteriaList.FirstOrDefault());
        }
Пример #2
0
        public async Task <IEnumerable <ProspectMarketSummary> > GetProspectSummaryAsync(string prospectName)
        {
            IDBRepository dbObejct = FactoryClass.CreateDBRepositoryObject();
            IEnumerable <ProspectMarketSummary> prospectSearchCriteriaList = await dbObejct.GetProspectSummaryDataAsync(prospectName);

            return(prospectSearchCriteriaList.OrderBy(p => p.ProspectName));
        }
Пример #3
0
        public async Task <IEnumerable <ProspectSearchCriteria> > GetProspectSearchCriteriaAsync()
        {
            IDBRepository dbObejct = FactoryClass.CreateDBRepositoryObject();
            IEnumerable <ProspectSearchCriteria> prospectSearchCriteriaList = await dbObejct.GetExisitingProspectSearchCriteriaAsync(null);

            return(prospectSearchCriteriaList.OrderBy(p => p.ProspectName).ThenBy(k => k.SearchString));
        }
Пример #4
0
        public async Task <ProspectSearchCriteria> GetProspectSearchCriteriaAsync(int id, string rowKey)
        {
            IDBRepository          dbObejct = FactoryClass.CreateDBRepositoryObject();
            string                 key      = string.IsNullOrEmpty(rowKey) ? id.ToString() : rowKey;
            ProspectSearchCriteria prospectSearchCriteria = await dbObejct.GetProspectSearchCriteriaAsync(key);

            return(prospectSearchCriteria);
        }
Пример #5
0
 public async Task <bool> UpdateProspectSearchData(ProspectSearchCriteria prospectSearchCriteria)
 {
     try
     {
         IDBRepository dbObejct = FactoryClass.CreateDBRepositoryObject();
         return(await dbObejct.UpdateProspectSearchDataAsync(prospectSearchCriteria));
     }
     catch
     {
         return(false);
     }
 }
Пример #6
0
        public async Task <bool> DeleteProspectSearchData(ProspectSearchCriteria prospectSearchCriteria)
        {
            try
            {
                IDBRepository dbObejct = FactoryClass.CreateDBRepositoryObject();
                string        key      = string.IsNullOrEmpty(prospectSearchCriteria.RowKey) ? prospectSearchCriteria.Id.ToString() : prospectSearchCriteria.RowKey;
                await dbObejct.DeleteProspectSearchDataAsync(key);

                return(true);
            }
            catch
            {
                return(false);
            }
        }