public void GetContactsByCompany(Company company, Action<IEnumerable<Contact>> callback)
        {
            if (company == null)
            {
                callback(Enumerable.Empty<Contact>());
                return;
            }

            var companyID = company.CompanyID;
            this.LoadQuery<Contact>(this.Context.GetContactsByCompanyIDQuery(companyID), callback);
        }
        public void GetSalesTrendDataByCompany(Company company, Action<IEnumerable<SalesTrend>> callback)
        {
            if (company == null)
            {
                callback(Enumerable.Empty<SalesTrend>());
                return;
            }

            var companyID = company.CompanyID;
            this.LoadQuery<SalesTrend>(this.Context.GetTrendsByCompanyIDQuery(companyID), callback);
        }
        public void GetOpenOpportunitiesByCompany(Company company, Action<IEnumerable<Opportunity>> callback)
        {
            if (company == null)
            {
                callback(Enumerable.Empty<Opportunity>());
                return;
            }

            var companyID = company.CompanyID;
            this.LoadQuery<Opportunity>(this.Context.GetCompanyOverviewOpportunitiesQuery(companyID), callback);
        }
 public void GetContactsMetadata(Company company, Action<ContactsMetadata> callback)
 {
     if (isLoading)
     {
         return;
     }
     isLoading = true;
     this.Context.GetContactsMetadata(company.CompanyID, (operation) =>
     {
         isLoading = false;
         callback(operation.Value);
     }, null);
 }
 public void GetOpportunitiesByCompany(Company company, Action<IEnumerable<Opportunity>> callback)
 {
     this.GetOpportunitiesByCompanyID(company.CompanyID, callback);
 }
 private bool FilterCompany(Company entity)
 {
     return (entity.CompanyID == this.CompanyID);
 }