Example #1
0
        private void mặcĐịnhToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            dangnhap      dn   = new dangnhap();
            dangky        dk   = new dangky();
            tt_sinhvien   ttsv = new tt_sinhvien();
            tt_monhoc     ttmh = new tt_monhoc();
            tt_lop        ttl  = new tt_lop();
            tt_khoa       ttk  = new tt_khoa();
            tt_giaovien   ttgv = new tt_giaovien();
            tt_chinhsach  ttcs = new tt_chinhsach();
            tt_diem       ttd  = new tt_diem();
            ql_admin      qlad = new ql_admin();
            ql_giaovien   qlgv = new ql_giaovien();
            ql_truongkhoa qltk = new ql_truongkhoa();
            ql_users      qlu  = new ql_users();

            qlu.Opacity  = 1;
            qltk.Opacity = 1;
            qlgv.Opacity = 1;
            qlad.Opacity = 1;
            ttd.Opacity  = 1;
            ttcs.Opacity = 1;
            ttgv.Opacity = 1;
            ttk.Opacity  = 1;
            ttl.Opacity  = 1;
            ttmh.Opacity = 1;
            ttsv.Opacity = 1;
            dn.Opacity   = 1;
            dk.Opacity   = 1;
            this.Opacity = 1;
        }
Example #2
0
        private void ht_dn_Click(object sender, EventArgs e)
        {
            dangnhap f = new dangnhap();

            f.Show();
            this.Hide();
        }
Example #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            dangnhap d = new dangnhap();

            d.Show();
            this.Hide();
        }
Example #4
0
 private void button1_Click(object sender, EventArgs e)
 {
     try
     {
         string pass   = textBox2.Text;
         string repass = textBox3.Text;
         if (pass.Equals(repass))
         {
             string sql = "select count(*) from tkad where tk=N'" + textBox1.Text + "'";
             if (textBox1.Text.Trim().Equals(""))
             {
                 MessageBox.Show("Bạn Chưa Nhập Tên Người Dùng!", "Đăng Ký", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
             }
             else if (textBox2.Text.Trim().Equals(""))
             {
                 MessageBox.Show("Bạn Chưa Nhập Mật Khẩu!", "Đăng Ký", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
             }
             else
             {
                 int i = (int)KetNoiCSDL.count(sql);
                 if (i != 0)
                 {
                     MessageBox.Show("Tài Khoản Đã Được Đăng Ký. Vui Lòng Sử Dụng Tên Khác! ", "Đăng Ký", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                     textBox1.Clear();
                     textBox2.Clear();
                     textBox3.Clear();
                     textBox1.Focus();
                 }
                 else
                 {
                     string txt  = getMD5(textBox2.Text);
                     string them = "insert into tkad values(N'" + textBox1.Text + "',N'" + txt + "',N'User')";
                     KetNoiCSDL.themsuaxoa(them);
                     if (MessageBox.Show("Đăng Ký Thành Công. Bạn Có Muốn Đăng Nhập Không?", "Đăng Ký", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                     {
                         this.Hide();
                         dangnhap f = new dangnhap();
                         f.Show();
                     }
                 }
             }
         }
         else
         {
             MessageBox.Show("Mật Khẩu Bạn Nhập Không Khớp! Bạn Vui Lòng Kiểm Tra Lại!", "Đăng Ký", MessageBoxButtons.OK, MessageBoxIcon.Error);
             textBox2.Clear();
             textBox3.Clear();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("Thao Tác Không Thực Hiện Được! Vui Lòng Kiểm Tra Lại!", "Đăng Ký", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Example #5
0
        private void mặcĐịnhToolStripMenuItem_Click(object sender, EventArgs e)
        {
            dangnhap dn   = new dangnhap();
            dangky   dk   = new dangky();
            ql_admin qlad = new ql_admin();

            //ql_giaovien qlgv = new ql_giaovien();
            //ql_truongkhoa qltk = new ql_truongkhoa();
            //ql_users qlu = new ql_users();
            //qlu.Opacity = 0.45;
            //qltk.Opacity = 0.45;
            //qlgv.Opacity = 0.45;
            qlad.Opacity = 0.45;

            dn.Opacity   = 0.45;
            dk.Opacity   = 0.45;
            this.Opacity = 0.45;
        }