Ejemplo n.º 1
0
        public ShareModel GetShareDates(Guid memberShipId)
        {
            ShareModel shareModel = new ShareModel();
            var        memberShip = _memberShipsQueryService.Find(memberShipId);

            shareModel.NickName = memberShip.NickName;
            shareModel.Icon     = memberShip.Icon;
            DateTime now  = DateTime.Now;
            TimeSpan days = now - memberShip.CreateOn;

            shareModel.OPIMAge = days.Days;
            var time = DateTime.Now.ToString("yyyy/MM/dd").Substring(0, 7);

            shareModel.CurrMonthIn  = _recordQueryService.Find(memberShipId, time, 0).Sum(p => p.Money);
            shareModel.CurrMonthOut = _recordQueryService.Find(memberShipId, time, 1).Sum(p => p.Money);
            return(shareModel);
        }
Ejemplo n.º 2
0
        public List <MemberShipsView> QueryMemberShipsList(string search, out int total, string orderBy, string orderType, int pageIndex, int pageSize)
        {
            var list = _memberShipsQueryService.Find(search, out total, orderBy, orderType, pageIndex, pageSize).ToList();

            return(list);
        }