public JsonResult CreateOpportunityProduct(OpportunityProduct opportunityProduct)
        {
            var newOpportunityProductId =
                OpportunityService.CreateOpportunityProduct(GetHttpClient(), opportunityProduct);

            return(Json(newOpportunityProductId, 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));
        }