private void setRefr()
        {
            connectDB conn = new connectDB("ticketSys", "root", "localhost", "");

            ticketSystemGrid.ItemsSource = conn.Select().DefaultView;
            //timeBlock.Text = getTime().ToString("yyyy-dd-MM - H:mm:ss"); //Hiden already
        }
        private void LoadAll()
        {
            connectDB conn = new connectDB("ticketSys", "root", "localhost", "");

            ticketSystemGrid.ItemsSource = conn.Select().DefaultView;

            Timer t = new System.Timers.Timer();

            t.Interval  = 60000; //60s
            t.Elapsed  += refr;
            t.AutoReset = true;
            t.Enabled   = true;
        }
        private void openEvent_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                connectDB   conn = new connectDB("ticketSys", "root", "localhost", "");
                DataRowView drv  = ticketSystemGrid.SelectedItem as DataRowView;

                conn.Update(Convert.ToInt32(drv["ID"].ToString()), true);
                ticketSystemGrid.ItemsSource = conn.Select().DefaultView;
            }
            catch (Exception xe)
            {
                MessageBox.Show(xe.Message);
            }
        }
        private void refreshView_Click(object sender, RoutedEventArgs e)
        {
            connectDB conn = new connectDB("ticketSys", "root", "localhost", "");

            ticketSystemGrid.ItemsSource = conn.Select().DefaultView;
        }