コード例 #1
0
        private void l(object sender, EventArgs e)
        {
            ListViewItem lvi = lsvDsDuocChon.SelectedItems[0];

            txtSach.Text    = lvi.SubItems[0].Text;
            itemSelect      = lsvDsDuocChon.SelectedItems[0];
            indexItemSelect = lsvDsDuocChon.SelectedItems[0].Index;
            IdCD            = itemSelect.SubItems[4].Text;
            txtSoLuong.Text = itemSelect.SubItems[2].Text;
            cd                   = ChuDe_DAO.LoadDuLieuCD(IdCD);
            txtChuD.Text         = cd.Rows[0][1].ToString();
            dtNgayHenTra.Value   = DateTime.Parse(itemSelect.SubItems[6].Text);
            txtSoLuong.ReadOnly  = true;
            btnSuaDsChon.Enabled = true;
        }
コード例 #2
0
        private void lsvSach_Click(object sender, EventArgs e)
        {
            txtSoLuong.ReadOnly = false;
            ListViewItem lvi = lsvSach.SelectedItems[0];

            txtSach.Text    = lvi.SubItems[0].Text;
            itemSelect      = lsvSach.SelectedItems[0];
            indexItemSelect = lsvSach.SelectedItems[0].Index;
            IdCD            = itemSelect.SubItems[4].Text;
            IdSach          = itemSelect.SubItems[5].Text;
            GiaBan          = itemSelect.SubItems[1].Text;
            NhaXuatBan      = itemSelect.SubItems[3].Text;
            cd           = ChuDe_DAO.LoadDuLieuCD(IdCD);
            txtChuD.Text = cd.Rows[0][1].ToString();
        }