Esempio n. 1
0
        // for password Changing set 'Password' field to value, otherwise set 'Password' field = null
        // if PasswordSalt and PasswordHash recalculated to new values. It must changed in newActor too
        public static void Update(Role newRole)
        {
            DAL.tblAuthenticationRole dataItem = DAL.CurrDBContext.Get().tblAuthenticationRole.Where(x => x.Id == newRole.Id).Single();

            dataItem.EnumName   = newRole.EnumName;
            dataItem.IsReadOnly = newRole.IsReadOnly;
            dataItem.IsDeleted  = newRole.IsDeleted;

            DAL.CurrDBContext.Get().SaveChanges();
        }
Esempio n. 2
0
        public static long Create(String enumName, Boolean isReadOnly, Boolean isDeleted)
        {
            DAL.tblAuthenticationRole currItem = new DAL.tblAuthenticationRole()
            {
                EnumName   = enumName,
                IsReadOnly = isReadOnly,
                IsDeleted  = isDeleted
            };
            DAL.CurrDBContext.Get().tblAuthenticationRole.Add(currItem);
            DAL.CurrDBContext.Get().SaveChanges();

            long id = currItem.Id;

            return(id);
        }