protected virtual void CRMarketingListMember_RowSelected(PXCache sender, PXRowSelectedEventArgs e) { CRMarketingListMember row = e.Row as CRMarketingListMember; if (row == null) { return; } CRMarketingList _CRMarketingList = PXSelect <CRMarketingList, Where <CRMarketingList.marketingListID, Equal <Required <CRMarketingList.marketingListID> > > > .Select(this, row.MarketingListID); if (_CRMarketingList != null) { PXUIFieldAttribute.SetEnabled <CRMarketingList.marketingListID>(sender, row, _CRMarketingList.IsDynamic == false); } }
public virtual void DeleteMarketingList() { CRMarketingListMember marketingListMember = Subscriptions.Cache.Current as CRMarketingListMember; if (marketingListMember == null) { return; } CRMarketingList marketingList = PXSelect <CRMarketingList, Where <CRMarketingList.marketingListID, Equal <Required <CRMarketingList.marketingListID> > > > .Select(this, marketingListMember.MarketingListID); if (marketingList == null) { return; } if (marketingList.IsDynamic == true) { return; } Subscriptions.Cache.Delete(marketingListMember); }
protected virtual IEnumerable mailLists() { foreach (PXResult row in MailListsExt.Select()) { var rec = (CRMarketingList)row[typeof(CRMarketingList)]; var mailList = (CRMassMailMarketingList)row[typeof(CRMassMailMarketingList)]; CRMarketingList cache = (CRMarketingList)this.MailLists.Cache.Locate(rec); if (rec.Selected != true && mailList.MailListID != null) { rec.Selected = true; } if (cache != null) { bool?selected = cache.Selected; MailLists.Cache.RestoreCopy(cache, rec); cache.Selected = selected; rec = cache; } yield return(new PXResult <CRMarketingList>(rec)); } }