예제 #1
0
        private void buttonload_Click(object sender, EventArgs e)
        {
            Human zhansan = new Human();

            zhansan.Age = 19;
            HumanCurdRepository database = new HumanCurdRepository();

            database.Add(zhansan);
            this.dataGridView.DataSource = database.GetAll();
        }
예제 #2
0
파일: Program.cs 프로젝트: Scorpius666/OOP1
        static void Main(string[] args)
        {
            //Human zhansan = new Human();
            //zhansan.Age = 18;
            //Human lisi = new Human();
            //lisi.Age = 19;
            //Human wangwu = new Human();
            //Human zhaoliu = new Human();
            Human zhansan = new Human();

            zhansan.Age = 19;
            HumanCurdRepository database = new HumanCurdRepository();

            database.Add(zhansan);
            Console.WriteLine(JsonConvert.SerializeObject(database.GetAll()));
        }