public DataTable KtraTaiKhoan(string TenBang, string TenDangNhap, string MatKhau, ref string err) { string id = ""; if (TenBang == "QuanLy") { id = "idQuanLy"; } else if (TenBang == "TacGia") { id = "MaTacGia"; } string sqlkt = "select * from " + TenBang + " where " + id + "=" + "N'" + TenDangNhap + "' and MatKhau=N'" + MatKhau + "'"; return(db.CheckLogin(sqlkt, System.Data.CommandType.Text, ref err)); }