예제 #1
0
 private void NewItemBtn_Click(object sender, RoutedEventArgs e)
 {
     //clear textboxes needed and be ready to save by boolean
     ItemIDTxtbox.Clear();
     ItemNameTxtbox.Clear();
     ItemDescTxtbox.Clear();
     ItemPriceTxtbox.Clear();
     ItemQuantTxtbox.Clear();
     isNewRecord = true;
 }
예제 #2
0
        private void DisplayItems()
        {
            if (CurrentSeledtedItems != null)
            {
                ItemIDTxtbox.Text    = CurrentSeledtedItems.ItemID.ToString();
                ItemNameTxtbox.Text  = CurrentSeledtedItems.ItemName;
                ItemDescTxtbox.Text  = CurrentSeledtedItems.ItemDescription;
                ItemPriceTxtbox.Text = CurrentSeledtedItems.ItemPrice.ToString();
                ItemQuantTxtbox.Text = CurrentSeledtedItems.ItemQuantity.ToString();
            }

            else
            {
                ItemIDTxtbox.Clear();
                ItemNameTxtbox.Clear();
                ItemDescTxtbox.Clear();
                ItemPriceTxtbox.Clear();
                ItemQuantTxtbox.Clear();
            }
        }