public void Add(Data.UserRole entity, int LoggedInUserId, int LoggedInOrganizationId) { entity.OrganizationId = LoggedInOrganizationId; entity.CreatedDate = DateTime.Now; entity.CreatedBy = LoggedInUserId; entity.IsDeleted = false; base.Insert(entity); }
// Khởi tạo đới tượng public UserRole() { mUserName = ""; mUserIDs = ""; mUserIDsDel = ""; mRoleID = ""; mRoleIDs = ""; objUserRole = new Data.UserRole(); }
public UserRole[] GetUserRoles() { List <UserRole> lstUserRole = new List <UserRole>(0); DataTable dt = new Data.UserRole().GetUserRoles(); if (dt != null) { foreach (DataRow dr in dt.Rows) { UserRole oUserRole = new UserRole(); oUserRole.UserName = string.Empty + dr["ME07_USERNAME"].ToString(); oUserRole.RoleID = string.Empty + dr["ME07_ROLEID"].ToString(); if (!lstUserRole.Contains(oUserRole)) { lstUserRole.Add(oUserRole); } } } return(lstUserRole.ToArray()); }
public void Update(Data.UserRole entity, int LoggedInUserId, int LoggedInOrganizationId) { base.Update(entity); _unitOfWork.Save(); }