public static void Update(EditableDepartment department) { var editObject = GetEditableObject(department.ID); if (editObject != null) { editObject.DepartmentName = department.DepartmentName; editObject.ParentID = department.ParentID; } }
public static EditableDepartment Insert(EditableDepartment department) { lock (ObjectInsertLock) { var editObject = new EditableDepartment(); editObject.ID = GetNextDepartmentID(); editObject.DepartmentName = department.DepartmentName; editObject.ParentID = department.ParentID; return(editObject); } }