コード例 #1
0
        public int GetEarnPoints(int userId)
        {
            LatestTutorialsBL latestTutorialBL = new LatestTutorialsBL();

            List<LatestTechnologyBM> LatestTechnologyList=new List<LatestTechnologyBM>();

            List<LatestTutorialsBM> LatestTutorialsList = new List<LatestTutorialsBM>();

            LatestTechnologyList = this.GetTechnologyByUserId(userId);

            LatestTutorialsList = latestTutorialBL.GetTechnologyByUserId(userId);

            int points = 0;
            points = LatestTechnologyList.Sum(a => a.EarnPoint);

            points+=LatestTutorialsList.Sum(a => a.EarnPoint);
            return points;
        }
コード例 #2
0
ファイル: HomeController.cs プロジェクト: Vasu1990/ProWorld
        public JsonResult GetUserProfileData(int Id)
        {
            LatestTechnologyBL latestTechnologyBL = new LatestTechnologyBL();
            LatestTutorialsBL latestTutorialsBL = new LatestTutorialsBL();
            UserBM user = UserBL.GetUserById(Id);
            List<UserPostBM> postList = UserPostBL.GetUserPost().Where(a => a.UserId == Id).ToList();
            List<LatestTechnologyBM> lstTechnology = latestTechnologyBL.GetTechnologyByUserId(Id);
            List<LatestTutorialsBM> lstTutorials = latestTutorialsBL.GetTechnologyByUserId(Id);
            UserGeneralInformationBM generalInfo = UserGeneralInformationBL.GetGeneralInformationByUserId(Id);
            UserPersonalInformationBM personalInfo = UserPersonalInformationBL.GetPersonalInformationByUserId(Id);
            List<UserQualificatinBM> userQualificationList = UserQualificationBL.GetUserQualificatinByUserId(Id);
            List<UserProfessionalQualificationBM> userProfessionalList = UserProfessionalQualificationBL.GetProfessionalQualificationByUserId(Id);
            UserProfileModel Model = new UserProfileModel();

            Model.User = user;
            Model.UserPostList = postList;
            Model.LatestTechnologyBMList = lstTechnology;
            Model.LatestTutorialsBMList = lstTutorials;
            Model.UserGeneralInformation = generalInfo;
            Model.UserPersonalInformationBM = personalInfo;
            Model.UserQualificatinBM = userQualificationList;
            Model.UserProfessionalQualificationBM = userProfessionalList;
            return Json(Model);
        }