/// <summary> /// 删除 /// </summary> /// <param name="CID">企业ID</param> /// <returns></returns> public OpResult Deletes(int CID) { var list = VisitTrackRepository.GetQuery(o => o.CID == CID).ToList(); VisitTrackRepository.RemoveRange(list); return(OpResult.Success()); }
/// <summary> /// 获取回访小结 /// </summary> /// <param name="CID"></param> /// <returns></returns> public List <ViewVisitTrack> getVisitTrackList(int CID) { var visit = VisitTrackRepository.GetQuery(o => o.CID == CID); var sysUserInfo = SysUserInfoRepository.GetQuery(); var vis = from v in visit join s in sysUserInfo on v.CreateUID equals s.UserId into ss from sss in ss.DefaultIfEmpty() orderby v.VisitDT select new ViewVisitTrack { VisitDT = v.VisitDT, Content = v.Content, FullName = sss == null ? "" : sss.FullName, CreateUID = v.CreateUID, CreateDT = v.CreateDT, UpdateDT = v.UpdateDT }; return(vis.ToList()); }