Exemple #1
0
        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));
        }