Tasks 184281, 184799, 184800, 184801 and 184802
Align .editorconfig files Move Controller logic to DMO classes GlobalVars.AppSettings = Models.AppSettings.GetFromConfigurationManager(); Question EditorConfig Project level editorconfig Format White Spaces AppSetting when EnvironmentVariable not set Corrective Actions Tests Schedule Actions Tests DMO Tests Controller Tests Get ready to use VSCode IDE
This commit is contained in:
@ -1,29 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
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);
|
||||
using Dapper;
|
||||
|
||||
namespace Fab2ApprovalSystem.DMO;
|
||||
|
||||
public int HasITARAccess(string userID)
|
||||
{
|
||||
public class SAM_DMO {
|
||||
private readonly IDbConnection db = new SqlConnection(ConfigurationManager.ConnectionStrings["SAMDBConnectionString"].ConnectionString);
|
||||
|
||||
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();
|
||||
|
||||
}
|
||||
|
||||
|
||||
public int HasITARAccess(string userID) {
|
||||
StringBuilder query = new("SELECT COUNT(*) FROM dbo.fnIsUserITARCompliant(@UserID) ");
|
||||
//query.Append("WHERE UserID = @UserID AND AND EmployeeStatus = 'Active'");
|
||||
return db.Query<int>(query.ToString(), new { UserID = userID }).SingleOrDefault();
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user