爱思开
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

33 lines
1.2 KiB

using NFine.Code;
using NFine.Domain.Entity.SystemManage;
using NFine.Domain.IRepository.SystemManage;
using NFine.Repository.SystemManage;
namespace NFine.Application.SystemManage
{
public class UserLogOnApp
{
private IUserLogOnRepository service = new UserLogOnRepository();
public UserLogOnEntity GetForm(string keyValue)
{
return service.FindEntity(keyValue);
}
public void UpdateForm(UserLogOnEntity userLogOnEntity)
{
service.Update(userLogOnEntity);
}
public void RevisePassword(string userPassword,string keyValue)
{
UserLogOnEntity userLogOnEntity = new UserLogOnEntity();
if (keyValue == "SYS")
keyValue = NFine.Code.OperatorProvider.Provider.GetCurrent().UserId;
userLogOnEntity.F_Id = keyValue;
userLogOnEntity.F_UserSecretkey = Md5.md5(Common.CreateNo(), 16).ToLower();
userLogOnEntity.F_UserPassword = Md5.md5(DESEncrypt.Encrypt(Md5.md5(userPassword, 32).ToLower(), userLogOnEntity.F_UserSecretkey).ToLower(), 32).ToLower();
service.Update(userLogOnEntity);
}
}
}