public async Task <ActionResult> Index() { Opportunities opportunities = new Opportunities(); try { ForceClient client = await _client.CreateForceClient(); opportunities = await _repository.GetOpportunities(client); } catch (Exception ex) { throw new Exception(ex.Message); } return(View("Index", opportunities)); }
public async Task <ActionResult> Index() { var allOpportunities = new SalesForceModels.OpportunitiesViewModel(); try { var client = await _salesForceService.CreateForceClient(); allOpportunities = await _dbConnector.GetOpportunities(client); } catch (Exception ex) { throw new Exception(ex.Message); } return(View("Index", allOpportunities)); }
public async Task <ActionResult> Index(string opportunityId) { OpportunityLineItems lineitems = new OpportunityLineItems(); try { ForceClient client = await _client.CreateForceClient(); lineitems = await _repository.GetOpportunityLineitems(client, opportunityId); } catch (Exception ex) { throw new Exception(ex.Message); } return(View("Index", lineitems)); }