using System; using System.Collections.Generic; using System.Linq; using System.Text; using EMIS.DataLogic.Repositories; using EMIS.ViewModel; namespace EMIS.DataLogic.ScoreManage { public class ExamsStateSettingDAL { public ExamsStateSettingRepository ExamsStateSettingRepository { get; set; } public DictionaryItemRepository DictionaryItemRepository { get; set; } public int? GetExaminationSuspensionID() { var examinationSuspensionID = ExamsStateSettingRepository .GetList(x => x.IsSuspension == true) .Select(x => x.ExamsStateID) .FirstOrDefault(); return examinationSuspensionID; } public int? GetNormalID() { var normalID = ExamsStateSettingRepository .GetList(x => x.IsNormal == true) .Select(x => x.ExamsStateID) .FirstOrDefault(); return normalID; } public int? GetExaminationExemptionID() { var examinationExemptionID = ExamsStateSettingRepository .GetList(x => x.IsExemption == true) .Select(x => x.ExamsStateID) .FirstOrDefault(); return examinationExemptionID; } //public decimal? GetExemptionScore() //{ // var Score = ExamsStateSettingRepository // .GetList(x => x.IsExemption == true) // .Select(x => x.Score) // .FirstOrDefault(); // return Score; //} public List GetMisconductIDList() { var q = ExamsStateSettingRepository .GetList(x => x.IsMisconduct == true) .Select(x => x.ExamsStateID) .ToList(); return q.ToList(); } public List GetResitIDList() { var q = ExamsStateSettingRepository .GetList(x => x.CanResit == true) .Select(x => x.ExamsStateID) .ToList(); return q.ToList(); } public int? GetSuspensionResitCategory() { var q = ExamsStateSettingRepository .GetList(x => x.ExamsStateID == (int)CF_ExamsState.Suspension) .Select(x => x.ResitCategory); return q.FirstOrDefault(); } public List GetCanGraduateList() { var q = ExamsStateSettingRepository .GetList(x => x.CanGraduateResit == true) .Select(x => x.ExamsStateID) .ToList(); return q.ToList(); } } }