示例#1
0
 private void btnTao_Click(object sender, EventArgs e)
 {
     nd.TaiKhoan  = txtDKTaiKhoan.Text;
     nd.MatKhau   = txtDKMatKhau.Text;
     nd.PhanQuyen = cmbPhanQuyen.Text;
     nd.MaNV      = cmbNhanVien.SelectedValue.ToString();
     if (txtDKTaiKhoan.Text == "")
     {
         lblLoiDKTaiKhoan.Text = "Bạn chưa nhập tài khoản";
     }
     else if (txtDKMatKhau.Text == "")
     {
         lblLoiDangKiMatKhau.Text = "Bạn chưa nhập mật khẩu";
     }
     else if (txtDKMatKhau.Text != txtNhapLaiMatKhau.Text)
     {
         lblLoiNhapLaiMatKhau.Text = "Mật khẩu không trùng khớp";
     }
     else
     {
         ndbus.ThemNguoiDung(nd);
         MessageBox.Show("Tạo tài khoản thành công!");
         frmThongTinTaiKhoan frmTK = new frmThongTinTaiKhoan();
         frmTK.Show();
         this.Close();
     }
 }
示例#2
0
        private void tàiKhoảnToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmThongTinTaiKhoan frmTT = new frmThongTinTaiKhoan();

            frmTT.Show();
            this.Hide();
        }