public IQueryable <ResignRecord> Search(ResignRecordSearchModel searchModel)
        {
            IQueryable <ResignRecord> certf = this.context.ResignRecord;

            if (!string.IsNullOrEmpty(searchModel.staffNr))
            {
                certf = certf.Where(c => c.staffNr.Contains(searchModel.staffNr.Trim()));
            }
            return(certf);
        }
Exemple #2
0
        public ResignRecordInfoModel GetResignRecordInfo(ResignRecordSearchModel searchModel)
        {
            ResignRecordInfoModel     info    = new ResignRecordInfoModel();
            DataContext               dc      = new DataContext(this.DbString);
            IResignRecordRepository   rep     = new ResignRecordRepository(dc);
            IQueryable <ResignRecord> results = rep.Search(searchModel);

            info.resignRecordCount = dc.Context.GetTable <ResignRecord>().Where(c => c.id.Equals(results.Count() > 0 ? results.First().id : -1)).Count();

            return(info);
        }
Exemple #3
0
 public IQueryable <ResignRecord> Search(ResignRecordSearchModel searchModel)
 {
     return(rep.Search(searchModel));
 }