Ejemplo n.º 1
0
        public static string AddPostGraduationDetails(string PostGraduation, string Specialization, string University, string Municipality, int StateID, int StartMonth, int StartYear, int EndMonth, int EndYear, bool Attending)
        {
            UserProfileInfo userProfileInfo = new UserProfileInfo();
            string          message         = Constant.CONST_EDUCATION_INFORMATION_FAILURE;

            if (SessionWrapper.LoggedUser == null)
            {
                return(message = Constant.SESSION_EXPIRE);
            }
            try
            {
                OrderDetails         orderDetails          = GetSessionOrderDetails();
                PostGraduationDetail postGraduationDetails = new PostGraduationDetail();

                UserPostGraduation userPostGraduation;

                postGraduationDetails.PostGraduation = PostGraduation.Trim();
                postGraduationDetails.Specialization = Specialization.Trim();
                postGraduationDetails.University     = University.Trim();
                postGraduationDetails.Municipality   = Specialization.Trim();
                postGraduationDetails.StateId        = StateID;
                postGraduationDetails.StartMonth     = StartMonth;
                postGraduationDetails.StartYear      = StartYear;
                postGraduationDetails.EndMonth       = EndMonth;
                postGraduationDetails.EndYear        = EndYear;
                postGraduationDetails.IsAttending    = Attending;

                orderDetails.EducationalDetail.PostGraduationDetails = new List <PostGraduationDetail>();
                orderDetails.EducationalDetail.PostGraduationDetails.Add(postGraduationDetails);

                userPostGraduation = new UserPostGraduation();

                userPostGraduation.PostGraduation = PostGraduation.Trim();
                userPostGraduation.Specialization = Specialization.Trim();
                userPostGraduation.University     = University.Trim();
                userPostGraduation.Municipality   = Specialization.Trim();
                userPostGraduation.StateId        = StateID;
                userPostGraduation.StartMonth     = StartMonth;
                userPostGraduation.StartYear      = StartYear;
                userPostGraduation.EndMonth       = EndMonth;
                userPostGraduation.EndYear        = EndYear;
                userPostGraduation.IsAttending    = Attending;

                userPostGraduation.UserId = SessionWrapper.LoggedUser.UserId;

                userProfileInfo = UserEducationalDetailHelper.SaveUserPostGraduation(userPostGraduation);


                if (userProfileInfo.IsFirstRecord)
                {
                    message = Constant.CONST_EDUCATION_INFORMATION_ADD_SUCCESS;
                }
                else
                {
                    message = Constant.CONST_EDUCATION_INFORMATION_SUCCESS;
                }
            }
            catch { }
            return(message);
        }
        public static PostGraduationDetail GetPostGraduationInfoByEducationInfoId(int educationDetailId)
        {
            PostGraduationDetail educationalDetail = new PostGraduationDetail();
            Repository <PostGraduationDetail> educationalRepository = new Repository <PostGraduationDetail>("EducationalDetailId");

            educationalDetail = educationalRepository.SelectByKey(educationDetailId.ToString());
            return(educationalDetail);
        }