Ejemplo n.º 1
0
        private void btn_dangxuat_Click(object sender, EventArgs e)
        {
            this.Hide();
            frm_dangnhap dangnhap = new frm_dangnhap();

            dangnhap.ShowDialog();
        }
Ejemplo n.º 2
0
        private void btnKetNoi_Click(object sender, EventArgs e)
        {
            string strConnect = "";

            if (cbbAuthentication.SelectedIndex == 0)
            {
                strConnect = "Data Source=" + cbbServerName.Text + ";Initial Catalog=" + cbbDatabase.Text + ";Integrated Security=True";
            }
            else
            {
                strConnect = "Data Source=" + cbbServerName.Text + ";Initial Catalog=" + cbbDatabase.Text + ";Persist Security Info=True;User ID=" + txtUserName.Text + ";Password="******"";
            }
            SaveConnectString(strConnect);
            frm_dangnhap dangNhap = new frm_dangnhap();

            dangNhap.Show();
            this.Close();
        }