Beispiel #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                SanPhamDTO sp = SanPhamBUS.LaySanPhamTheoMaSp(Request.QueryString["qqq"]);
                lblTenSP.Text          = sp.TenSP;
                imgAnhMinhHoa.ImageUrl = "images/" + sp.AnhMinhHoa;
                lblThongTin.Text       = sp.ThongTin;
                lblMaSP.Text           = sp.MaSP;
                lblGia.Text            = sp.GiaTien.ToString();
                lblMaSP.Visible        = false;


                DropDownList_size.DataSource     = SanPhamBUS.LaySanPhamTheoTheoSise(Request.QueryString["qqq"]);
                DropDownList_size.DataTextField  = "sizenumber";
                DropDownList_size.DataValueField = "SoLuongTonKho";
                DropDownList_size.DataBind();

                lblSLTK.Text = DropDownList_size.Items[0].Value.ToString();

                rpt_LoaiGiay.DataSource = LoaiSanPhamBUS.LayDSLoaiSanPham();
                rpt_LoaiGiay.DataBind();

                rpt_SizeGiay.DataSource = SizeGiayBUS.LayDSSize();
                rpt_SizeGiay.DataBind();

                rpt_spcungloai.DataSource = SanPhamBUS.LaySanPhamCungLoaiTrongTrangChiTiet(sp.MaLoaiSP);
                rpt_spcungloai.DataBind();
            }
        }
Beispiel #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     ddlSanPham.DataSource     = LoaiSanPhamBUS.LayDSLoaiSanPham();
     ddlSanPham.DataTextField  = "TenLoaiSP";
     ddlSanPham.DataValueField = "MaLoaiSP";
     ddlSanPham.DataBind();
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                if (Request.QueryString["TenLoai"] != null)
                {
                    rptSanPham.DataSource = SanPhamBUS.XemGiayTheoTenLoai(Request.QueryString["TenLoai"]);
                    rptSanPham.DataBind();
                }
                else if (Request.QueryString["Size"] != null)
                {
                    rptSanPham.DataSource = SanPhamBUS.XemGiayTheoSize(Request.QueryString["Size"]);
                    rptSanPham.DataBind();
                }
                else if (Request.QueryString["Sort"] == "LOW_TO_HIGH")
                {
                    rptSanPham.DataSource = SanPhamBUS.XemTheoGiaTuThapDenCao();
                    rptSanPham.DataBind();
                }
                else if (Request.QueryString["Sort"] == "HIGH_TO_LOW")
                {
                    rptSanPham.DataSource = SanPhamBUS.XemTheoGiaTuCaoDenThap();
                    rptSanPham.DataBind();
                }
                else if (Request.QueryString["Key"] != null)
                {
                    rptSanPham.DataSource = SanPhamBUS.TimKiemNguoiDungNhap(Request.QueryString["Key"]);
                    rptSanPham.DataBind();
                }
                else
                {
                    rptSanPham.DataSource = SanPhamBUS.LayDSSanPham();
                    rptSanPham.DataBind();
                }
                rpt_LoaiGiay.DataSource = LoaiSanPhamBUS.LayDSLoaiSanPham();
                rpt_LoaiGiay.DataBind();

                rpt_SizeGiay.DataSource = SizeGiayBUS.LayDSSize();
                rpt_SizeGiay.DataBind();
            }
        }
 protected void LoadDSLoaiSanPham()
 {
     grvDSLoaiSP.DataSource = LoaiSanPhamBUS.LayDSLoaiSanPham();
     grvDSLoaiSP.DataBind();
 }
Beispiel #5
0
 public void load()
 {
     rptSanPham.DataSource = LoaiSanPhamBUS.LayDSLoaiSanPham();
     rptSanPham.DataBind();
 }