コード例 #1
0
        public ActionResult AddOpportunity(decimal opportunityAmount, OpportunityStage opportunityStage, DateTime opportunityCloseDate, Guid companyId, string opportunityName)
        {
            try
            {
                var opportunity = new Opportunity();

                opportunity.Amount           = opportunityAmount;
                opportunity.OpportunityStage = opportunityStage;
                opportunity.CloseDate        = opportunityCloseDate;
                opportunity.CompanyId        = companyId;
                opportunity.Name             = opportunityName;
                opportunityService.Insert(opportunity);
                return(Json(true));
            }
            catch (Exception ex)
            {
                return(Json(false));
            }
        }
 public ToolkitResultProtocol ChangeOpportunityStage(string opportunityIDNum, OpportunityStage stage)
 {
     object[] results = this.Invoke("ChangeOpportunityStage", new object[] {
                 opportunityIDNum,
                 stage});
     return ((ToolkitResultProtocol)(results[0]));
 }
 /// <remarks/>
 public System.IAsyncResult BeginChangeOpportunityStage(string opportunityIDNum, OpportunityStage stage, System.AsyncCallback callback, object asyncState)
 {
     return this.BeginInvoke("ChangeOpportunityStage", new object[] {
                 opportunityIDNum,
                 stage}, callback, asyncState);
 }