如何使用C#使用控制台应用程序添加,编辑,查看和删除员工详细信息 [英] How to add,edit,view and delete employee details using console application using C#

查看:265
本文介绍了如何使用C#使用控制台应用程序添加,编辑,查看和删除员工详细信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用C#创建一个控制台应用程序来添加,编辑,查看和删除员工的详细信息。



有没有办法做到这一点。如果是这样帮助我编写员工细节的代码

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

推荐答案

是的,你可以。为什么不?请自行尝试。

只需使用ADO.NET对象连接数据库,并通过执行查询执行所需的所有操作。

如果您不知道如何要做到这一点,然后在Google上搜索一些文章。



这里我们回答成员在编程时遇到的具体问题。



如果您在编码时遇到任何困难,请随时回到此处,并针对描述该方案的特定问题提出另一个问题。



各位会员很乐意为您提供帮助。 :)
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. :)


没有人能够为你编写代码来执行此操作。首先,本网站不接受为您编写的代码请求。



您还有其他问题。第一个是要执行此操作的许多代码取决于您要连接的数据库引擎以及数据库架构是什么。



接下来,控制台应用程序要做到这一点,您需要准确说明用户希望如何编辑记录。这是一个菜单系统,您可以选择一个编号来编辑员工记录的那一行吗?它是否会在命令行驱动的情况下指定用于查找和编辑员工记录的开关?您是否希望生成某种屏幕布局,您可以在其中编辑屏幕上显示的字段?



无论如何,它还需要做更多的工作在专用的GUI应用程序中执行此操作。
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.


这篇关于如何使用C#使用控制台应用程序添加,编辑,查看和删除员工详细信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆