Esempio n. 1
0
        public CustomerPage()
        {
            InitializeComponent();
            myobj.add(15, "spooky", 15, 12345);
            myobj.add(14, "scary", 12, 1234);
            myobj.add(13, "sneaky", 15, 12345);

            lbox.ItemsSource = myobj.clist;
        }
Esempio n. 2
0
        public void submitbuttonHandle(object sender, RoutedEventArgs e)
        {
            try
            {
                this.id   = Int32.Parse(identery.Text);
                this.name = nameentery.Text;
                this.age  = Int32.Parse(ageentery.Text);
                this.num  = Int32.Parse(Phoneentry.Text);

                mydata.add(id, name, age, num);
                lbox.ItemsSource = mydata.clist;
                this.Close();
            }
            catch (Exception err)
            {
                Console.WriteLine(err);
                MessageBox.Show("Incorrect Entry for 1 or more fields \n Try Again. \n");
            }
        }