修改AP
This commit is contained in:
@@ -5,20 +5,46 @@ using System.Configuration;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
using Dapper;
|
||||
|
||||
|
||||
namespace NX.ERP.U8.User
|
||||
|
||||
{
|
||||
public class User
|
||||
public class UserDal
|
||||
{
|
||||
|
||||
|
||||
|
||||
public IEnumerable<Model.Request.User> GetList(string strWhere = "", object Param = null)
|
||||
{
|
||||
|
||||
|
||||
using (var conn = U8LoginContext.Instance.Connection)
|
||||
{
|
||||
var sql = @" select cUser_Id as UserCode ,cUser_Name as UserName from UFSystem..UA_User ";
|
||||
if (!string.IsNullOrEmpty(strWhere))
|
||||
{
|
||||
sql += $" where {strWhere}";
|
||||
}
|
||||
return conn.Query<Model.Request.User>(sql, Param);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public Model.Request.User GetModel(string UserCode)
|
||||
{
|
||||
return this.GetList(" cUser_Id =@UserCode", new { UserCode }).FirstOrDefault();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public string Userrole(string Opnanme, string Pasd)
|
||||
{
|
||||
@@ -35,9 +61,9 @@ namespace NX.ERP.U8.User
|
||||
|
||||
|
||||
|
||||
using (var conn =_login.Connection)
|
||||
using (var conn = _login.Connection)
|
||||
{
|
||||
return conn.ExecuteScalar<string>(sql, new {Opnanme},null,30,System.Data.CommandType.Text);
|
||||
return conn.ExecuteScalar<string>(sql, new { Opnanme }, null, 30, System.Data.CommandType.Text);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user