示例#1
0
        private void frmMain_FormClosed(object sender, FormClosedEventArgs e)
        {
            frmGiaoDien gd = new frmGiaoDien();

            gd.Show();
            this.Hide();
        }
示例#2
0
 private void btnDangKy_Click(object sender, EventArgs e)
 {
     if (txtid.Text == "" || txtmk.Text == "" || txtmk2.Text == "" || txtten.Text == "")
     {
         MessageBox.Show("Bạn chưa điền đủ thông tin");
     }
     else if (IsNumber(txtid.Text) == false)
     {
         MessageBox.Show("Số điện thoại không chính xác");
     }
     else
     {
         string id    = txtid.Text.Trim();
         bool   check = dt.Check(id, "select ID_TaiKhoan from TaiKhoan");
         if (check == false)
         {
             if (txtmk.Text == txtmk2.Text)
             {
                 string insert = "INSERT dbo.TaiKhoan(ID_TaiKhoan, TenTaiKhoan, MatKhau) VALUES ('" + txtid.Text + "','" + txtten.Text + "','" + txtmk.Text + "')";
                 dt.ThucThiKetNoi(insert);
                 frmGiaoDien gd = new frmGiaoDien();
                 gd.Show();
                 MessageBox.Show("Đăng ký thành công bạn có thể đăng nhập ngay");
             }
             else
             {
                 MessageBox.Show("Mật khẩu không trùng nhau !!");
             }
         }
         else
         {
             MessageBox.Show("Tài khoản đã tồn tại");
         }
     }
 }
示例#3
0
        private void toolStripMenuItem8_Click(object sender, EventArgs e)
        {
            DialogResult ds = MessageBox.Show("Bạn có muốn đăng suất !!", "Đăng suất", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

            if (ds == DialogResult.Yes)
            {
                frmGiaoDien gd = new frmGiaoDien();
                gd.Show();
                this.Close();
            }
        }
        private void frmDangNhap_FormClosed(object sender, FormClosedEventArgs e)
        {
            frmGiaoDien gd = new frmGiaoDien();

            gd.Show();
        }