Exemple #1
0
        static void Delete()
        {
            ClassBusinessLayer cbl = new ClassBusinessLayer();

            Console.WriteLine("请输入一个班级的id");
            int   id      = int.Parse(Console.ReadLine());
            Class classes = cbl.Query(id);

            cbl.Delete(classes);
        }
Exemple #2
0
        //删除
        static void Delete()
        {
            ClassBusinessLayer bbl = new ClassBusinessLayer();

            Console.Write("请输入删除班级id");
            int  id   = int.Parse(Console.ReadLine());
            Clas clas = bbl.Query(id);

            bbl.Delete(clas);
        }
Exemple #3
0
        static void QueryClass()
        {
            ClassBusinessLayer cbl = new ClassBusinessLayer();
            var classes            = cbl.Query();

            foreach (var item in classes)
            {
                Console.WriteLine(item.ClassId + " " + item.ClassName);
            }
        }
Exemple #4
0
        static void Update()
        {
            Console.WriteLine("请输入班级id");
            int id = int.Parse(Console.ReadLine());
            ClassBusinessLayer cbl = new ClassBusinessLayer();
            Class classed          = cbl.Query(id);

            Console.WriteLine("请输入新的班级名字");
            string name = Console.ReadLine();

            classed.ClassName = name;
            cbl.Update(classed);
        }
Exemple #5
0
        static void Update()
        {
            Console.WriteLine("请输入班级ID");
            int id = int.Parse(Console.ReadLine());
            ClassBusinessLayer bbl = new ClassBusinessLayer();
            Clas clas = bbl.Query(id);

            Console.WriteLine("请输入新名字");
            string name = Console.ReadLine();

            clas.ClasName = name;
            bbl.Update(clas);
        }