29 lines
947 B
C#
29 lines
947 B
C#
namespace YLErp.Web.Models
|
|
{
|
|
public static class ClientModelHelper
|
|
{
|
|
/// <summary>
|
|
/// 获取所有联系人类型
|
|
/// </summary>
|
|
public static List<SelectListItem> GetAllcontactype(bool IsProdunct = true)
|
|
{
|
|
using (var con = DbContextFactory.GetClientDbContext(null))
|
|
{
|
|
var retList = con.contactype.Select(m => new SelectListItem
|
|
{
|
|
Text = m.ContactType,
|
|
Value = m.id + ""
|
|
}).ToList();
|
|
if (!IsProdunct)
|
|
{
|
|
var productionManager = retList.Where(o => o.Text == "产品投资经理").FirstOrDefault();
|
|
if (productionManager != null)
|
|
{
|
|
retList.Remove(productionManager);
|
|
}
|
|
}
|
|
return retList;
|
|
}
|
|
}
|
|
}
|
|
} |