Пример #1
0
        public ActionResult Index()
        {
            int userId = Com.Cos.Common.Public.GetLoginUid();
            var user   = _memberService.Find(userId);

            ViewBag.User = user;
            return(View("Index"));
        }
Пример #2
0
        public MemberController()
        {
            _memberService          = new MemberService();
            _rechargeRecordService  = new RechargeRecordService();
            _exchangeService        = new ExchangeService();
            _integralSourceService  = new IntegralSourceService();
            _exchangeExamineService = new ExchangeExamineService();
            _imgService             = new ImgService();
            _cooperationService     = new CooperationService();

            _userId = Com.Cos.Common.Public.GetLoginUid();
            _member = _memberService.Find(_userId);
        }
Пример #3
0
        private readonly Com.Cos.Models.Member _member; //登录的用户

        public ExchangeController()
        {
            _exchangeService        = new ExchangeService();
            _memberService          = new MemberService();
            _exchangeClassService   = new ExchangeClassService();
            _exchangeExamineService = new ExchangeExamineService();
            _imgService             = new ImgService();
            _mailingAddressService  = new MailingAddressService();

            _userId = Com.Cos.Common.Public.GetLoginUid();         //登录的用户id
            _member = _memberService.Find(_userId);                //登录的用户

            ViewBag.Classes  = _exchangeClassService.FindList();   //全部兑换分类
            ViewBag.Examines = _exchangeExamineService.FindList(); //全部兑换状态
        }
Пример #4
0
        public ActionResult Detail(int id)
        {
            var exchange = _exchangeService.Find(id);

            exchange.Certificate = TWEBURL.WEB_URL_IMG + _imgService.Find(exchange.Certificate.ToInt32())?.ImgBigUrl;
            string[] imgs = exchange.ImgList.Split(',');
            exchange.ImgList = "";
            foreach (string img in imgs)
            {
                exchange.ImgList += TWEBURL.WEB_URL_IMG + _imgService.Find(img.ToInt32())?.ImgBigUrl + ",";
            }
            exchange.ImgList = exchange.ImgList.TrimEnd(',');
            exchange.Examine = exchange.Examine == null ? "0" : exchange.Examine == "0" ? "0" : exchange.Examine;
            exchange.ClassId = _exchangeClassService.Find(exchange.ClassId.ToInt32()).ClassName;

            ViewBag.Exchange = exchange;
            var member = _memberService.Find(exchange.UserId.ToInt32());  //发布该兑换信息的用户

            member.Portrait = TWEBURL.WEB_URL_IMG + member.Portrait;
            ViewBag.Member  = member;
            return(View("Detail"));
        }