Click here to Skip to main content
15,901,035 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I want to create a console application using C# to add,edit,view and delete employee details.

Is there any way to do this. If so help me with code to edit employee detail
Posted

Yes, you can. Why not? Please try something on your own.
Just use ADO.NET objects to connect to Database and do all operations you want by executing queries.
If you don't know how to do this, then go through some articles by searching on Google.

Here we answer specific questions which members face during programming.

If you face any difficulty while coding, feel free to come back here and ask another question with specific issue describing the scenario.

Members will be happy to help you then. :)
 
Share this answer
 
Comments
KUMAR619 10-Mar-14 0:54am    
I was asked not to use any external database then how to do this
Then connect to the Database which is present on your system.
KUMAR619 10-Mar-14 1:59am    
They asked me not to connect any database.

I have to do only using console application
So, where is the Employee Details? From where you will fetch that?
KUMAR619 10-Mar-14 4:16am    
We have to store in array.
There's no way anyone is going to be able to write code for you to do this. First off, this site does not take on requests for code to written for you.

You have other problems. The first is that a lot of the code to do this depends on the database engine you're connecting to and what you database schema is.

Next, a console application to do this would require you to spell out exactly how you want the user to edit a record. Is this going to be a menu system where you pick a number to edit that line of the employee record? Is it going to be command line driven where you specify switches to find and edit an employee record? Are you hoping to generate some kind of screen layout where you can edit fields in place where they are shown on screen??

In any case, it's a lot more work that doing it in a dedicated GUI application.
 
Share this answer
 
Comments
KUMAR619 10-Mar-14 0:53am    
I was asked not to use any external database
Then how to do this
SanSkun 10-Mar-14 3:09am    
IF you are not using any database then from where employee details will come, and how u will update etc...
KUMAR619 10-Mar-14 4:16am    
We have to store in array.
Dave Kreskowiak 10-Mar-14 7:23am    
Then this is a school project. You're not going to get any code written for you.

Write the project yourself and when you get to a point where you're stuck, then you can ask a specific question about it.

Starting with "I don't know where to start" doesn't count because you already know where to start. You've been given those details in class already.

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