75 lines
2.1 KiB
C#
75 lines
2.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
|
|
namespace HRM.BO
|
|
{
|
|
#region UserRole
|
|
|
|
public class UserRole : BasicBaseObject
|
|
{
|
|
#region Constructor
|
|
|
|
public UserRole()
|
|
{
|
|
RolePermision = new List<Role.RolePermission>();
|
|
RoleID = 0;
|
|
UserID = 0;
|
|
Role = null;
|
|
User = null;
|
|
EventDate = DateTime.Today;
|
|
CreatedBy = 0;
|
|
AuthorizedBy = 0;
|
|
AuthorizedDate = DateTime.MinValue;
|
|
ComputerName = "";
|
|
ApprovedComputerName = "";
|
|
UserRoleStatus = EnumAuthStatus.NewNotYetApprove;
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Properties
|
|
|
|
public int RoleID { get; set; }
|
|
public int UserID { get; set; }
|
|
public Role Role { get; set; }
|
|
public User User { get; set; }
|
|
public List<Role.RolePermission> RolePermision { get; set; }
|
|
public DateTime? AuthorizedDate { get; set; }
|
|
public int AuthorizedBy { get; set; }
|
|
public string ApprovedComputerName { get; set; }
|
|
public DateTime EventDate { get; set; }
|
|
public string ComputerName { get; set; }
|
|
public EnumAuthStatus UserRoleStatus { get; set; }
|
|
|
|
// not Database Property,
|
|
public string loginIDView { get; set; }
|
|
public string userNameView { get; set; }
|
|
public string roleNameView { get; set; }
|
|
public int? payrollTypeID { get; set; }
|
|
public int? employeeID { get; set; }
|
|
|
|
#endregion
|
|
|
|
|
|
}
|
|
#endregion
|
|
|
|
#region IUserRole Service
|
|
|
|
public interface IUserRoleService
|
|
{
|
|
UserRole Get(int id);
|
|
List<UserRole> Get(EnumRoleType roleType, int?userid, int?roleID);
|
|
List<UserRole> Get(List<SearchEmployee> searhEmps);
|
|
List<UserRole> GetByUserID(int UserID);
|
|
DataSet GetRoleAudit(int type, DateTime fromDate, DateTime ToDate);
|
|
DataTable GetUserMenuByRole(string roleId);
|
|
|
|
void Save(List<UserRole> userRoles, int payrolltypeid);
|
|
void Delete(int id);
|
|
}
|
|
|
|
#endregion
|
|
}
|