public override bool PersistDepartment(CallButler.Data.CallButlerDataset.DepartmentsRow department) { bool added = false; CallButler.Data.CallButlerDataset.DepartmentsRow existingRow = data.Departments.FindByDepartmentID(department.DepartmentID); // If the row doesn't exist, add it. Otherwise edit it if (existingRow == null) { // Add a new row data.Departments.ImportRow(department); added = true; } else { // Update the row UpdateRowChanges(existingRow, department); } SaveChanges(); return(added); }
public abstract bool PersistDepartment(CallButler.Data.CallButlerDataset.DepartmentsRow department);