コード例 #1
0
        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);
        }
コード例 #2
0
ファイル: ResignRecordService.cs プロジェクト: wpmyj/BlueHr
        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);
        }
コード例 #3
0
ファイル: ResignRecordService.cs プロジェクト: wpmyj/BlueHr
 public IQueryable <ResignRecord> Search(ResignRecordSearchModel searchModel)
 {
     return(rep.Search(searchModel));
 }