Passing Object from Form to Form

后端 未结 3 1293
孤街浪徒
孤街浪徒 2021-01-29 03:04

I have a fairly large CRUD winform app that is set up to display forms embedded in tabcontrols. I want to have objects for Person,(has a) Enrollment,(has a) Plan that hold and

3条回答
  •  野的像风
    2021-01-29 03:40

    You will need to seperate your data, logic and GUI.

    Look into the Model-View-Controller pattern.

    If you think it's too complex in your case you might just create a central controller class to hold the central data. Pass on this object in every form constructor and you're done.

提交回复
热议问题