public void Delete(AccountFolderShare accountFolder) { using (SPKTDataContext spktDC = conn.GetContext()) { spktDC.AccountFolderShares.DeleteOnSubmit(accountFolder); spktDC.SubmitChanges(); } }
public void Shared1(Account ac, Account acby, Folder file) { AccountFolderShare asf = new AccountFolderShare(); asf.AccountByID = acby.AccountID; asf.AccountID = ac.AccountID; asf.FolderID = file.FolderID; _ac.Save(asf); }
public void Save(AccountFolderShare accountFolder) { using (SPKTDataContext spktDC = conn.GetContext()) { if (accountFolder.AccountFolderID > 0) { spktDC.AccountFolderShares.Attach(accountFolder, true); } else { spktDC.AccountFolderShares.InsertOnSubmit(accountFolder); } spktDC.SubmitChanges(); } }