Example #1
0
        /// <summary>
        /// 各班级提交详情
        /// </summary>
        /// <param name="zyId"></param>
        /// <returns></returns>
        public ActionResult SubmitDetail(long zyId)
        {
            int id = IdNamingHelper.Decrypt(IdNamingHelper.IdTypeEnum.Zy, zyId);
            List <dto_ClassSubmitCount> Classes = B_Analyze.GetSubmitClasses(id);

            if (Classes != null)
            {
                Classes.ForEach(a =>
                {
                    if (a.SchoolId == 0 && a.GradeId == 0 && a.ClassId == 0)
                    {
                        a.SchoolName = "试用学校";
                        a.GradeName  = "试用年级";
                        a.ClassName  = "试用班";
                    }
                    else
                    {
                        a.SchoolName = B_BaseRedis.GetSchool(a.SchoolId).SchoolName;
                        a.GradeName  = Const.Grades[a.GradeId];
                        a.ClassName  = a.ClassId + "班";
                    }
                });
            }
            ViewBag.Classes = Classes;
            ViewBag.ZyId    = zyId;
            return(View());
        }
Example #2
0
        public ActionResult RequestModify()
        {
            dto_ModifyRequest drm = B_User.GetModifyRequest(UserId);

            if (drm != null)
            {
                drm.FromSchoolName = B_BaseRedis.GetSchool(drm.FromSchoolId).SchoolName;
                drm.ToSchoolName   = B_BaseRedis.GetSchool(drm.ToSchoolId).SchoolName;
            }
            ViewBag.Model     = drm;
            ViewBag.Provinces = Const.Provinces;
            return(PartialView());
        }
Example #3
0
        public JsonResult SearchSchools(int districtId, string keywords)
        {
            List <T_School> sl = B_BaseRedis.GetSchools(districtId);

            if (!string.IsNullOrEmpty(keywords))
            {
                if (sl != null)
                {
                    sl = sl.FindAll(a => a.SchoolName.Contains(keywords));
                }
            }
            return(Json(sl));
        }
Example #4
0
        public JsonResult AddModifyRequest(int schoolId, string reason)
        {
            dto_User u = B_UserRedis.GetUser(UserId);

            dto_ModifyRequest mr = new dto_ModifyRequest()
            {
                UserId = UserId, FromSchoolId = u.SchoolId, ToSchoolId = schoolId, Reason = reason, CreateDate = DateTime.Now, Status = 0
            };
            int i = B_User.AddModifyRequest(mr);

            if (i != 0)
            {
                mr.Id             = i;
                mr.CreateDateStr  = mr.CreateDate.ToString("yyyy-MM-dd HH:mm:ss");
                mr.FromSchoolName = B_BaseRedis.GetSchool(mr.FromSchoolId).SchoolName;
                mr.ToSchoolName   = B_BaseRedis.GetSchool(mr.ToSchoolId).SchoolName;
                return(Json(mr));
            }
            return(null);
        }
Example #5
0
        public JsonResult GetDistricts(int cityId)
        {
            List <T_District> dl = B_BaseRedis.GetDistricts(cityId);

            return(Json(dl));
        }
Example #6
0
        public JsonResult GetCites(int provinceId)
        {
            List <T_City> cl = B_BaseRedis.GetCities(provinceId);

            return(Json(cl));
        }