当前位置: 首页>>代码示例>>C#>>正文


C# BrightPlatformEntities.FIGetSubCampaignNurtureList方法代码示例

本文整理汇总了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();
     }
 }
开发者ID:,项目名称:,代码行数:8,代码来源:

示例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);
        }
开发者ID:,项目名称:,代码行数:48,代码来源:


注:本文中的BrightPlatformEntities.FIGetSubCampaignNurtureList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。