public virtual ActionResult Manage(ContactUsSearchFilter filter) { if (!Request.IsAjaxRequest()) { return(View(_ContactUsSrv.Get(filter))); } else { return(PartialView("Partials/_List", _ContactUsSrv.Get(filter))); } }
public PagingListDetails <ContactUs> Get(ContactUsSearchFilter filter) { Expression <Func <ContactUs, bool> > conditions = x => true; if (filter != null) { if (!string.IsNullOrWhiteSpace(filter.Subject)) { conditions = conditions.And(x => x.Subject.Contains(filter.Subject)); } if (!string.IsNullOrWhiteSpace(filter.MobileNumber)) { conditions = conditions.And(x => x.MobileNumber == long.Parse(filter.MobileNumber)); } } return(_appUow.ContactUsRepo.Get(conditions, filter, x => x.OrderByDescending(i => i.ContactUsId))); }