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(); 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 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 Get(EnumRoleType roleType, int?userid, int?roleID); List Get(List searhEmps); List GetByUserID(int UserID); DataSet GetRoleAudit(int type, DateTime fromDate, DateTime ToDate); DataTable GetUserMenuByRole(string roleId); void Save(List userRoles, int payrolltypeid); void Delete(int id); } #endregion }