Exemplo n.º 1
0
 /// <summary>
 /// Create a new UserRole object.
 /// </summary>
 /// <param name="userRoleId">Initial value of the UserRoleId property.</param>
 /// <param name="entityId">Initial value of the EntityId property.</param>
 /// <param name="roleType">Initial value of the RoleType property.</param>
 /// <param name="isActive">Initial value of the IsActive property.</param>
 public static UserRole CreateUserRole(global::System.Int32 userRoleId, global::System.Int32 entityId, global::System.Int32 roleType, global::System.Boolean isActive)
 {
     UserRole userRole = new UserRole();
     userRole.UserRoleId = userRoleId;
     userRole.EntityId = entityId;
     userRole.RoleType = roleType;
     userRole.IsActive = isActive;
     return userRole;
 }
Exemplo n.º 2
0
 /// <summary>
 /// InsertSimplRoles method
 /// </summary>
 /// <param name="simplRoleList"></param>
 /// <param name="simplUser"></param>
 /// <param name="sdb"></param>
 public void InsertSimplRoles(IEnumerable<int> simplRoleList, Entity simplUser, SIMPLEntities sdb)
 {
     foreach (var roleTypeId in simplRoleList)
     {
         var newRole = new UserRole { EntityId = simplUser.EntityId, RoleType = roleTypeId, IsActive = true };
         sdb.UserRoles.AddObject(newRole);
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the UserRoles EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToUserRoles(UserRole userRole)
 {
     base.AddObject("UserRoles", userRole);
 }