【c#新手学习 练习 案例】 阶段项目一:开发团队调度软件
案例是模仿java https://blog.csdn.net/bjfu170203101/article/details/109322590
改用C#:开发环境 vs2022/vscode .net6.0 C#10
开发时长:完全掌握知识点一天就可以完成 、新手估计要2-3周,因为很多知识点 必须完全掌握了才能开发,也可以边查边学习。
C# 源代码:开发团队调度软件源代码
软件地址:开发团队调度软件
软件需求
目的:比较简单的一个小项目,主要是回顾下C#基础的学习
用到的知识点:List<T>、泛型、类的设计、接口、mvc架构、string 格式化、goto 、Exception类、枚举、console类的应用
要求:根据现有的人员组件一个 不超过5个人的 开发小团队。
1、开发团队人员组成要求:
最多一名架构师
最多两名设计师
最多三名程序员
2、使用mvc框架开发
view 层面的类:Program
modle层面的类:NameListService
control控制层的类: Employee(成员:int-ID string-Name、int-Age、double-Salary、Job-Job)、Equipment、Team
类的成员 参考:https://blog.csdn.net/bjfu170203101/article/details/109322590
提供的数据:
基础类库:新建Data.cs 文件,将以下代码拷贝到文件中;
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace EmployeeSchedulerSystem { internal class Data { public const int EMPLOYEE = 10; public const int PROGRAMER = 11; public const int DESIGNER = 12; public const int ARCHITECT = 13; public const int PC = 21; public const int NOTEBOOK = 22; public const int PRINTER = 23; public static readonly String[][] EMPLOYEES=new string[][] { new string[] {"10","1","马云","22","3000"}, new string[] { "13","2","马化腾","32","18000","15000","2000"}, new string[] { "11","3","李彦宏","23","7000"}, new string[] { "11","4","刘强东","24","7300"}, new string[] { "12","5","雷军","28","10000","5000"}, new string[] { "11","6","任志强","22","6800"}, new string[] { "12","7","柳传志","729","10800","5200"}, new string[] { "13","8","杨元庆","30","19800","15000","2500"}, new string[] { "12","9","史玉柱","26","9800","5500"}, new string[] { "11","10","丁磊","21","6600"}, new string[] { "11","11","张朝阳","25","7100"}, new string[] { "12","12","杨致远","27","9600","4800"} }; public static readonly String[][] EQUIPMENTS=new string[][]{ new String[]{}, new String[]{"22","联想T4","6000"}, new String[]{"21","戴尔","NEC 17寸",}, new String[]{"21","戴尔","三星17寸"}, new String[]{"23","佳能2900","激光"}, new String[]{"21","华硕","三星17寸"}, new String[]{"21","华硕","三星17寸"}, new String[]{"23","爱普生20k","针式"}, new String[]{"22","惠普m6","5800"}, new String[]{"21","戴尔","NEC 17寸"}, new String[]{"21","华硕","三星17寸"}, new String[]{"22","惠普m6","5000"} }; } }
EMPLOYEES和EQUIPMENTS 数据一 一对应。
一共5个界面设计要求如下:
1、菜单页面
需求说明
·该页面实现以下功能:
软件启动时,根据给定的数据(Data.cs)显示公司部分成员列表(数组)
根据菜单提示, 输入的按键(1、2、3、4),进入相应的页面。
按1就进入团队列表页面。显示已经添加成功的团队成员。
2、添加员工页面
需求说明
根据输入的员工id值 按回车键后,将员工加入团队。如果添加操作因某种原因失败,将显示类似以下信息(失败原因视具体原因而不同):
3、显示员工页面
显示出所有已经添加的团队成员
4、删除员工页面
根据团队员工的Mid,将员工移出团队
5、退出页面