Exemple #1
0
        private void Add_Click(object sender, RoutedEventArgs e)
        {
            string diagnose = ListOfCategory[ListOfCategory.Count - 1];

            if (Category.Text == diagnose)
            {
                FileAdapter.SaveNewDiagnoseIngredient(baseName, Category.Text, Ingedence.Text, Description.Text);
            }
            else
            {
                FileAdapter.SaveNewIngredient(baseName, Category.Text, Ingedence.Text, Description.Text);
            }

            this.Close();
        }