Ejemplo n.º 1
0
        public ActionResult Search(int page = 1, int pageSize = 10)
        {
            int month = int.Parse(Request.Form["slMonth"]);
            int year  = int.Parse(Request.Form["slYear"]);

            Session["SlMonth"] = month;
            Session["SlYear"]  = year;
            MultipleAdmin           model = new MultipleAdmin();
            AdminFinanceDAO         dao   = new AdminFinanceDAO();
            IPagedList <FinanceDTO> lists = (IPagedList <FinanceDTO>)dao.ListFinancialByMonthAndYear(Session["HostFinance"].ToString(), month, year, page, pageSize);

            model.ListFinance = lists;
            model.Income      = String.Format("{0:n}", dao.TotalIncome(@Session["HostFinance"].ToString(), DateTime.Now.Month, DateTime.Now.Year));
            return(View("AdminFinance", model));
        }
Ejemplo n.º 2
0
        public ActionResult AdminFinance(string id, int page = 1, int pageSize = 10)
        {
            Session["HostFinance"] = id;
            AdminFinanceDAO dao = new AdminFinanceDAO();

            Session["SlMonth"] = DateTime.Now.Month;
            Session["SlYear"]  = DateTime.Now.Year;
            MultipleAdmin model = new MultipleAdmin();

            model.CountHostRequest = new HostRequestDAO().CountHostRequest();
            IPagedList <FinanceDTO> lists = (IPagedList <FinanceDTO>)dao.ListFinancialByMonthAndYear(Session["HostFinance"].ToString(), DateTime.Now.Month, DateTime.Now.Year, page, pageSize);

            model.ListFinance = lists;
            model.Income      = String.Format("{0:n}", dao.TotalIncome(@Session["HostFinance"].ToString(), DateTime.Now.Month, DateTime.Now.Year));
            return(View(model));
        }