Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 203293
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T17:21:57+00:00 2026-05-11T17:21:57+00:00

I have a fairly large CRUD winform app that is set up to display

  • 0

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 track the information as they interact with the forms. How do I accomplish this? I found a suggestion to declare the Person object in my Program.cs like so –>

internal static class Program
{
    public static CurrentPerson _CurrentPerson;

    /// <summary>
    /// The main entry point for the application.
    /// </summary>
    [STAThread]
    private static void Main()
    {
        Application.EnableVisualStyles();
        Application.SetCompatibleTextRenderingDefault(false);
        Application.Run(new FrmWWCShell());
    }
}

and then on the Search.cs –>

 Program._CurrentPerson = new CurrentPerson
                                     {
                                         PersonID = Convert.ToInt32(pID),
                                         LastName = lName,
                                         FirstName = fName,
                                         SocialSn = sSN,
                                         MiddleName = mName,
                                         BirthDate = Convert.ToDateTime(bDate)
                                     };

Is this the best way? There is still a bunch of Data that needs to be filled in from the database once they have made this selection on the Search page. What about declaring the object on each form and passing it some way? The object is slowly “built” as they progress. First they Search for someone by name and select who they will work with. Then they can work with there Enrollments. After selecting an Enrollment they will be able to interact with there Plans.

I would be grateful for any guidance here as the scope of this has left my inexperienced head spinning…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T17:21:57+00:00Added an answer on May 11, 2026 at 5:21 pm

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a fairly large CRUD WinForm app that has numerous objects. Person, Enrollment,
I have a fairly large webapp that I run on a Media Temple server.
I have a fairly large model and I want to retrieve only a select
I have a fairly large application that uses WPF for its user interface. I
We have several fairly large JavaScript files embedded into a single script resources DLL.
I have a fairly large Indesign file with a text field that needs to
I have several fairly large XML files that represent data exported from a system
I have fairly large C++ library with several sub-libraries that support it, and I
I have a fairly large windows mobile app (written in NETCF 3.5). Those in
I have a fairly large text file that I would like to convert into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.