예제 #1
0
        private void frmXoaLichSuGia_Load(object sender, EventArgs e)
        {
            txtNgayCapNhat.Text     = DateTime.Now.ToString("dd/MM/yyyy") + "";
            cboMaHang.DataSource    = bulHang.layTatCaHang();
            cboMaHang.DisplayMember = "tenHang";
            cboMaHang.ValueMember   = "maHang";
            if (lichSu.MaHang != "")
            {
                cboMaHang.SelectedValue = lichSu.MaHang;
                txtNgayBatDau.Text      = lichSu.NgayBatDau;
                dtNgayBatDau.Text       = txtNgayBatDau.Text;
            }

            arrLSG = bulLSG.layTatCaLichSuGia();
        }
예제 #2
0
 private void btnTimLSG_Click(object sender, EventArgs e)
 {
     if (txtLSG.Text == "")
     {
         BULLichSuGia lsg = new BULLichSuGia();
         dgvLichSuGia.DataSource = lsg.layTatCaLichSuGia();
     }
     else
     {
         BULLichSuGia lsg = new BULLichSuGia();
         dgvLichSuGia.DataSource = lsg.layTatCaLichSuGiaCoTenHang(txtLSG.Text);
     }
 }