Ejemplo n.º 1
0
        public ActionResult Index()
        {
            // 未完了タスク数取得
            ToDoManager m1 = new ToDoManager();

            ViewBag._ToDoCount = m1.GetToDoList().Count();

            // 未完了取引数取得
            DealManager m2 = new DealManager();

            ViewBag._DealsCount = m2.GetDealList(new SeachCondition()).Count();

            return(View());
        }
Ejemplo n.º 2
0
        public ActionResult Index(int?seachFlag, int?year, int?month, bool?kanryo, string keyword, int?endDealId)
        {
            SeachCondition condition = new SeachCondition(year, month, kanryo, keyword);

            if (Session["DealSearch"] != null && seachFlag == null)
            {
                condition = (SeachCondition)Session["DealSearch"];
            }

            // 完了
            m.EndDeal(endDealId);

            // 取引リスト取得
            List <DealViewModel> deals = m.GetDealList(condition);

            Session["DealSearch"] = condition;

            ViewBag.year    = m.GetYearOptions(condition.Year);
            ViewBag.month   = m.GetMonthOptions(condition.Month);
            ViewBag.keyword = condition.Keyword;
            ViewBag.Kanryo  = condition.Kanryo;

            return(View(deals.ToList()));
        }