コード例 #1
0
        private void BindAssignExerciseValues()
        {
            try
            {
                var objAssignExercise = ExerciseController.GetAssignExrciseByMember(MemberId);

                ddlMembers.SelectedValue = MemberId.ToString();
                BodyType = objAssignExercise[0].bodyTypeId.Value;

                ddlBodyType.SelectedValue = objAssignExercise[0].bodyTypeId.ToString();
                var lstNonArobicExercises = objAssignExercise.Where(x => x.ExerciseCardMaster.exerciseTypeId == 2).ToList();
                ddlLevel.SelectedValue = lstNonArobicExercises[0].levelId == null ? "0" : lstNonArobicExercises[0].levelId.ToString();
                LevelId = lstNonArobicExercises[0].levelId.Value;

                lstArobicExercise.DataSource = ExerciseController.GetArobicExercise(BodyType, MemberId, LoginUser.ClubId);
                lstArobicExercise.DataBind();

                lstNonArobicExercise.DataSource = ExerciseController.GetNonArobicExercise(BodyType, LevelId, MemberId, LoginUser.ClubId);
                lstNonArobicExercise.DataBind();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }