예제 #1
0
파일: Profile.cs 프로젝트: niiku/Nova-V8
 public void removeComponent(Component c)
 {
     List<Permission> pList = PermissionService.FindPermissionByComponentAndProfile(c, this);
     if (pList.Count > 0)
     {
         Permission p = pList[0];
         Simplifier.delete(p);
     }
 }
예제 #2
0
파일: Profile.cs 프로젝트: niiku/Nova-V8
 public void setComponent(Component c)
 {
     List<Permission> pList = PermissionService.FindPermissionByComponentAndProfile(c, this);
     if (pList.Count > 0)
     {
         Permission p = pList[0];
         p.component = c.id;
         p.profile = id;
         Simplifier.update(p);
     }
     else
     {
         Permission newP = new Permission();
         newP.component = c.id;
         newP.profile = id;
         Simplifier.insert(newP);
     }
 }
예제 #3
0
 public static List<Permission> FindPermissionByComponentAndProfile(Component c, Profile p)
 {
     return Simplifier.Query<Permission>("SELECT * FROM Permission WHERE component = " + c.id + " AND profile = " + p.id);
 }