Пример #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                rpt_slider.DataSource = BUS_Sanpham.LayDSsp();
                rpt_slider.DataBind();


                HttpCookie cookie = Request.Cookies["tenTK"];
                if (cookie != null)
                {
                    string tenTK = cookie.Value;
                    if (!Page.IsPostBack)
                    {
                        DataTable   dtb_giohang = BUS_giohang.loadgiohang(tenTK);
                        TaiKhoanDTO tk          = TaiKhoanBUS.LayThongTinTaiKhoan(tenTK);

                        grvGioHang.DataSource = dtb_giohang;
                        grvGioHang.DataBind();
                        lblTongTien.Text = BUS_giohang.tinhtien(tenTK) + " USD";

                        //lb_tongtien.Text = BUS_giohang.tinhtien(tenTK) + " USD";
                        //txb_tenTK.Text = tk.TenTaiKhoan;
                        //txb_sdt.Text = tk.SDT;
                        //txb_diachi.Text = tk.DiaChi;
                        //txb_ngaymua.Text = DateTime.Now.ToString();
                    }
                }
                else
                {
                    Response.Redirect("../DangNhap.aspx");
                }
            }
        }
Пример #2
0
        protected void ddl_sanpham_SelectedIndexChanged(object sender, EventArgs e)
        {
            string malsp = ddl_sanpham.SelectedValue;

            dtl_sanpham.DataSource = BUS_Sanpham.LayDSsp(malsp);
            dtl_sanpham.DataBind();
        }
Пример #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                dtl_sanpham.DataSource = BUS_Sanpham.LayDSsp();
                dtl_sanpham.DataBind();

                ddl_sanpham.DataSource     = BUS_Loaisanpham.LayDSLoaiSanPham();
                ddl_sanpham.DataTextField  = "TenLoaiSP";
                ddl_sanpham.DataValueField = "MaLoaiSP";
                ddl_sanpham.AutoPostBack   = true;
                ddl_sanpham.DataBind();
            }
        }
Пример #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                dtl_sanpham.DataSource = BUS_Sanpham.LayDSsp();
                dtl_sanpham.DataBind();


                rpt_slider.DataSource = BUS_Sanpham.LayDSsp();
                rpt_slider.DataBind();
                //Response.Write("xin chao" + Session["username"]);
            }

            //protected void ddlLoaiSanPham_SelectedIndexChanged(object sender, EventArgs e)
            //{
            //    string maLoaiSP = ddlLoaiSanPham.SelectedValue;
            //    rptSanPham.DataSource = SanPhamBUS.LayDSSanPham(maLoaiSP);
            //    rptSanPham.DataBind();
            ////}
        }
Пример #5
0
 protected void loadsp()
 {
     grv_sp.DataSource = BUS_Sanpham.LayDSsp();
     grv_sp.DataBind();
 }