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 GetScoreRuleList(int pageIndex, int pageSize) { Expression> 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(e => true); UnitOfWork.Add(model); UnitOfWork.Commit(); } } }