// GET: BaoCaoHoatDongThuongXuyen #region METHOD public ActionResult Index() { int SO = 55; int ngay_hientai = Convert.ToInt32(DateTime.Now.Day); int thang_hientai = Convert.ToInt32(DateTime.Now.Month); int nam_hientai = Convert.ToInt32(DateTime.Now.Year); string dt = ngay_hientai + "/" + thang_hientai + "/" + nam_hientai; int BEN = bc.Get_DanhSachBenXe_CuaSoGiaoThong(SO).FirstOrDefault().BX_IdBenXe; List <object> List_Return = new List <object>(); List_Return = ListHoatDongThuongXuyen(dt, SO, BEN); string tenben = bc.Get_ThongTinBenXe_TheoId(BEN).TenBenXe; var bien = new { Ben = BEN, TenBen = tenben, Dt1 = dt, Dt2 = dt, Ngay = ngay_hientai, Thang = thang_hientai, Nam = nam_hientai, So = SO, URL = Url.Action("BaoCaoHoatDongBenChiTiet", "BaoCaoHoatDong") + "?So=" + SO + "&Ben=" + BEN + "&Ngay=" + dt }; ViewBag.List_So = bc.Get_DanhSachAll_So_KhongChon();;//Get_List_So(); ViewBag.List_Ben = Get_List_Ben_TheoIDSo(SO); ViewBag.BaoCaoHoatDongThuongXuyen = List_Return; ViewBag.BienCuaBen = bien; return(View()); }
private List <object> Get_List_Ben_TheoIDSo(int idso) { GetBaoCaoHD bc = new GetBaoCaoHD(); List <object> list1 = new List <object>(); foreach (var item in bc.Get_DanhSachBenXe_CuaSoGiaoThong(idso)) { var ob = new { BX_IdBenXe = item.BX_IdBenXe, TenBenXe = item.TenBenXe, LoaiBenXe = item.LoaiBenXe, MaBen = item.MaBen, TS_IdTinh_So = item.TS_IdTinh_So }; list1.Add(ob); } return(list1); }