1

I am building a record management system that stores data in SQL Database. Im trying to build it in a smaller project then impalement in a larger scale. So far I have 5 textBoxs that are storing data into a database and I can recall a row to populate the textboxes off of a textBox called "ID".

What I want to be able to do is either have a smaller button next to each textbox OR be able to click in the textbox then click a button which shows a secondary window that i can input data. I can make a second window/form that stores data to its own table but how would I make c# know if in one textbox on table1, ID "1", textbox "1" should recall information from table2, ID "1".

This is kinda weird to read maybe I can draw this out better Diagram of idea

I couldn't find to words to search for something like this since I just starting out in C# I don't how to store information for ID"1" and have c# remember that textbox1 has information stored that pertains only to if in another table that can be displayed in a

v3rb
  • 11
  • 2
  • You could pass the Id into the secondary window via a parameter in its constructor. This should help: http://stackoverflow.com/questions/17836398/passing-values-between-windows-forms-c-sharp – Ulric May 19 '16 at 14:08
  • Have you heard of data models? Usually your data is stored in some sort of data model (some object or structure of objects usually in a separate class(es)) and the UI changes the data in this model. That way when you click the save button it uses the data model to save information to the database. – Lithium May 19 '16 at 14:09
  • The biggest question is why are you trying to do this? What do you want to do? Depending on your answer, there might be better/simpler ways to do that. Another question I have is: Are each textbox somehow linked each to a different table? From what I understand, each Textbox will have a button that will link to another table. – Felipe Deguchi May 19 '16 at 14:28
  • Another question is, what content is going to be shown on the modal form (The secondary window)? – Felipe Deguchi May 19 '16 at 14:32
  • Is this what you want? https://jsfiddle.net/ubsweb8n/ – Felipe Deguchi May 19 '16 at 15:05
  • I will make a quick video of my this program and narrate it. But as far as the lay out, yes and i can construct the forms and make the buttons bring it up. Im at work so it might take me a minute to get something put to geather – v3rb May 19 '16 at 16:41
  • Here is that video http://youtu.be/K3VmrOUrJyE – v3rb May 19 '16 at 18:08

0 Answers0