private void DonHang_Load(object sender, EventArgs e) { dgvKH.DataSource = db.Thongtindathang(email); lbTen.DataBindings.Add("Text", dgvKH.DataSource, "TenKH"); lbSdt.DataBindings.Add("Text", dgvKH.DataSource, "SDT"); lbEmail.DataBindings.Add("Text", dgvKH.DataSource, "Email"); lbDiachi.DataBindings.Add("Text", dgvKH.DataSource, "DiaChi"); lbTongtien.Text = db.Tongtien(db.getmakh(email)).ToString(); DateTime dat = DateTime.Now; lbNgaydat.Text = dat.ToString(); lbNgaygiao.Text = db.getngaygiao(dat).ToString(); dgvDonhang.DataSource = db.GioHangtable(db.getmakh(email)); }
public void Cart_Load(object sender, EventArgs e) { dgvGiohang.DataSource = db.GioHangtable(db.getmakh(email)); txtTien.Text = db.Tongtien(db.getmakh(email)).ToString(); }