private void ClearData() { if (isNew == false && isUpdate == false) { TxtBookID.DataBindings.Clear(); TxtBookName.DataBindings.Clear(); TxtBookStatus.DataBindings.Clear(); TxtBookPrice.DataBindings.Clear(); TxtBookQuantity.DataBindings.Clear(); TxtAuthorName.DataBindings.Clear(); TxtBookID.Clear(); TxtBookName.Clear(); TxtBookStatus.Clear(); TxtBookPrice.Clear(); TxtBookQuantity.Clear(); TxtAuthorName.Clear(); } //else if (isUpdate == true && isNew == false) else if (isUpdate == true) { TxtBookName.DataBindings.Clear(); TxtBookStatus.DataBindings.Clear(); TxtBookPrice.DataBindings.Clear(); TxtBookQuantity.DataBindings.Clear(); TxtAuthorName.DataBindings.Clear(); TxtBookName.Clear(); TxtBookStatus.Clear(); TxtBookPrice.Clear(); TxtBookQuantity.Clear(); TxtAuthorName.Clear(); } //else if (isUpdate == false && isNew == true) else if (isNew == true) { TxtBookID.DataBindings.Clear(); TxtBookName.DataBindings.Clear(); TxtBookStatus.DataBindings.Clear(); TxtBookPrice.DataBindings.Clear(); TxtBookQuantity.DataBindings.Clear(); TxtAuthorName.DataBindings.Clear(); TxtBookID.Clear(); TxtBookName.Clear(); TxtBookStatus.Clear(); TxtBookPrice.Clear(); TxtBookQuantity.Clear(); TxtAuthorName.Clear(); } }
// TextBox Reset private void Reset() { TxtBookName.Clear(); TxtBookAuthor.Clear(); TxtBookCount.Clear(); TxtBookPrice.Clear(); TxtBookShelf.Clear(); BtnBookCreate.Visibility = Visibility.Visible; BtnBookDelete.Visibility = Visibility.Hidden; BtnBookUpdate.Visibility = Visibility.Hidden; FillBooks(); }
private void Reset() { TxtBookName.Clear(); TxtBookPrice.Clear(); FillBooks(); }