public Models.ExtraCurricular.ExtraCurricularActivityModel GetExtraCurricularActivityByID(int ExtraCurricularActivityID) { BusinessLogic.ExtraCurricular.ExtraCurricularActivityManager ExtraCurricularActivityManager = new BusinessLogic.ExtraCurricular.ExtraCurricularActivityManager(); BusinessEntity.ExtraCurricular.ExtraCurricularActivityEntity ExtraCurricularActivity = ExtraCurricularActivityManager.GetExtraCurricularActivityByID(ExtraCurricularActivityID); return(new Models.ExtraCurricular.ExtraCurricularActivityModel(ExtraCurricularActivity)); }
public List <Models.ExtraCurricular.ExtraCurricularActivityModel> GetExtraCurricularActivitys() { BusinessLogic.ExtraCurricular.ExtraCurricularActivityManager ExtraCurricularActivityManager = new BusinessLogic.ExtraCurricular.ExtraCurricularActivityManager(); List <BusinessEntity.ExtraCurricular.ExtraCurricularActivityEntity> ExtraCurricularActivitys = ExtraCurricularActivityManager.GetExtraCurricularActivitys(); List <Models.ExtraCurricular.ExtraCurricularActivityModel> ExtraCurricularActivityModels = new List <Models.ExtraCurricular.ExtraCurricularActivityModel>(); foreach (BusinessEntity.ExtraCurricular.ExtraCurricularActivityEntity ExtraCurricularActivity in ExtraCurricularActivitys) { ExtraCurricularActivityModels.Add(new Models.ExtraCurricular.ExtraCurricularActivityModel(ExtraCurricularActivity)); } return(ExtraCurricularActivityModels); }
public BusinessEntity.Result DeleteExtraCurricularActivity(Models.ExtraCurricular.ExtraCurricularActivityModel ExtraCurricularActivity) { BusinessEntity.Result result = new BusinessEntity.Result(); try { BusinessLogic.ExtraCurricular.ExtraCurricularActivityManager ExtraCurricularActivityManager = new BusinessLogic.ExtraCurricular.ExtraCurricularActivityManager(); result = ExtraCurricularActivityManager.DeleteExtraCurricularActivity(ExtraCurricularActivity.MapToEntity <BusinessEntity.ExtraCurricular.ExtraCurricularActivityEntity>()); return(result); } catch (Exception ex) { result.Status = false; result.Message = "ExtraCurricularActivity delete failed."; return(result); } }