private void metroTileItem1_Click(object sender, EventArgs e) { Login frm = new Login(); frm.MdiParent = this.ParentForm; this.Close(); frm.Show(); }
private void button2_Click(object sender, EventArgs e) { this.DialogResult = DialogResult.Retry; Login frm = new Login(); frm.MdiParent = this.ParentForm; this.Close(); frm.Show(); }
void CheckSTT() { DataTable dt = new DataTable(); GetMac frm1 = new GetMac(); Session.Mac = frm1.GetMACAddress(); string a = frm1.GetMACAddress(); dt = cn.Select("SELECT action,inforOfMess FROM ChildrenCode where username='******' and password='******' "); if (dt.Rows.Count == 1) { int step = 5; for (int i = 0; i <= step; i++) { if (i == step) { i = 0; } else { if (dt.Rows[0][0].ToString() == "lock") { cn.ExecuteSQL("Update ChildrenCode set action='' where username='******' and password='******'"); Login fr = new Login(); fr.ShowDialog(); } if (dt.Rows[0][0].ToString() == "tatmay") { cn.ExecuteSQL("Update ChildrenCode set action='' where username='******' and password='******'"); System.Diagnostics.Process.Start("Shutdown", "-s -f -t 1"); } if (dt.Rows[0][0].ToString() == "khoidong") { cn.ExecuteSQL("Update ChildrenCode set action='' where username='******' and password='******'"); System.Diagnostics.Process.Start("Shutdown", "-r -f -t 1"); } if (dt.Rows[0][0].ToString() == "chup") { cn.ExecuteSQL("Update ChildrenCode set action='' where username='******' and password='******'"); ScreenCapture chup = new ScreenCapture(); chup.Chup(); } if (dt.Rows[0][1].ToString() != "") { cn.ExecuteSQL("Update ChildrenCode set inforOfMess='' where username='******' and password='******'"); MessageBox.Show(dt.Rows[0][1].ToString(), "Thong Bao"); } else { } } } } }