Exemple #1
0
        static void Delete()
        {
            Console.Write("请输入ID:");
            int id = int.Parse(Console.ReadLine());
            BlogBusinessLayert bbl = new BlogBusinessLayert();
            Classandgrade      cla = bbl.Query(id);

            bbl.Delete(cla);
        }
Exemple #2
0
        static void Delete()
        {
            Console.Write("请输入ID:");
            int id = int.Parse(Console.ReadLine());
            BlogBusinessLayert bbl = new BlogBusinessLayert();
            Blog blog = bbl.Query(id);

            bbl.Delete(blog);
            Console.WriteLine("删除完成!");
        }
Exemple #3
0
        static void QueryBlog()
        {
            BlogBusinessLayert bbl = new BlogBusinessLayert();
            var blogs = bbl.Query();

            foreach (var item in blogs)
            {
                Console.WriteLine("ID:{0}   消息:{1}", item.BlogId, item.Name);
            }
        }
Exemple #4
0
        static void QueryBlog()
        {
            BlogBusinessLayert bbl = new BlogBusinessLayert();
            var blogs = bbl.Query();

            foreach (var item in blogs)
            {
                Console.WriteLine("ID:{0}   消息:{1}", item.Classandgradeid, item.Curriculum);
            }
        }
Exemple #5
0
        /// <summary>
        /// -------这里是全部博客的列表--------
        /// </summary>
        static void crateBlog()
        {
            Console.WriteLine("请输入一条消息!");
            string name = Console.ReadLine();
            Blog   blog = new Blog();

            blog.Name = name;
            BlogBusinessLayert bll = new BlogBusinessLayert();

            bll.Add(blog);
        }
Exemple #6
0
        static void QueryClass()
        {
            Console.WriteLine("请输入一个课程:");
            string        b   = Console.ReadLine();
            Classandgrade cla = new Classandgrade();

            cla.Curriculum = b;
            BlogBusinessLayert bbl = new BlogBusinessLayert();

            bbl.Add(cla);
        }
Exemple #7
0
        static void Update()
        {
            Console.Write("请输入要修改的ID:");
            int id = int.Parse(Console.ReadLine());
            BlogBusinessLayert bbl = new BlogBusinessLayert();
            Blog blog = bbl.Query(id);

            Console.Write("请输入要修改的消息:");
            string name = Console.ReadLine();

            blog.Name = name;
            bbl.Update(blog);
        }
Exemple #8
0
        static void Update()
        {
            Console.Write("请输入要修改的ID:");
            int id = int.Parse(Console.ReadLine());
            BlogBusinessLayert bbl = new BlogBusinessLayert();
            Classandgrade      cla = bbl.Query(id);

            Console.Write("请输入要修改的消息:");
            string name = Console.ReadLine();

            cla.Curriculum = name;
            bbl.Update(cla);
        }