示例#1
0
        private void đăngXuấtToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Hide();
            frLogin login = new frLogin();

            login.Show();
        }
示例#2
0
 public void CheckConfig()
 {
     if (System.IO.File.Exists(path) == false)
     {
         MessageBox.Show("Đây là lần đầu tiên bạn chạy ứng dụng ?");
         frConfig c = new frConfig();
         c.Show();
     }
     else
     {
         try
         {
             string        test         = "Server = " + ConfigurationManager.AppSettings["Server"] + "; Database = " + ConfigurationManager.AppSettings["Database"] + ";Integrated Security = true;";
             SqlConnection checkConnect = new SqlConnection(test);
             checkConnect.Open();
             frLogin l = new frLogin();
             l.Show();
         }
         catch
         {
             MessageBox.Show("Your Configuration information doesn't correct, please check your info now");
             frConfig c = new frConfig();
             c.Show();
         }
     }
 }