public IActionResult UnlockViTriQuangcao(string mavitri) { ViTriQuangcaoBUS vitri = new ViTriQuangcaoBUS(); string thongbao = vitri.UnlockViTriQuangcao(mavitri); return(RedirectToAction("Index", "ViTriQuangcao", new { thongbao = thongbao })); }
public IActionResult EditViTriQuangcao(string item_sua_ma, string item_sua_ten, string item_sua_trangquangcao, double item_sua_dongia, string item_sua_chuthich) { ViTriQuangcaoBUS vitri = new ViTriQuangcaoBUS(); string thongbao = vitri.EditViTriQuangcao(item_sua_ma, item_sua_ten, item_sua_trangquangcao, item_sua_dongia, item_sua_chuthich); return(RedirectToAction("Index", "ViTriQuangcao", new { thongbao = thongbao })); }
public double GetDongia(string id) { ViTriQuangcaoBUS vitri = new ViTriQuangcaoBUS(); double dongia = vitri.GetDonGia(id); return(dongia); }
public IActionResult Sort(string sortorder, int?pagenumber) { pageNumber = pagenumber ?? 1; ViTriQuangcaoBUS vitri = new ViTriQuangcaoBUS(); TrangQuangCaoBUS trang = new TrangQuangCaoBUS(); List <ViTriQuangcao> list = vitri.Sort(sortorder, pageSize, pageNumber); List <ViTriQuangcao> tong = vitri.Sort(sortorder); List <TrangQuangCao> listtqc = trang.GetTrangQuangCaos(); ViewBag.TrangHienTai = pageNumber; ViewBag.TrangQuangCao = listtqc; ViewBag.TongTrang = TongTrang(tong); ViewBag.TrangThai = "sort"; ViewBag.Sort = sortorder; return(View("Index", list)); }
public IActionResult SearchAndSort(string search, string sortorder, int?pagenumber) { pageNumber = pagenumber ?? 1; ViTriQuangcaoBUS vitri = new ViTriQuangcaoBUS(); GoiQuangCaoBUS goi = new GoiQuangCaoBUS(); List <GoiQuangCao> list = goi.SearchAndSort(search, sortorder, pageSize, pageNumber); List <GoiQuangCao> tong = goi.SearchAndSort(search, sortorder, pageSize); List <ViTriQuangcao> listvtqc = vitri.GetViTriQuangcaos(); ViewBag.TrangHienTai = pageNumber; ViewBag.TongTrang = TongTrang(tong); ViewBag.ViTriQuangcao = listvtqc; ViewBag.TrangThai = "searchandsort"; ViewBag.Search = search; ViewBag.Sort = sortorder; return(View("Index", list)); }
public IActionResult Index(string thongbao, int?pagenumber) { //Thông báo if (thongbao != null) { ViewBag.ThongBao = thongbao; } //Trang pageNumber = pagenumber ?? 1; //Lists ViTriQuangcaoBUS vitri = new ViTriQuangcaoBUS(); TrangQuangCaoBUS trang = new TrangQuangCaoBUS(); List <ViTriQuangcao> list = vitri.GetViTriQuangcaos(pageNumber, pageSize); List <ViTriQuangcao> tong = vitri.GetViTriQuangcaos(); List <TrangQuangCao> listtqc = trang.GetTrangQuangCaos(); //ViewBag ViewBag.TongTrang = TongTrang(tong); ViewBag.TrangHienTai = pageNumber; ViewBag.TrangThai = "index"; ViewBag.TrangQuangCao = listtqc; return(View(list)); }
public string CheckMa(string ma) { ViTriQuangcaoBUS vitri = new ViTriQuangcaoBUS(); return(vitri.CheckMa(ma)); }