initial add
This commit is contained in:
29
Fab2ApprovalSystem/DMO/SAM_DMO.cs
Normal file
29
Fab2ApprovalSystem/DMO/SAM_DMO.cs
Normal file
@ -0,0 +1,29 @@
|
||||
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();
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user