本文整理匯總了C#中BrightPlatformEntities.FIGetSubCampaignNurtureList方法的典型用法代碼示例。如果您正苦於以下問題:C# BrightPlatformEntities.FIGetSubCampaignNurtureList方法的具體用法?C# BrightPlatformEntities.FIGetSubCampaignNurtureList怎麽用?C# BrightPlatformEntities.FIGetSubCampaignNurtureList使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類BrightPlatformEntities
的用法示例。
在下文中一共展示了BrightPlatformEntities.FIGetSubCampaignNurtureList方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: GetData
private void GetData(int pCustomerId, int pCampaignId, int pSubCampaignId)
{
m_SubCampaignId = pSubCampaignId;
using (BrightPlatformEntities _efDbContext = new BrightPlatformEntities(UserSession.EntityConnection)) {
gcNurtureSubCampaign.DataSource = null;
gcNurtureSubCampaign.DataSource = _efDbContext.FIGetSubCampaignNurtureList(pCustomerId, pCampaignId, pSubCampaignId).ToList();
}
}
示例2: GetEventTypes
public void GetEventTypes(int pSubCampaignId = 0, string pDefaultEventType = null)
{
List<EventType> _lstEventTypes = new List<EventType>();
_lstEventTypes.Add(new EventType() { id = -1, name = "Call Back" });
//_lstEventTypes.Add(new EventType() { id = -2, name = "Follow Up Mail" }); //https://brightvision.jira.com/browse/PLATFORM-2285
_lstEventTypes.Add(new EventType() { id = -3, name = "Todo" });
if (pSubCampaignId > 0) {
m_EventSubCampaignId = pSubCampaignId;
using (BrightPlatformEntities _efDbContext = new BrightPlatformEntities(UserSession.EntityConnection)) {
int _CampaignId = (int)_efDbContext.subcampaigns.FirstOrDefault(i => i.id == m_EventSubCampaignId).campaign_id;
int _CustomerId = (int)_efDbContext.campaigns.FirstOrDefault(i => i.id == _CampaignId).customer_id;
List<CTSubCampaignNurtureItem> _lstNurtureItems = _efDbContext.FIGetSubCampaignNurtureList(_CustomerId, _CampaignId, m_EventSubCampaignId).ToList();
if (_lstNurtureItems.Count > 0) {
foreach (CTSubCampaignNurtureItem _item in _lstNurtureItems) {
if (!Convert.ToBoolean(_item.selected))
continue;
_lstEventTypes.Add(new EventType() { id = _item.sub_campaign_id, name = string.Format("Nurture ({0} > {1} > {2})", _item.customer_name, _item.campaign_name, _item.sub_campaign_name) });
}
}
}
}
/*
* https://brightvision.jira.com/browse/PLATFORM-2759
*/
icboEventType.Properties.Items.Clear();
int iImageIndex = 0;
for (int i = 0; i < _lstEventTypes.Count; i++) {
switch (_lstEventTypes[i].name) {
case "Call Back": iImageIndex = 0; break;
case "Todo": iImageIndex = 1; break;
default: iImageIndex = 2; break;
}
icboEventType.Properties.Items.Add(new ImageComboBoxItem(_lstEventTypes[i].name, _lstEventTypes[i].id, iImageIndex));
}
icboEventType.Properties.SmallImages = m_images;
this.icboEventType.EditValueChanged -= new System.EventHandler(this.icboEventType_EditValueChanged);
if (string.IsNullOrEmpty(pDefaultEventType) || pDefaultEventType.Equals("Make Call"))
icboEventType.EditValue = -1;
else if (pDefaultEventType.Equals("Send Mail"))
icboEventType.EditValue = -2;
else if (pDefaultEventType.Equals("Todo"))
icboEventType.EditValue = -3;
this.icboEventType.EditValueChanged += new System.EventHandler(this.icboEventType_EditValueChanged);
}