Click here to Skip to main content
15,861,168 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
I inserted mdiparent form in my project.It contains one child form(Customer Data Entry) with textboxes.In parent form one toolstrip button(Save Record).At the time of pressing the Save Record Button I want to Save the Customer Data Entry form Values(Child form Text Box values) in to Database.
Posted
Comments
BillWoodruff 22-Sep-14 4:34am    
Where is the DataBase located ?
jeevakumar.T 22-Sep-14 5:07am    
Internal Data base.It located in Bin Folder.

1 solution

You'll have to create Save method in the child form and then on click call something like
(your-child-form-type)this.MdiChildren(your-child-form-index).Save()
if you ever have one form opened at the time then this index is always 0


Correct solution would be to have all children implementing an interface so that you could add any child form you want that implements that interface and call its save button.

Alternatively, you could have all children inherit from base abstract class containing Save method that must be implemented in each child.
 
Share this answer
 
Comments
jeevakumar.T 22-Sep-14 3:08am    
Thanks Friend,Please give me any example links
Sinisa Hajnal 22-Sep-14 3:32am    
http://msdn.microsoft.com/en-us/library/87d83y5b.aspx
https://www.google.hr
:)

Do some research yourself. You have enough terminology up there that you can easily find MSDN references.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900