//SEARCH BOOKS FROM DATABASE private void BtnSearchBook_Click(object sender, RoutedEventArgs e) { if (string.IsNullOrWhiteSpace(TxtBookName.Text)) { MessageBox.Show("Kitabın adı daxil edilməmişdir ! " + "Lütfən Kitab adını daxil edin"); return; } if (_context.Books.Any(r => r.BookName == TxtBookName.Text)) { var ObjResult = from b in _context.Books where b.BookName == TxtBookName.Text select new { b.BookName, b.Id, b.Price }; foreach (var obj in ObjResult) { LblResultBookName.Content = $"{obj.BookName}"; TxtBookName.Clear(); BkId = obj.Id; _bookprice = obj.Price; } myUpDownControl.IsReadOnly = false; } else { MessageBox.Show($"daxil etdiyiniz {TxtBookName.Text } kitab bazada mövcud deyil"); TxtBookName.Clear(); } }
private void Reset() { TxtCustomerName.Clear(); TxtBookName.Clear(); TxtManegerName.Clear(); FillOrder(); }
private void Clear() { TxtBookName.Clear(); TxtAuthor.Clear(); TxtCount.Clear(); TxtRentalPrice.Clear(); CmbGenre.SelectedItem = null; }
private void Reset() { TxtBookName.Clear(); TxtBookAuthor.Clear(); TxtBookPrice.ResetText(); TxtBookQuantity.Clear(); DtpPurchaseDate.ResetText(); }
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(); }
// Reset Text Boxes and numeric up-downs. Set Id and row index 0 and -1 private void Reset() { TxtBookName.ResetText(); CmbAuthors.ResetText(); NumPrice.Value = 0; NumCount.Value = 0; clickedId = 0; clickedRow = -1; CmbFindAuthor.SelectedIndex = -1; CmbFindBook.SelectedIndex = -1; FillCmbFindBook(); BtnDeleteBook.Visible = false; BtnUpdateBook.Visible = false; }
private void Reset() { TxtBookName.Clear(); TxtBookPrice.Clear(); FillBooks(); }