private void frmSanPham_Load(object sender, EventArgs e) { GridSP.DataSource = sanphamBUS.GetSanPham(); cboMaLSP.DataSource = loaisanphamBUS.GetLoaiSP(); cboMaLSP.DisplayMember = "TenLoaiSanPham"; cboMaLSP.ValueMember = "MaLoaiSanPham"; }
public IActionResult Index(string id) { string idd = id ?? "B77D9CF5-E9A2-4D31-9490-25E4E3971C61"; //BUS SanPhamBUS sanphambus = new SanPhamBUS(); SizeSanPhamBUS sizesanphambus = new SizeSanPhamBUS(); GioHangBUS giohangbus = new GioHangBUS(); DiaChiBUS diachibus = new DiaChiBUS(); SanPham sanpham = sanphambus.GetSanPham(idd); DiaChi diachi = diachibus.GetDiaChiMer(sanpham.IdTaiKhoanNavigation.TenDangNhap); ViewBag.DiaChiMerchant = diachi; List <SizeSanPham> listsizesanpham = sizesanphambus.GetSize(idd); ViewBag.ListSizeSanPham = listsizesanpham; List <HangSanPham> hang = ctx.HangSanPham.ToList(); ViewBag.Hang = hang; List <SanPham> spmoi = sanphambus.GetSanPhams("", "", 1, 4); ViewBag.SanPhamMoi = spmoi; return(View(sanpham)); }
public List <SanPham> SanPham_GetSanPham(SanPham inp, string strsearch) { try { return(SanPham_bus.GetSanPham(inp, strsearch)); } catch (Exception ex) { throw ex; } }
private void frmDonHang_Load(object sender, EventArgs e) { GridHoaDon.DataSource = donhangchitietBUS.GetDHCT(); cboMaSP.DataSource = sanphamBUS.GetSanPham(); cboMaSP.DisplayMember = "TenSP"; cboMaSP.ValueMember = "MaSP"; cboDH.DataSource = donhangBUS.GetDonHang(); cboDH.DisplayMember = "MaHDBan"; cboDH.ValueMember = "MaHDBan"; }