예제 #1
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()));
        }
예제 #2
0
        private void dgvSach_RowEnter(object sender, DataGridViewCellEventArgs e)
        {
            int dong = e.RowIndex;

            txtMaSach.Text           = dgvSach.Rows[dong].Cells[0].Value.ToString();
            txtTenSach.Text          = dgvSach.Rows[dong].Cells[1].Value.ToString();
            cmbTheLoai.SelectedValue = (int)(dgvSach.Rows[dong].Cells[2].Value);
            TheLoai_DTO tl = TheLoai_BUS.GetTheLoaiByMa((int)(dgvSach.Rows[dong].Cells[2].Value));

            cmbTheLoai.Text    = tl.TenTheLoai;
            txtTacGia.Text     = dgvSach.Rows[dong].Cells[3].Value.ToString();
            txtDonBanSach.Text = dgvSach.Rows[dong].Cells[4].Value.ToString();
            txtSoLuongTon.Text = dgvSach.Rows[dong].Cells[5].Value.ToString();
        }