Exemplo n.º 1
0
        public IActionResult LockLichSuGianHang(string id)
        {
            LichSuGianHangBUS lsghbus  = new LichSuGianHangBUS();
            string            thongbao = lsghbus.LockLichSuGianHang(id);

            return(RedirectToAction("Index", "LichSuGianHang", new { thongbao = thongbao }));
        }
Exemplo n.º 2
0
        public IActionResult EditLichSuGianHang(string item_sua_id, string item_sua_gianhang)
        {
            LichSuGianHangBUS lsghbus  = new LichSuGianHangBUS();
            string            thongbao = lsghbus.EditLichSuGianHang(item_sua_id, item_sua_gianhang);

            return(RedirectToAction("Index", "LichSuGianHang", new { thongbao = thongbao }));
        }
Exemplo n.º 3
0
        public IActionResult CreateLichSuGianHang(string item_them_tendangnhap, string item_them_gianhang)
        {
            LichSuGianHangBUS lsghbus  = new LichSuGianHangBUS();
            string            thongbao = lsghbus.CreateLichSuGianHang(item_them_tendangnhap, item_them_gianhang);

            return(RedirectToAction("Index", "LichSuGianHang", new { thongbao = thongbao }));
        }
Exemplo n.º 4
0
        public IActionResult GetLichSuGianHang(string tendangnhap)
        {
            LichSuGianHangBUS     lsgianhang = new LichSuGianHangBUS();
            List <LichSuGianHang> list       = lsgianhang.GetLichSuGianHangs(tendangnhap);

            ViewBag.TenDangNhap = tendangnhap;
            return(PartialView("LichSuGianHangPartialView", list));
        }
Exemplo n.º 5
0
        public IActionResult Sort(string sortorder, int?pagenumber)
        {
            pageNumber = pagenumber ?? 1;
            LichSuGianHangBUS     gianhang = new LichSuGianHangBUS();
            GianHangBUS           gh       = new GianHangBUS();
            List <LichSuGianHang> list     = gianhang.Sort(sortorder, pageSize, pageNumber);
            List <LichSuGianHang> tong     = gianhang.Sort(sortorder);
            List <GianHang>       listgh   = gh.GetGianHangs();

            ViewBag.TrangHienTai = pageNumber;
            ViewBag.TongTrang    = TongTrang(tong);
            ViewBag.TrangThai    = "sort";
            ViewBag.Sort         = sortorder;
            ViewBag.ListGianHang = listgh;
            return(View("Index", list));
        }
Exemplo n.º 6
0
        public IActionResult Index(string thongbao, int?pagenumber)
        {
            //Thông báo
            if (thongbao != null)
            {
                ViewBag.ThongBao = thongbao;
            }
            //Trang
            pageNumber = pagenumber ?? 1;
            //List
            LichSuGianHangBUS     lichsu   = new LichSuGianHangBUS();
            GianHangBUS           gianhang = new GianHangBUS();
            List <LichSuGianHang> list     = lichsu.GetLichSuGianHangs(pageNumber, pageSize);
            List <LichSuGianHang> tong     = lichsu.GetLichSuGianHangs();
            List <GianHang>       listgh   = gianhang.GetGianHangs();

            //ViewBag
            ViewBag.TongTrang    = TongTrang(tong);
            ViewBag.TrangHienTai = pageNumber;
            ViewBag.TrangThai    = "index";
            ViewBag.ListGianHang = listgh;
            return(View(list));
        }