Basically, I want to make a windows form application to be able to view and/or manipulate a postgres database.
My first question is if using c#/winforms is an okay way to do this? If not, any suggestions? One of my co-workers suggested using drubal to make an interface to do all this but I have never used that before so I really have no idea. Any thoughts on this would be greatly appreciated.
My second question, is about actually making the application with winforms... well not how to make it, but more on the best way to make it.
What I want to do is have it so that when the application is first started, you are presented with a login screen (2 textboxes, 2 labels, and a button). Upon entering your information the application confirms your credentials and also checks which privileges you should be allowed.
If the user turns out to be an administrator, I want to have them presented with buttons to do anything. If the user is just a normal person, then they will only be able to view data.
The problem I've run into is that I am not really sure on the best way to switch from the login screen, to the new screen... at least in a way that makes sense.
I figure there are a few options but none of them seem really intuitive and are all kinda brute forced.
The first would be that upon clicking the "login" button, that everything currently on the screen is gets it "Visible" variable set to false, and then depending on what type of user the person is, the corresponding buttons/textboxes/labels get Visible set to true. The problems with this are obviously the fact that to actually design this, you would have tons of overlapping controls everywhere and it would just be a giant mess.
The second option I thought of would be to put corresponding controls in their own panels, so rather then hiding/unhiding controls indivdually I could just hide/unhide the appropriate panels. The problem I see with this, is that although it will be less code from only 1 or 2 hide/unhide statements, I will still have tons of panels overlapping everywhere in the designer.
The third option I was looking into, were user controls. At first I thought this was a solution from a description I had read but upon further reading it doesn't really seem like it would work the way I thought.
Another option would be to just open a whole new frame. This is definitely possible, and not that hard to do, and it also doesn't create a massive mess in the designer, but my only problem is that it would be nice if everything could be done in one single frame. I don't really want to have 4-5+ windows just sitting there.
TLDR: I am curious about the best way to easily change the contents of a frame, depending on what type of user logs in and/or what buttons they press.