public Models.Lookup.GradeModel GetGradeByID(int GradeID) { BusinessLogic.Lookup.GradeManager GradeManager = new BusinessLogic.Lookup.GradeManager(); BusinessEntity.Lookup.GradeEntity Grade = GradeManager.GetGradeByID(GradeID); return(new Models.Lookup.GradeModel(Grade)); }
public List <Models.Lookup.GradeModel> GetGrades() { BusinessLogic.Lookup.GradeManager GradeManager = new BusinessLogic.Lookup.GradeManager(); List <BusinessEntity.Lookup.GradeEntity> Grades = GradeManager.GetGrades(); List <Models.Lookup.GradeModel> GradeModels = new List <Models.Lookup.GradeModel>(); foreach (BusinessEntity.Lookup.GradeEntity Grade in Grades) { GradeModels.Add(new Models.Lookup.GradeModel(Grade)); } return(GradeModels); }
public BusinessEntity.Result DeleteGrade(Models.Lookup.GradeModel Grade) { BusinessEntity.Result result = new BusinessEntity.Result(); try { BusinessLogic.Lookup.GradeManager GradeManager = new BusinessLogic.Lookup.GradeManager(); result = GradeManager.DeleteGrade(Grade.MapToEntity <BusinessEntity.Lookup.GradeEntity>()); return(result); } catch (Exception ex) { result.Status = false; result.Message = "Grade delete failed."; return(result); } }