29 lines
796 B
C#
29 lines
796 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Configuration;
|
|
using System.Data;
|
|
using System.Data.SqlClient;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using Dapper;
|
|
using System.Text;
|
|
|
|
namespace Fab2ApprovalSystem.DMO
|
|
{
|
|
public class SAM_DMO
|
|
{
|
|
private IDbConnection db = new SqlConnection(ConfigurationManager.ConnectionStrings["SAMDBConnectionString"].ConnectionString);
|
|
|
|
|
|
public int HasITARAccess(string userID)
|
|
{
|
|
|
|
StringBuilder query = new StringBuilder("SELECT COUNT(*) FROM dbo.fnIsUserITARCompliant(@UserID) ");
|
|
//query.Append("WHERE UserID = @UserID AND AND EmployeeStatus = 'Active'");
|
|
return this.db.Query<int>(query.ToString(), new { UserID = userID }).SingleOrDefault();
|
|
|
|
}
|
|
|
|
|
|
}
|
|
} |