コード例 #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);
            }
        }