Exemplo n.º 1
0
        // to create a form to add new readers
        private void btnAdd_Click(object sender, EventArgs e)
        {
            frmAddNewReaders frmAddNewReaders = new frmAddNewReaders();

            frmAddNewReaders.ShowDialog();
            LoadDataInto_DataGridViewOfreader();
        }
Exemplo n.º 2
0
        private void btnMod_Click(object sender, EventArgs e)
        {
            DialogResult warning = new DialogResult();

            warning = MessageBox.Show("Bạn có chắc chắn muốn sửa độc giả này?", "Cảnh báo!", MessageBoxButtons.YesNo);
            if (warning == DialogResult.Yes)
            {
                int rowIndex = dgvDocGia.CurrentCell.RowIndex;

                ReaderDTO rd = new ReaderDTO();
                rd.IdReader         = int.Parse(dgvDocGia.Rows[rowIndex].Cells[0].Value.ToString());
                rd.IdReader         = int.Parse(dgvDocGia.Rows[rowIndex].Cells[0].Value.ToString());
                rd.NameReader       = dgvDocGia.Rows[rowIndex].Cells[1].Value.ToString();
                rd.DateOfBirth      = DateTime.Parse(dgvDocGia.Rows[rowIndex].Cells[2].Value.ToString());
                rd.AddressReader    = dgvDocGia.Rows[rowIndex].Cells[3].Value.ToString();
                rd.Email            = dgvDocGia.Rows[rowIndex].Cells[4].Value.ToString();
                rd.DateCreateReader = DateTime.Parse(dgvDocGia.Rows[rowIndex].Cells[5].Value.ToString());
                rd.TypeOfReader     = dgvDocGia.Rows[rowIndex].Cells[6].Value.ToString();

                frmAddNewReaders frmAddNewReaders = new frmAddNewReaders();
                frmAddNewReaders.edit(rd);
                frmAddNewReaders.ShowDialog();
            }
            else
            {
                return;
            }
            LoadDataInto_DataGridViewOfreader();
        }
Exemplo n.º 3
0
        // to create a form to add new readers
        private void btnAdd_Click(object sender, EventArgs e)
        {
            frmAddNewReaders frmAddNewReaders = new frmAddNewReaders();

            frmAddNewReaders.ShowDialog();
        }