private void ClosingEventHandler(object sender, DialogClosingEventArgs eventArgs) { this.Close(); form_login fl = new form_login(); fl.Show(); }
private void btn_logout_Click(object sender, RoutedEventArgs e) { k.sql = "delete from session where session_id='" + sessionId + "'"; k.setdt(); form_login fl = new form_login(); fl.Show(); sumputin(); }
void timer_splash(object sender, EventArgs e) { switch (step) { case 0: break; case 1: timer.Interval = TimeSpan.FromMilliseconds(700); txt_load.Text = "Initializing Modules..........."; break; case 2: txt_load.Text = "Connecting to Database......."; break; case 3: try { k.open(); txt_load.Text = "Connection OK...."; } catch (Exception ex) { timer.Stop(); if (System.Windows.Forms.MessageBox.Show("Koneksi Ke Database Gagal", "Informasi", MessageBoxButtons.OK, MessageBoxIcon.Information) == System.Windows.Forms.DialogResult.OK) { timer.Stop(); this.Close(); } } timer.Interval = TimeSpan.FromMilliseconds(1200); break; case 4: txt_load.Text = "Checking account.........."; break; case 5: k.sql = "select *from pegawai inner join akun on akun.nip=pegawai.nip"; k.setdt(); int cekbaris = k.dt.Rows.Count; if (cekbaris == 0) { register_app frreg = new register_app(); frreg.Show(); timer.Stop(); this.Close(); } txt_load.Text = "Finalizing........"; break; case 6: timer.Stop(); form_login frlog = new form_login(); frlog.Show(); this.Close(); break; } step++; }