using System; using System.Collections.Generic; using System.Linq; using System.Text; using Edu.AOP.CustomerAttribute; using Edu.Model.ViewModel.User; using Edu.Repository.User; namespace Edu.Module.User { public class AccountRemarkModule { /// /// 行政备注管理处理类对象 /// private readonly RB_AccountRemarkRepository accountRemarkRepository = new RB_AccountRemarkRepository(); /// /// 获取行政备注列表 /// /// /// public List GetAccountRemarkListModule(RB_AccountRemark_ViewModel query) { return accountRemarkRepository.GetList(query); } /// /// 获取行政备注分页列表 /// /// /// /// /// /// public List GetAccountRemarkPageListModule(int pageIndex, int pageSize, out long rowsCount, RB_AccountRemark_ViewModel query) { return accountRemarkRepository.GetPageList(pageIndex, pageSize, out rowsCount, query); } /// /// 获取分页列表 /// /// /// /// /// /// public List GetPageList(int pageIndex, int pageSize, out long rowsCount, RB_AccountRemark_ViewList demodel) { var list = accountRemarkRepository.GetAccountRemarkPageList(pageIndex, pageSize, out rowsCount, demodel); if (list!=null&& list.Any()) { var childList = accountRemarkRepository.GetListByWhere(demodel); foreach (var item in list) { item.AccountRemarkList = new List(); item.AccountRemarkList = childList.Where(x => x.CreateTime.Value.ToString("yyyy-MM-dd") == item.CreateStr).ToList(); } } return list; } /// /// 添加修改行政备注 /// /// /// public bool SetAccountRemarkModule(RB_AccountRemark_ViewModel model) { bool flag; var newId = accountRemarkRepository.Insert(model); model.Id = newId; flag = newId > 0; return flag; } } }