コード例 #1
0
        private void dgvDauSach_RowEnter(object sender, DataGridViewCellEventArgs e)
        {
            int dong = e.RowIndex;

            ds.MaDauSach           = int.Parse(dgvDauSach.Rows[dong].Cells[0].Value.ToString());
            ds.TenDauSach          = dgvDauSach.Rows[dong].Cells[1].Value.ToString();
            ds.MaTheLoai           = (int)dgvDauSach.Rows[dong].Cells[2].Value;
            dgvCTTacGia.DataSource = DauSach_BUS.SelectCTTacGiaByMa(ds.MaDauSach);
        }
コード例 #2
0
        private void dgvDauSach_RowEnter(object sender, DataGridViewCellEventArgs e)
        {
            int dong = e.RowIndex;

            txtMaDauSach.Text        = dgvDauSach.Rows[dong].Cells[0].Value.ToString();
            txtMaSachCT.Text         = dgvDauSach.Rows[dong].Cells[0].Value.ToString();
            txtTenDauSach.Text       = dgvDauSach.Rows[dong].Cells[1].Value.ToString();
            cboTheLoai.SelectedValue = (int)(dgvDauSach.Rows[dong].Cells[2].Value);
            TheLoai_DTO tl = TheLoai_BUS.GetTheLoaiByMa((int)(dgvDauSach.Rows[dong].Cells[2].Value));

            cboTheLoai.Text         = tl.TenTheLoai;
            dgvCT_TacGia.DataSource = DauSach_BUS.SelectCTTacGiaByMa(int.Parse(dgvDauSach.Rows[dong].Cells[0].Value.ToString()));
        }