public void AddClassification(DFClass rec) { if (rec.Id == Guid.Empty) { WriteLog(VMGlobal.LOG_ACTION.SAVE, string.Format("Classification: {0}", rec.Name), AccountId); context.DFClasses.Add(rec); return; } WriteLog(VMGlobal.LOG_ACTION.UPDATE, string.Format("{0}", rec.Name), this.AccountId); context.Entry(rec).State = EntityState.Modified; }
public void InsertUpdate(Department rec) { if (rec.Id == Guid.Empty) { context.Departments.Add(rec); } else { context.Entry(rec).State = EntityState.Modified; } }
public void InsertUpdate(AlertEmail rec) { if (rec.Id == Guid.Empty) { context.AlertEmails.Add(rec); } else { context.Entry(rec).State = EntityState.Modified; } }
public void InsertUpdate(DomainConfig rec) { if (rec.Id == Guid.Empty) { context.DomainCfg.Add(rec); } else { context.Entry(rec).State = EntityState.Modified; } }
public void InsertUpdate(AccountGroup rec) { if (rec.Id == Guid.Empty) { context.AccountGroups.Add(rec); } else { context.Entry(rec).State = EntityState.Modified; } }
public void SaveUpdate(CameraFolder rec) { if (rec.Id == Guid.Empty) { context.CameraFolders.Add(rec); } else { context.Entry(rec).State = EntityState.Modified; } }
public void SaveUpdate(License rec) { if (rec.Id == Guid.Empty) { context.Licenses.Add(rec); } else { context.Entry(rec).State = EntityState.Modified; } }
public void InsertUpdate(Manufacturer rec) { if (rec.Id == Guid.Empty) { context.Manufacturers.Add(rec); } else { context.Entry(rec).State = EntityState.Modified; } }
public void InsertUpdate(FileType rec) { if (rec.Id == Guid.Empty) { context.FileTypes.Add(rec); } else { context.Entry(rec).State = EntityState.Modified; } }
public void InsertUpdateClassification(Classification rec) { if (rec.Id == Guid.Empty) { context.Classifications.Add(rec); } else { context.Entry(rec).State = EntityState.Modified; } }
public void InsertUpdate(RightsProfile rec) { if (rec.Id == Guid.Empty) { context.RightsProfiles.Add(rec); } else { context.Entry(rec).State = EntityState.Modified; } }
public void SaveUpdate(Snapshot rec) { if (rec.Id == Guid.Empty) { context.Snapshots.Add(rec); } else { context.Entry(rec).State = EntityState.Modified; } }
public void InsertUpdate(UserRank rec) { if (rec.Id == Guid.Empty) { context.UserRanks.Add(rec); } else { context.Entry(rec).State = EntityState.Modified; } }
public void InsertUpdate(Account rec) { try { if (rec.Id == Guid.Empty) { WriteLog(VMGlobal.LOG_ACTION.SAVE, string.Format("Add New Account: {0} {1}", rec.BadgeNumber, rec.ToString())); context.Accounts.Add(rec); } else { WriteLog(VMGlobal.LOG_ACTION.UPDATE, string.Format("{0} {1}", rec.BadgeNumber, rec.ToString())); context.Entry(rec).State = EntityState.Modified; } } catch { } }