Exemple #1
0
 public int UpdateRoleAuth(SystemRoleAuthority roleAuth)
 {
     if (roleAuth != null)
     {
         sras.Update(roleAuth);
         int result = sras.SaveChanges();
         return(result);
     }
     else
     {
         return(0);
     }
 }
Exemple #2
0
        public void testUpdate()
        {
            SystemRoleAuthorityService sras = new SystemRoleAuthorityService();
            SystemRoleAuthority        sra  = new SystemRoleAuthority();

            sra.Id         = 1;
            sra.ModuleName = "客户";
            sra.RoleId     = 1;
            sra.IsLock     = 0;
            sras.Update(sra);
            sras.SaveChanges();
            Assert.IsTrue(sra.IsLock == sras.GetRoleAuth(1).IsLock);
            Console.WriteLine(sras.GetRoleAuth(1).IsLock);
        }