I have 3 textbox (with entered data), 1 picture which is loaded by the user, 1 Listbox in which you need to select the answer option. How and where to save this data to use it later?

  • first in the data model, then you have a huge choice: in memory, on disk (serialization), in the database, in the cloud ... there is even something exotic: take a picture and print it out)) Tell us how you want to use them - morphey83
  • I want to save and call from the combobox (thus realizing the search function) by clicking the page with this data should appear in Textblock. I make a recipe book, I need to store and record new recipes. - Frallen
  • Saving by pressing a button, without a seivdialog - Frallen
  • one
    Binding in Properties.Settings.Default.<variable name> select the type `* Collection` - and it will automatically save there. - NewView 3:07 pm
  • one
    Try to do this in Settings.Default for a start, then when it works, experiment with your base class. And it should be like Observable Collection, and support Notify changed - NewView 5:26 pm

1 answer 1

I decided to use sql queries in access

  string klantId = nametext.Text; //textbox string klantNaam = text.Text; //textbox System.Data.OleDb.OleDbConnection conn = new System.Data.OleDb.OleDbConnection(); conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Database777.mdb;"; conn.Open(); String ticketno = klantId; String Purchaseprice = klantNaam; String my_querry = "INSERT INTO Рецепты([Название рецепта], [Текст рецепта]) VALUES('" + ticketno + "','" + Purchaseprice +"')"; OleDbCommand cmd = new OleDbCommand(my_querry, conn); cmd.ExecuteNonQuery(); conn.Close();