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); }
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); }