Ejemplo n.º 1
0
        public ActionResult Edit(int id)
        {
            PrepareTrainingApplyBLL bll = new PrepareTrainingApplyBLL();
            NationalAbility_CourseBLL nationalAbility_CourseBLL = new NationalAbility_CourseBLL();
            Traning_Detail model = bll.GetTrainingDetail(Convert.ToInt32(id), "Delflag=0 and (Status=1 or Status=4 or CanEdit=1)");
            if (model == null)
            {
                return Content("<script>setTimeout(function () { window.location.href = '/Prepare/TrainingApply/List' }, 3000);</script>操作失败,3秒后自动返回到列表!");
            }

            ViewBag.TrainingObjectData = bll.GetTraningObject();
            ViewBag.SubjectData = bll.GetSubject();
            ViewBag.StudyLevelData = bll.GetStudyLevel();
            ViewBag.TrainingFormData = bll.GetTrainingForm();
            ViewBag.TeacherTitleData = bll.GetTeacherTitle();
            ViewBag.TrainingFeildData = bll.GetTrainingField("Delflag=0 and IsSpec=0", "");
            ViewBag.TrainingCategoryData = bll.GetTrainingCategory("Delflag=0 and Field=" + model.TraingField, "");
            ViewBag.TrainingTopicData = bll.GetTrainingTopic("Delflag=0 and CategoryId=" + model.TraingCategory, "");
            ViewBag.NationalCoursData = nationalAbility_CourseBLL.GetList2("Delflag=0 and TCategoryId=" + model.TraingCategory, "");
            ViewBag.AttachData = bll.GetAttachTable("Delflag=0 and TraningId=" + id, "");
            ViewBag.OutCourseTypeData = bll.GetOutCourseType("Delflag=0", "");
            Organ_Detail otypeModel = new Organ_DetailBLL().GetModel(Code.SiteCache.Instance.ManageOrganId);
            ViewBag.OTypeId = otypeModel == null ? 0 : Convert.ToInt32(otypeModel.OType);
            return View(model);
        }
Ejemplo n.º 2
0
        public ActionResult Details(int id)
        {
            PrepareTrainingApplyBLL bll = new PrepareTrainingApplyBLL();
            Traning_Detail model = bll.GetTrainingDetail(id, "Delflag=0");
            if (model == null)
            {
                return Content("<script>setTimeout(function () { window.location.href = '/Prepare/TrainingApply/List' }, 3000);</script>操作失败,3秒后自动返回到列表!");
            }

            ViewBag.TrainingObjectData = bll.GetTraningObject();
            ViewBag.SubjectData = bll.GetSubject();
            ViewBag.StudyLevelData = bll.GetStudyLevel();
            ViewBag.TrainingFormData = bll.GetTrainingForm();
            ViewBag.TeacherTitleData = bll.GetTeacherTitle();
            ViewBag.TrainingFeildData = bll.GetTrainingField("Delflag=0 and IsSpec=0", "");
            ViewBag.TrainingCategoryData = bll.GetTrainingCategory("Delflag=0 and Field=" + model.TraingField, "");
            ViewBag.TrainingTopicData = bll.GetTrainingTopic("Delflag=0 and CategoryId=" + model.TraingCategory, "");
            ViewBag.AttachData = bll.GetAttachTable("Delflag=0 and TraningId=" + id, "");
            ViewBag.OutCourseTypeData = bll.GetOutCourseType("Delflag=0", "");
            ViewBag.NationalCoursData = new NationalAbility_CourseBLL().GetList2("Delflag=0 and TCategoryId=" + model.TraingCategory, "");
            return View(model);
        }