Esempio n. 1
0
        public ActionResult Edit(int teacherId)
        {
            SchoolTeacherInputModel viewModel = new SchoolTeacherInputModel();

            viewModel.Yoh_SchoolId = CurrentUser.Teacher.Yoh_SchoolId;
            if (teacherId > 0)
            {
                var teacher = schoolTeacherBll.GetSchoolTeacher(teacherId);
                viewModel = viewModel.FromDbModel(teacher);
            }
            return(View(viewModel));
        }
Esempio n. 2
0
        public ActionResult Edit(int schoolId)
        {
            SchoolInputModel viewModel = new SchoolInputModel();

            viewModel.IsValidStr = "on";
            var school  = schoolBll.GetSchool(schoolId);
            var teacher = new Yw_SchoolTeacher();

            if (school != null)
            {
                teacher = schoolTeacherBll.GetSchoolTeacher(school.Bsl_SchoolMasterId);
                if (teacher.Yoh_Status != (int)StatusEnum.效)
                {
                    teacher = null;
                }
                viewModel          = viewModel.FromDbModel(school, teacher);
                viewModel.LoginPwd = "";
            }
            return(View(viewModel));
        }