Пример #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 Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                HttpCookie cookie = Request.Cookies["tenTK"];
                string     tentk  = cookie.Value;

                rpt_prdlist.DataSource = BUS_giohang.loadgiohang(tentk);
                rpt_prdlist.DataBind();
                lblTongTien.Text = BUS_giohang.tinhtien(tentk) + " USD";
                lbltong.Text     = BUS_giohang.tinhtien(tentk) + " USD";
                if (rd_dc1.Checked == true)
                {
                    TaiKhoanDTO tk = TaiKhoanBUS.LayThongTinTaiKhoan(tentk);
                    txb_hoten.Text   = tk.HoTen;
                    txb_diachi.Text  = tk.DiaChi;
                    txb_sdt.Text     = tk.SDT;
                    txb_zopcode.Text = "700000";
                    lbfee.Text       = "Free";
                }
            }
        }