Exemplo n.º 1
0
        // GET: Spending
        public ActionResult Index()
        {
            SpendingListViewModels models = new SpendingListViewModels
            {
                spending     = new SpendingViewModels(),
                SpendingList = AccountBookService.GetAccountBookList()
            };

            List <SelectListItem> mySelectItemList = new List <SelectListItem>();

            mySelectItemList.AddRange(new[] {
                new SelectListItem()
                {
                    Text = "支出", Value = "0"
                },
                new SelectListItem()
                {
                    Text = "收支", Value = "1"
                }
            });
            return(View(models));
        }