本文整理汇总了C#中BrightPlatformEntities.FIGetSubCampaignUsers方法的典型用法代码示例。如果您正苦于以下问题:C# BrightPlatformEntities.FIGetSubCampaignUsers方法的具体用法?C# BrightPlatformEntities.FIGetSubCampaignUsers怎么用?C# BrightPlatformEntities.FIGetSubCampaignUsers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BrightPlatformEntities
的用法示例。
在下文中一共展示了BrightPlatformEntities.FIGetSubCampaignUsers方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetUsers
private void GetUsers()
{
event_followup_log _item = new event_followup_log();
List<CTSubCampaignUser> _lstItems = new List<CTSubCampaignUser>();
using (BrightPlatformEntities _efDbContext = new BrightPlatformEntities(UserSession.EntityConnection)) {
_item = _efDbContext.event_followup_log.FirstOrDefault(i => i.id == m_EventFollowUpLogId);
_lstItems = _efDbContext.FIGetSubCampaignUsers(_item.subcampaign_id).ToList();
}
cboSubCampaignUsers.Properties.DataSource = null;
cboSubCampaignUsers.Properties.Columns.Clear();
cboSubCampaignUsers.Properties.DataSource = _lstItems;
cboSubCampaignUsers.Properties.ValueMember = "id";
cboSubCampaignUsers.Properties.DisplayMember = "fullname";
cboSubCampaignUsers.Properties.Columns.Add(new LookUpColumnInfo("fullname"));
cboSubCampaignUsers.EditValue = _item.assigned_user;
}
示例2: LoadSalesUsers
public void LoadSalesUsers(int pSubCampaignId = 0, int DefaultSalesUserId = 0)
{
/**
* DAN: As don't know what is the purpose as on below code, id=0 belongs to Team.
* So if user select Team or 0 as id, it will not reflect because the default selected will be the
* Current User Id.
* https://brightvision.jira.com/browse/PLATFORM-2615
*
* if (DefaultSalesUserId == 0)
* DefaultSalesUserId = UserSession.CurrentUser.UserId;
*/
int _SubCampaignId = pSubCampaignId;
if (pSubCampaignId == 0)
_SubCampaignId = SubCampaignId;
/**
* pSubCampaignId:
* 0 = means that it will load the users for this current sub campaign.
* greater than 0 = means we must load the users of the selected nurture sub campaign.
*/
using (BrightPlatformEntities _efDbContext = new BrightPlatformEntities(UserSession.EntityConnection)) {
if (pSubCampaignId == 0) {
int _FinalListId = 0;
final_lists _efeFinalList = _efDbContext.final_lists.FirstOrDefault(i => i.sub_campaign_id == _SubCampaignId);
_efDbContext.Detach(_efeFinalList);
if (_efeFinalList != null)
_FinalListId = _efeFinalList.id;
if (m_FinalListId != _FinalListId)
m_FinalListId = _FinalListId;
if (m_FinalListId < 1)
return;
}
try {
if (salesScriptGetUsers != null)
salesScriptGetUsers.Clear();
List<CTSubCampaignUser> _lstItems = new List<CTSubCampaignUser>();
if (pSubCampaignId > 0)
_lstItems.Add(new CTSubCampaignUser() { id = 0, fullname = "Team" });
List<CTSubCampaignUser> _lstData = _efDbContext.FIGetSubCampaignUsers(_SubCampaignId).ToList();
if (_lstData.Count > 0)
foreach (CTSubCampaignUser _item in _lstData)
_lstItems.Add(_item);
cboSalesUser.Properties.DataSource = null;
cboSalesUser.Properties.DataSource = _lstItems;
cboSalesUser.Properties.DisplayMember = "fullname";
cboSalesUser.Properties.ValueMember = "id";
if (_lstItems.Exists(i => i.id == DefaultSalesUserId))
cboSalesUser.EditValue = DefaultSalesUserId;
else if (_lstItems.Exists(i => i.id == 0))
cboSalesUser.EditValue = 0;
}
catch {
return;
}
}
}