出库单返回单号
增加登录验证
This commit is contained in:
@@ -3,27 +3,50 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Linq;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Http;
|
||||
namespace NX.ERP.WebAPi.Controllers.System
|
||||
{
|
||||
|
||||
public class SystemController:ApiController
|
||||
|
||||
public class SystemController : ApiController
|
||||
{
|
||||
|
||||
|
||||
[HttpPost]
|
||||
[Route("api/System/Login")]
|
||||
public string Login(LoginEntity loginEntity)
|
||||
[Route("api/System/BOLogin")]
|
||||
public string BOLogin(LoginEntity loginEntity)
|
||||
{
|
||||
var AccID = ConfigurationManager.AppSettings["AccId"];
|
||||
var AccID = ConfigurationManager.AppSettings["AccId"];
|
||||
//NX.ERP.U8.U8LoginContext.Instance.PassWord = System.Configuration.ConfigurationManager.AppSettings["Password"];
|
||||
//NX.ERP.U8.U8LoginContext.Instance.UserId = System.Configuration.ConfigurationManager.AppSettings["UserId"];
|
||||
var Server =ConfigurationManager.AppSettings["Server"];
|
||||
var Server = ConfigurationManager.AppSettings["Server"];
|
||||
var _login = new NX.ERP.U8.U8LoginContext(Server, AccID);
|
||||
_login.Login(loginEntity.UserId, loginEntity.Password);
|
||||
return _login.loginId;
|
||||
}
|
||||
|
||||
|
||||
[HttpPost]
|
||||
[Route("api/System/Login")]
|
||||
public bool Login(LoginEntity loginEntity)
|
||||
{
|
||||
if (string.IsNullOrEmpty(loginEntity.Password) || string.IsNullOrEmpty(loginEntity.UserId))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//密码密文
|
||||
var userDal = new U8.User.UserDal();
|
||||
return userDal.Login(loginEntity.UserId, loginEntity.Password);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
[HttpPost]
|
||||
[Route("api/System/Userrole")]
|
||||
public string Userrole(LoginEntity loginEntity)
|
||||
|
||||
Reference in New Issue
Block a user