private void Reset()//reset the all changes on textboxes and numericupdown { TxtTitle.Text = string.Empty; NumPrice.Value = 0; TxtAuthor.Text = string.Empty; NmrcCount.Value = 0; BtnAdd.Show(); BtnDeactive.Hide(); BtnUpdate.Hide(); BtnCancel.Hide(); }
public EditLibrariansForm() { InitializeComponent(); _librarianService = new LibrarianService(); BtnDelete.Hide(); BtnUpdate.Hide(); FillMembersDgv(); }
public EditMembersForm() { InitializeComponent(); _memberService = new MemberService(); _selectedMember = new Member(); FillMembers(); BtnAdd.Show(); BtnDelete.Hide(); BtnUpdate.Hide(); }
public EditBooksForm() { InitializeComponent(); _bookService = new BookService(); _selectedBook = new Book(); FillBooks(); BtnAdd.Show(); BtnDelete.Hide(); BtnUpdate.Hide(); }
private void Reset()//reset the all changes on textboxes { TxtName.Text = string.Empty; TxtSurname.Text = string.Empty; TxtPhone.Text = string.Empty; TxtUsername.Text = string.Empty; TxtPassword.Text = string.Empty; TxtNewPassword.Text = string.Empty; CmbPosition.SelectedItem = null; BtnAdd.Show(); BtnDeactive.Hide(); BtnUpdate.Hide(); BtnCancel.Hide(); TxtNewPassword.Hide(); LblPassword.Text = "password"; TxtPassword.Show(); LblComment.Hide(); }
private void DataGridView1_Click(object sender, EventArgs e) { selectedId = Convert.ToInt32(dataGridView1.CurrentRow.Cells[0].Value.ToString()); TxtName.Text = dataGridView1.CurrentRow.Cells[1].Value.ToString(); TxtDesignation.Text = dataGridView1.CurrentRow.Cells[2].Value.ToString(); TxtContact.Text = dataGridView1.CurrentRow.Cells[3].Value.ToString(); TxtAddress.Text = dataGridView1.CurrentRow.Cells[4].Value.ToString(); if (teacher == "Head Teacher") { BtnUpdate.Show(); BtnDelete.Show(); } else { BtnUpdate.Hide(); BtnDelete.Hide(); } }