Example #1
0
        void DangNhap()
        {
            string ma      = txtTaiKhoan.Text.ToUpper();
            string mk      = txtMatKhau.Text;
            int    kiemtra = dangnhap.KiemTra(ma, mk);

            if (kiemtra == 0)
            {
                MessageBox.Show("Sai tài khoản hoặc mật khẩu");
            }
            if (kiemtra == 1)
            {
                txtMatKhau.Clear();
                this.Hide();
                string ten = dangnhap.tenBS(ma);
                new AdminPage(ten, ma).ShowDialog();
                this.Show();
            }
            if (kiemtra == 2)
            {
                txtMatKhau.Clear();
                this.Hide();
                string ten = dangnhap.tenBS(ma);
                new BacSiPage(ten, ma).ShowDialog();
                this.Show();
            }
        }
 private void formBacSi_TaoDon_Load(object sender, EventArgs e)
 {
     this.Width         = 690;
     this.Height        = 310;
     txtMaDonThuoc.Text = maDT;
     txtMaBacSi.Text    = maBS;
     txtTenBacSi.Text   = tenBS.tenBS(maBS);
     txtMaBenhNhan.Text = maBN;
 }