Exemple #1
0
 public void DeletePermission(Permission permission)
 {
     using (SPKTDataContext spktDC = conn.GetContext())
     {
         spktDC.Permissions.Attach(permission, true);
         spktDC.Permissions.DeleteOnSubmit(permission);
         spktDC.SubmitChanges();
     }
 }
Exemple #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();
     }
 }
Exemple #3
0
 partial void DeletePermission(Permission instance);
Exemple #4
0
 partial void UpdatePermission(Permission instance);
Exemple #5
0
 partial void InsertPermission(Permission instance);
Exemple #6
0
 public void AddPermission(Permission permission)
 {
     _permissions.Add(permission);
 }
Exemple #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();
     }
 }