示例#1
0
        public ActionResult SettingToCourseToProductLevelCourseTypeCourseList(int branchId, int productLevelId, int productLevelCourseTypeId)
        {
            var model = Eme.BLL.Eme.ProductBLL.GetProductLevelCourseTypeCourseList(branchId, productLevelCourseTypeId);

            var modelConfig = Eme.BLL.Acs.BranchBLL.GetTeacherProductLevelCourseTypeCourseConfigList(branchId, productLevelId, productLevelCourseTypeId);

            var courseModelList = new List<CourseModel>();

            foreach (var item in model)
            {
                var courseModel = new CourseModel();
                if (modelConfig.Any(a => a.ProductLevelCourseTypeCourseID == item.Id
                    && a.BranchId == branchId
                    && a.ProductLevelID == productLevelId
                    && a.Status == ConvertEnum.StatusTypeForActive))
                {
                    var modelConfigItem = modelConfig.FirstOrDefault(a => a.ProductLevelCourseTypeCourseID == item.Id
                    && a.BranchId == branchId
                    && a.ProductLevelID == productLevelId
                    && a.Status == ConvertEnum.StatusTypeForActive);
                    courseModel.CourseName = modelConfigItem.CourseName;
                    courseModel.ProductLevelCourseTypeCourseID = modelConfigItem.ProductLevelCourseTypeCourseID;
                    courseModel.TeacherType = modelConfigItem.TeacherType;
                }
                else
                {
                    courseModel.CourseName = string.Format("{0}", string.IsNullOrEmpty(item.Course.EName) ? item.Course.CName : item.Course.EName);
                    courseModel.ProductLevelCourseTypeCourseID = item.Id;
                    courseModel.TeacherType = 104;
                }
                courseModel.OrderNum = item.OrderNum.Value;
                courseModelList.Add(courseModel);
            }

            return PartialView("_TeacherTypeToCourseList", courseModelList.OrderBy(p => p.OrderNum).ToList());
        }
示例#2
0
        /// <summary>
        /// 作者:Primo
        /// 时间:
        /// 描述:加载课节
        /// </summary>
        /// <param name="branchId"></param>
        /// <param name="productLevelId"></param>
        /// <param name="productLevelCourseTypeId"></param>
        /// <returns></returns>
        public ActionResult LoadUpdateArrangeCourseToProductLevelCourseTypeCourseList(int branchId, int productLevelId, int productLevelCourseTypeId)
        {
            var model = Eme.BLL.Eme.ProductBLL.GetProductLevelCourseTypeCourseList(branchId, productLevelCourseTypeId);
            var courseModelList = new List<CourseModel>();
            foreach (var item in model)
            {
                var courseModel = new CourseModel();
                courseModel.CourseName = string.Format("{0}", string.IsNullOrEmpty(item.Course.EName) ? item.Course.CName : item.Course.EName);
                courseModel.ProductLevelCourseTypeCourseID = item.Id;
                courseModel.TeacherType = 0;
                courseModel.OrderNum = item.OrderNum.Value;
                courseModel.ClassTime = item.Course.ClassTime / 60;
                courseModelList.Add(courseModel);
            }

            return PartialView("_UpdateArrangeCourseToProductLevelCourseTypeCourseList", courseModelList.OrderBy(p => p.OrderNum).ToList());
        }