namespace YLErp.Web.Models { public static class ClientModelHelper { /// /// 获取所有联系人类型 /// public static List 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; } } } }