public override void CopyFrom(IAppointment other)
 {
     base.CopyFrom(other);
     CustomAppointmentMain appointment = other as CustomAppointmentMain;
     if (appointment != null)
     {
         this.Opportunity = appointment.Opportunity;
         this.Activity.UpdateAllProperties(appointment.Activity);
     }
 }
 public void GetActivitiesByOpportunity(Opportunity selectedOpportunity, Action<IEnumerable<Activity>> callback)
 {
     this.LoadQuery<Activity>(this.Context.GetActivitiesByOpportunityIDQuery(selectedOpportunity.OpportunityID), callback);
 }
 private bool FilterOpportunities(Opportunity entity)
 {
     return (entity.ProductID == this.Id);
 }
 private bool FilterOpportunity(Opportunity entity)
 {
     return (entity.ContactID == this.ContactID);
 }
 private void DetachOpportunity(Opportunity entity)
 {
     entity.Company = null;
 }
 private void AttachOpportunity(Opportunity entity)
 {
     entity.Company = this;
 }
 private bool FilterOpportunity(Opportunity entity)
 {
     return (entity.OpportunityID == this.OpportunityID);
 }