Esempio n. 1
0
        public void Getdata(Object o, EventArgs e)
        {
            studentdb = new StudentDB();
            Student stu = studentdb.GetStudent(Convert.ToInt32(id1.Text));

            name.Text    = stu.Name;
            address.Text = stu.Address;
            phone.Text   = stu.Phone;
        }
Esempio n. 2
0
        public Studentlist(int id)
        {
            studentdb = new StudentDB();
            Student        stu = studentdb.GetStudent(id);
            List <Student> sb  = new List <Student>();

            sb.Add(new Student {
                Address = stu.Address
            });
            //sb.Add(new Student { Phone = stu.Phone });
            listviewstudentlist.ItemsSource = sb;
        }