Exemple #1
0
 /// <summary>
 /// 获取学年表视图列表分页
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public BaseResultModel <PageModel <AcademicYearViewModel> > ListViewPageAcademicYear(AcademicYearViewModel model)
 {
     try
     {
         if (model == null)
         {
             model = new AcademicYearViewModel()
             {
                 PageNO   = 1,
                 PageSize = int.MaxValue
             };
         }
         // 开启查询outModel里面的视图
         using (this.AcademicYearRepository.BeginSelView())
         {
             using (this.AcademicYearRepository.BeginLikeMode())
             {
                 return(new SuccessResultModel <PageModel <AcademicYearViewModel> >(this.AcademicYearRepository.ListViewPage(model)));
             }
         }
     }
     catch (Exception e)
     {
         LogWriter.WriteLog(EnumLogLevel.Fatal, "ListViewPageAcademicYear", JsonConvert.SerializeObject(model), "AcademicYear", "获取学年表视图列表分页查询数据时发生错误.", e);
         return(new ErrorResultModel <PageModel <AcademicYearViewModel> >(EnumErrorCode.系统异常, "获取学年表视图列表分页查询数据时发生错误!"));
     }
 }
Exemple #2
0
 public AcademicYearPage(int year)
 {
     InitializeComponent();
     BindingContext = new AcademicYearViewModel()
     {
         Year = year
     };
 }
Exemple #3
0
        public void ListViewPageAcademicYear_Test()
        {
            AcademicYearViewModel testModel = null;
            BaseResultModel <PageModel <AcademicYearViewModel> > result = AcademicYearService.ListViewPageAcademicYear(testModel);

            Assert.IsTrue(result.IsSuccess && result.Data.DataCount > 0, result.ErrorMessage);

            testModel = new AcademicYearViewModel()
            {
                PageNO           = 1,
                PageSize         = 2,
                AcademicYearName = "测试AcademicYearName"
            };
            result = AcademicYearService.ListViewPageAcademicYear(testModel);
            Assert.IsTrue(result.IsSuccess, result.ErrorMessage);
        }
Exemple #4
0
 /// <summary>
 /// 获取学年表视图列表分页
 /// </summary>
 /// <param name="model">ViewModel</param>
 /// <returns>ViewModel</returns>
 public BaseResultModel <PageModel <AcademicYearViewModel> > ListViewPageAcademicYearAAA(AcademicYearViewModel model)
 {
     return(AcademicYearService.ListViewPageAcademicYearAAA(model));
 }