public JsonResult CreateOpportunity(Opportunity opportunity)
        {
            //var newOpportunityId = OpportunityService.CreateOpporutnity(GetService(), opportunity);
            var newOpportunityId = OpportunityService.CreateOpporutnity(GetHttpClient(), opportunity);

            return(Json(newOpportunityId, JsonRequestBehavior.AllowGet));
        }
        public JsonResult CreateOpportunityAndOpportunityProduct(Opportunity opportunity,
                                                                 OpportunityProduct opportunityProduct)
        {
            var httpClient = GetHttpClient();

            var newOpportunityId = OpportunityService.CreateOpporutnity(httpClient, opportunity);

            opportunityProduct.OpportunityId = newOpportunityId;

            if (newOpportunityId == Guid.Empty)
            {
                return(Json(newOpportunityId, JsonRequestBehavior.AllowGet));
            }

            var newOpportunityProductId =
                OpportunityService.CreateOpportunityProduct(httpClient, opportunityProduct);

            return(Json(newOpportunityId, JsonRequestBehavior.AllowGet));
        }