Ejemplo n.º 1
0
        /// <summary>
        /// Save user's role details
        /// </summary>
        /// <param name="roleDetails">Role details</param>
        public void SaveUserRoleDetails(ConfigurationModel roleDetails)
        {
            using (var db = new ContinuousIntegrationEntities())
            {
                var userRoleMappings = new T_UserRoleMappings
                {
                    C_RegisterID   = roleDetails.SelectedUserID,
                    C_RoleID       = roleDetails.SelectedRoleID,
                    C_LastModified = DateTime.Now
                };

                db.T_UserRoleMappings.Add(userRoleMappings);
                db.SaveChanges();
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Save user's role details
        /// </summary>
        /// <param name="roleDetails">Role details</param>
        public void SaveUserRoleDetails(ConfigurationModel roleDetails)
        {
            using (var db = new ContinuousIntegrationEntities())
            {
                var userRoleMappings = new T_UserRoleMappings
                {
                    C_RegisterID = roleDetails.SelectedUserID,
                    C_RoleID = roleDetails.SelectedRoleID,
                    C_LastModified = DateTime.Now
                };

                db.T_UserRoleMappings.Add(userRoleMappings);
                db.SaveChanges();
            }
        }