StudentBLL.cs

(开头部分) 6KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;

namespace Student_Managentment_System
{
    public class StudentBLL
    {
        StudentDAL stuDal = new StudentDAL();
        CourseDAL couDal = new CourseDAL();


        #region 添加学生
        public void AddStudent()
        {
            StudentInfo stu = new StudentInfo();
        InputName:
            Console.Write("请输入你要添加的学生姓名:");
            stu.Name = Console.ReadLine();
            if (stu.Name.Length == 0)
            {
                Console.WriteLine("姓名不能为空,请重新输入");
                goto InputName;
            }
            else
            {
            InputClsName:
                Console.Write("请输入班级:");
                stu.ClaName = Console.ReadLine();
                if (stu.ClaName.Length == 0)
                {
                    Console.WriteLine("输入为空,请重新输入");
                    goto InputClsName;
                }
                else
                {

                    Console.WriteLine("添加成功");
                    stuDal.AddStudent(stu);
                    Console.ReadKey();
                }
            }


        }
        #endregion

        #region 获取所有学生
        /// <summary>
        /// 获取所有学生
        /// </summary>
        /// <returns></returns>
        public List<StudentInfo> getStudents()
        {
            return stuDal.getStudents();
        }
        #endregion
后面还有 160 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。