Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Data;
- namespace QuanLyDiemHocSinhTHPT.DAO
- {
- class AccountDAO
- {
- private static AccountDAO instance;
- public static AccountDAO Instance
- {
- get { if (instance == null) instance = new AccountDAO(); return instance; }
- private set { instance = value; }
- }
- private AccountDAO() { }
- public bool Login(string userName, string passWord)
- {
- string query = "SELECT * FROM dbo.ACCOUNT WHERE UserName = N'" + userName + "' AND PassWord = N'" + passWord + "' ";
- DataTable result = DataProvider.Instance.ExecuteQuery(query);
- return result.Rows.Count > 0;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement