1234567891011121314151617181920212223242526272829303132333435363738 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using EMISOnline.Entities;
- using Bowin.Common.Linq.Entity;
- using System.Linq.Expressions;
- using EMISOnline.DataLogic.Educational;
- namespace EMISOnline.CommonLogic.EducationalServices
- {
- public class ScoreRuleServices : BaseServices, IScoreRuleServices
- {
- public ScoreRuleDAL ScoreRuleDAL { get; set; }
- public IGridResultSet<ER_ScoreRule> GetScoreRuleList(int pageIndex, int pageSize)
- {
- Expression<Func<ER_ScoreRule, bool>> exp = (e => true);
- var list = ScoreRuleDAL.GetScoreRuleList(exp).OrderByDescending(r => r.ScoreRuleID).ToGridResultSet(pageIndex, pageSize);
- return list;
- }
- public ER_ScoreRule GetScoreRule(Guid ScoreRuleID)
- {
- return ScoreRuleDAL.ScoreRuleRepository.GetSingle(e => e.ScoreRuleID == ScoreRuleID);
- }
- public void AddScoreRule(ER_ScoreRule model)
- {
- UnitOfWork.Remove<ER_ScoreRule>(e => true);
- UnitOfWork.Add(model);
- UnitOfWork.Commit();
- }
- }
- }
|