var notice = (from n in context.Notice join nd in context.NoticeDetail on n.ID equals nd.NoticeID where nd.SenderLocationID == locationID && nd.SenderActionID == sent && nd.Title !="" select new { NoticeID = nd.NoticeID, NoticeDetailID = nd.ID, From = (currentLanguage == enmLanguage.English) ? nd.SenderPanchayatiRajLocation.Name : nd.SenderPanchayatiRajLocation.NameRegional, Subject = nd.Title, Date = nd.CreatedOn, Priority = (currentLanguage == enmLanguage.English) ? n.Priority.Name : n.Priority.Name_Regional, SentMail = context.NoticeRecipients.Where(a => a.NoticeDetailID == nd.ID).Count(), Replies = context.NoticeRecipients.Where(a => a.ReceiverLocationID == locationID && (a.ReceiverActionID == received || a.ReceiverActionID == read) && a.NoticeDetail.NoticeID == nd.NoticeID).Count() }).Distinct(); notice = notice.OrderBy(s => s.Priority).ThenBy(s => s.Date); PagingBar1.Bind(notice, ref gvReceive);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)