Exemplo n.º 1
0
        public void RefreshUI()
        {
            // This shows how to utilize GetUnregisteredCustomers
            DataTable dt = new DataTable();

            dt = sqlHandler.fillDataTable("GetUnregisteredCustomers");
            listView.ItemsSource = dt.DefaultView;
            txtFName.Text        = "";
            txtLName.Text        = "";
            txtEmail.Text        = "";
        }
Exemplo n.º 2
0
        private void RefreshUI()
        {
            DataTable dt = new DataTable();

            dt = sqlHandler.fillDataTable(String.Format("FindTicketInfo '{0}'", txtTicketID.Text));
            if (dt.Rows.Count > 0)
            {
                bool meal  = (bool)dt.Rows[0]["Meal"];
                bool prize = (bool)dt.Rows[0]["canGetPrize"];
                dt.Rows[0]["Meal"]        = !meal;
                dt.Rows[0]["canGetPrize"] = !prize;
                listView.ItemsSource      = dt.DefaultView;
            }
            else
            {
                MessageBox.Show("ERROR: Ticket is not registered");
            }
        }