Exemplo n.º 1
0
 public void DeletePermission(Permission permission)
 {
     using (SPKTDataContext spktDC = conn.GetContext())
     {
         spktDC.Permissions.Attach(permission, true);
         spktDC.Permissions.DeleteOnSubmit(permission);
         spktDC.SubmitChanges();
     }
 }
Exemplo n.º 2
0
 public void AddPermission(Account account, Permission permission)
 {
     using (SPKTDataContext spktDC = conn.GetContext())
     {
         AccountPermission ap = new AccountPermission();
         ap.AccountID = account.AccountID;
         ap.PermissionID = permission.PermissionID;
         spktDC.AccountPermissions.InsertOnSubmit(ap);
         spktDC.SubmitChanges();
     }
 }
Exemplo n.º 3
0
 partial void DeletePermission(Permission instance);
Exemplo n.º 4
0
 partial void UpdatePermission(Permission instance);
Exemplo n.º 5
0
 partial void InsertPermission(Permission instance);
Exemplo n.º 6
0
 public void AddPermission(Permission permission)
 {
     _permissions.Add(permission);
 }
Exemplo n.º 7
0
 public void SavePermission(Permission permission)
 {
     using (SPKTDataContext  spktDC = conn.GetContext())
     {
         if (permission.PermissionID > 0)
         {
             spktDC.Permissions.Attach(permission, true);
         }
         else
         {
             spktDC.Permissions.InsertOnSubmit(permission);
         }
         spktDC.SubmitChanges();
     }
 }