コード例 #1
0
        public Models.Lookup.GradeSectionModel GetGradeSectionByID(int GradeSectionID)
        {
            BusinessLogic.Lookup.GradeSectionManager GradeSectionManager = new BusinessLogic.Lookup.GradeSectionManager();
            BusinessEntity.Lookup.GradeSectionEntity GradeSection        = GradeSectionManager.GetGradeSectionByID(GradeSectionID);

            return(new Models.Lookup.GradeSectionModel(GradeSection));
        }
コード例 #2
0
        public List <Models.Lookup.GradeSectionModel> GetGradeSections()
        {
            BusinessLogic.Lookup.GradeSectionManager GradeSectionManager = new BusinessLogic.Lookup.GradeSectionManager();

            List <BusinessEntity.Lookup.GradeSectionEntity> GradeSections      = GradeSectionManager.GetGradeSections();
            List <Models.Lookup.GradeSectionModel>          GradeSectionModels = new List <Models.Lookup.GradeSectionModel>();

            foreach (BusinessEntity.Lookup.GradeSectionEntity GradeSection in GradeSections)
            {
                GradeSectionModels.Add(new Models.Lookup.GradeSectionModel(GradeSection));
            }

            return(GradeSectionModels);
        }
コード例 #3
0
        public BusinessEntity.Result DeleteGradeSection(Models.Lookup.GradeSectionModel GradeSection)
        {
            BusinessEntity.Result result = new BusinessEntity.Result();
            try
            {
                BusinessLogic.Lookup.GradeSectionManager GradeSectionManager = new BusinessLogic.Lookup.GradeSectionManager();
                result = GradeSectionManager.DeleteGradeSection(GradeSection.MapToEntity <BusinessEntity.Lookup.GradeSectionEntity>());

                return(result);
            }
            catch (Exception ex)
            {
                result.Status  = false;
                result.Message = "GradeSection delete failed.";

                return(result);
            }
        }