protected void LoadData() { if (!NetUtil.CheckNetWork(CurrActivity)) { ToastUtil.ShowWarningToast(CurrActivity, "网络未连接!"); return; } //财年数据 if (BaseApplication.GetInstance().quarterList == null) { BaseApplication.GetInstance().quarterList = RenewService.GetQuarter(CurrUserInfo.SchoolId); } //区域数据 if (BaseApplication.GetInstance().districtList == null) { BaseApplication.GetInstance().districtList = RenewService.GetDistrictList(CurrUserInfo.SchoolId); } //默认财年 if (BaseApplication.GetInstance().quarterList != null && BaseApplication.GetInstance().quarterList.Any()) { quarterList = BaseApplication.GetInstance().quarterList; searchQuarter = BaseApplication.GetInstance().quarterList.Find(t => t.IsCurrent); tv_year.Text = searchQuarter.QuarterName; } //默认区域 if (BaseApplication.GetInstance().districtList != null && BaseApplication.GetInstance().districtList.Any()) { districtList = new List <string>(BaseApplication.GetInstance().districtList.Select(i => i.DistrictName).ToArray()); //加区域的权限判断--区域经理登录 if (CurrUserInfo.Type == (int)UserType.AreaManager) { districtList = districtList.Where(p => p == CurrUserInfo.DistrictName).ToList(); tv_district.Text = CurrUserInfo.DistrictName; searchDistrict = CurrUserInfo.DistrictName; } } //默认新生类型 if (categoryList != null && categoryList.Any()) { searchCagetory = categoryList[0]; tv_cagetory.Text = searchCagetory; } else { BindCategoryList(); } BindData(); }
/// <summary> /// 获取区域数据 /// </summary> private void LoadDistrictData() { try { new Thread(new ThreadStart(() => { BaseApplication.GetInstance().districtList = RenewService.GetDistrictList(currUserInfo.SchoolId); })).Start(); } catch (Exception ex) { var msg = ex.Message.ToString(); } }
/// <summary> /// 页面数据 /// </summary> protected void LoadData() { if (!NetUtil.CheckNetWork(CurrActivity)) { ToastUtil.ShowWarningToast(CurrActivity, "网络未连接!"); return; } LoadingDialogUtil.ShowLoadingDialog(CurrActivity, "获取数据中..."); if (BaseApplication.GetInstance().quarterList == null) { BaseApplication.GetInstance().quarterList = RenewService.GetQuarter(CurrUserInfo.SchoolId); } if (BaseApplication.GetInstance().gradeList == null) { BaseApplication.GetInstance().gradeList = RenewService.GetGradeList(CurrUserInfo.SchoolId); } if (BaseApplication.GetInstance().districtList == null) { BaseApplication.GetInstance().districtList = RenewService.GetDistrictList(CurrUserInfo.SchoolId); } if (BaseApplication.GetInstance().quarterList != null && BaseApplication.GetInstance().quarterList.Any()) { quarterList = BaseApplication.GetInstance().quarterList; searchQuarter = BaseApplication.GetInstance().quarterList.Find(t => t.IsCurrent); tv_btn1.Text = searchQuarter.QuarterName; } if (BaseApplication.GetInstance().gradeList != null && BaseApplication.GetInstance().gradeList.Any()) { gradeList = new List <string>(BaseApplication.GetInstance().gradeList.Select(i => i.GradeName).ToArray()); // 默认全选 searchGradeList = new List <string>(gradeList.ToArray()); } if (BaseApplication.GetInstance().districtList != null && BaseApplication.GetInstance().districtList.Any()) { districtList = new List <string>(BaseApplication.GetInstance().districtList.Select(i => i.DistrictName).ToArray()); } GetRenewInfoInGroup(); }
/// <summary> /// 获取数据 /// </summary> protected override void LoadData() { if (!NetUtil.CheckNetWork(CurrActivity)) { ToastUtil.ShowWarningToast(CurrActivity, "网络未连接!"); return; } LoadingDialogUtil.ShowLoadingDialog(CurrActivity, "获取数据中..."); if (BaseApplication.GetInstance().quarterList == null) { BaseApplication.GetInstance().quarterList = RenewService.GetQuarter(CurrUserInfo.SchoolId); } if (BaseApplication.GetInstance().gradeList == null) { BaseApplication.GetInstance().gradeList = RenewService.GetGradeList(CurrUserInfo.SchoolId); } if (BaseApplication.GetInstance().districtList == null) { BaseApplication.GetInstance().districtList = RenewService.GetDistrictList(CurrUserInfo.SchoolId); } if (BaseApplication.GetInstance().quarterList != null && BaseApplication.GetInstance().quarterList.Any()) { quarterList = BaseApplication.GetInstance().quarterList; } if (searchQuarter != null) { tv_btn1.Text = searchQuarter.QuarterName; } else { if (BaseApplication.GetInstance().quarterList != null && BaseApplication.GetInstance().quarterList.Any()) { searchQuarter = BaseApplication.GetInstance().quarterList.Find(t => t.IsCurrent); tv_btn1.Text = searchQuarter.QuarterName; } } if (BaseApplication.GetInstance().gradeList != null && BaseApplication.GetInstance().gradeList.Any()) { gradeList = new List <string>(BaseApplication.GetInstance().gradeList.Select(i => i.GradeName).ToArray()); } if (searchGradeList != null && searchGradeList.Any()) { var selectedgrade = "全部年级"; if (searchGradeList.Count > 0 && searchGradeList.Count != gradeList.Count) { selectedgrade = string.Join(",", searchGradeList.ToArray()); } tv_btn2.Text = selectedgrade; } else { // 默认全选 searchGradeList = new List <string>(gradeList.ToArray()); } if (BaseApplication.GetInstance().districtList != null && BaseApplication.GetInstance().districtList.Any()) { districtList = new List <string>(BaseApplication.GetInstance().districtList.Select(i => i.DistrictName).ToArray()); } if (!string.IsNullOrEmpty(searchDistrict)) { tv_btn3.Text = searchDistrict; } LoadingDialogUtil.ShowLoadingDialog(CurrActivity, "获取数据中..."); GetRenewInfoInTeacherByGroupCode(); }
protected void LoadData() { if (!NetUtil.CheckNetWork(CurrActivity)) { ToastUtil.ShowWarningToast(CurrActivity, "网络未连接!"); return; } //财年数据 if (BaseApplication.GetInstance().quarterList == null) { BaseApplication.GetInstance().quarterList = RenewService.GetQuarter(CurrUserInfo.SchoolId); } //区域数据 if (BaseApplication.GetInstance().districtList == null) { BaseApplication.GetInstance().districtList = RenewService.GetDistrictList(CurrUserInfo.SchoolId); } //年级数据 if (BaseApplication.GetInstance().gradeList == null) { BaseApplication.GetInstance().gradeList = RenewService.GetGradeList(CurrUserInfo.SchoolId); } //科目数据 if (BaseApplication.GetInstance().courseList == null) { BaseApplication.GetInstance().courseList = DistrictService.GetCourseList(CurrUserInfo.SchoolId); } //默认财年 if (BaseApplication.GetInstance().quarterList != null && BaseApplication.GetInstance().quarterList.Any()) { quarterList = BaseApplication.GetInstance().quarterList; searchQuarter = BaseApplication.GetInstance().quarterList.Find(t => t.IsCurrent); tv_year.Text = searchQuarter.QuarterName; } //默认区域 if (BaseApplication.GetInstance().districtList != null && BaseApplication.GetInstance().districtList.Any()) { districtList = new List <string>(BaseApplication.GetInstance().districtList.Select(i => i.DistrictName).ToArray()); //加区域的权限判断--区域经理登录 if (CurrUserInfo.Type == (int)UserType.AreaManager) { districtList = districtList.Where(p => p == CurrUserInfo.DistrictName).ToList(); tv_district.Text = CurrUserInfo.DistrictName; searchDistrict = CurrUserInfo.DistrictName; } } //默认年级 if (BaseApplication.GetInstance().gradeList != null && BaseApplication.GetInstance().gradeList.Any()) { gradeList = new List <string>(BaseApplication.GetInstance().gradeList.Select(i => i.GradeName).ToArray()); } if (searchGradeList != null && searchGradeList.Any()) { var selectedgrade = "全部年级"; if (searchGradeList.Count > 0 && searchGradeList.Count != gradeList.Count) { selectedgrade = string.Join(",", searchGradeList.ToArray()); } tv_grade.Text = selectedgrade; } else { // 默认全选 searchGradeList = new List <string>(gradeList.ToArray()); } //默认科目 if (BaseApplication.GetInstance().courseList != null && BaseApplication.GetInstance().courseList.Any()) { courseList = new List <string>(BaseApplication.GetInstance().courseList.Select(t => t.CourseName).ToArray()); searchCourse = BaseApplication.GetInstance().courseList[0].CourseName; tv_course.Text = searchCourse; } BindData(); }