Ejemplo n.º 1
0
        public string AddStudent(StudentDto stuDto)
        {
            Student stu = new Student();

            stu.STUNAME  = stuDto.StudentName;
            stu.STUAGE   = stuDto.StuAge;
            stu.STUCLASS = stuDto.StuClass;
            stu.STUSEX   = stuDto.StuSex;
            int i = StudentRepository.AddEntity(stu);

            if (i > 0)
            {
                return("添加成功。");
            }
            else
            {
                return("添加失败。");
            }
        }