Example #1
0
        private void insert_Click(object sender, EventArgs e)
        {
            PatronInsertUpdateForm patronInsertUpdateForm = new PatronInsertUpdateForm(this);

            patronInsertUpdateForm.changeEnableUpdate(false);
            patronInsertUpdateForm.changeEnableSearch(false);
            patronInsertUpdateForm.visibleAccount();
            patronInsertUpdateForm.ShowDialog();
        }
Example #2
0
        private void search_Click(object sender, EventArgs e)
        {
            PatronInsertUpdateForm patronInsertUpdateForm = new PatronInsertUpdateForm(this);

            patronInsertUpdateForm.changeEnableInsert(false);
            patronInsertUpdateForm.changeEnableUpdate(false);
            patronInsertUpdateForm.changeEnableDateTimePicker(false);
            patronInsertUpdateForm.hidePassword();
            patronInsertUpdateForm.ShowDialog();
        }
Example #3
0
        private void update_Click(object sender, EventArgs e)
        {
            PatronInsertUpdateForm patronInsertUpdateForm = new PatronInsertUpdateForm(this);

            patronInsertUpdateForm.changeEnableInsert(false);
            patronInsertUpdateForm.changeEnableSearch(false);
            if (patronTable.CurrentRow != null)
            {
                String libraryCardNumber = patronTable.CurrentRow.Cells[1].Value.ToString();
                String name        = patronTable.CurrentRow.Cells[2].Value.ToString();
                String dob         = patronTable.CurrentRow.Cells[3].Value.ToString();
                String phoneNumber = patronTable.CurrentRow.Cells[4].Value.ToString();
                String address     = patronTable.CurrentRow.Cells[5].Value.ToString();
                patronInsertUpdateForm.changeEnableLibraryCardNumberTextBox(false);
                patronInsertUpdateForm.setData(libraryCardNumber, name, dob, phoneNumber, address);
            }
            patronInsertUpdateForm.hideAccount();
            patronInsertUpdateForm.ShowDialog();
        }