using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using RFrameGenerate.BLL;
using RFrameGenerate.Model;
using System.Net;
using RFrameGenerate.BLL.Products;
using RFrameGenerate.Common;
using Wechat;

namespace jiouosdp.Controllers.WX
{
    public class PurseController : BaseWeiXinController
    {
        //
        // GET: /Purse/

        public ActionResult Index()
        {
            return View();
        }


        //资产明细展示
        public ActionResult PurseDetailList()
        {
            return View();
        }


        #region 资产指定类型明细列表
        public JsonResult GetPurseDetailList(GridModel gridModel, int? TradingType)
        {
            var list = MemberAccountManage.GetPageList(gridModel, TradingType);
            object listSel = new List<object>();
            if (list != null && list.Count > 0)
            {
                listSel = list.Select(
                        c => new
                        {
                            TradingDate = c.TradingDate.ToString("yyyy-MM-dd"),
                            c.TradingAmount,
                            c.AvailableBalance,
                            c.TradingType,
                            c.TradingMain, 
                        }
                    );
            }
            return Json(listSel);
        }
        #endregion

    }
}
