func (VS *Server) editElementInDatabaseWithRegisterFromCentral(c *gin.Context, newObject interface{}, oldObject interface{}, IDboth bson.ObjectId, class string, method string, operation string) {
	err := VS.DataBase.Upsert(IDboth, newObject)
	VS.checkOperation(c, class, method, operation, err)
	// Here we save the changes
	audit := VS.getAuditFromCentral(c, newObject, IDboth, Modified)
	modified := VS.dynamicAuditChange(c, newObject, oldObject, audit.ID)
	if modified {
		VS.registerAuditAndEvent(c, audit, newObject, IDboth)
	}
}
// This method edit the element into the DB and takes care about all the changes and the audits
// ID service is the ID where occur the transaction
This method edit the element into the DB and takes care about all the changes and the audits
ID service is the ID where occur the transaction
// This method edit the element into the DB and takes care about all the changes and the audits // ID service is the ID where occur the transaction
func (VS *Server) editElementInDatabaseWithRegisterFromCentral(c *gin.Context, newObject interface{}, oldObject interface{}, IDboth bson.ObjectId, class string, method string, operation string) {
	err := VS.DataBase.Upsert(IDboth, newObject)
	VS.checkOperation(c, class, method, operation, err)
	audit := VS.getAuditFromCentral(c, newObject, IDboth, Modified)
	modified := VS.dynamicAuditChange(c, newObject, oldObject, audit.ID)
	if modified {
		VS.registerAuditAndEvent(c, audit, newObject, IDboth)
	}
}
func ( VS * Server ) editElementInDatabaseWithRegisterFromCentral ( c * gin . Context , newObject interface { } , oldObject interface { } , IDboth bson . ObjectId , class string , method string , operation string ) { err := VS . DataBase . Upsert ( IDboth , newObject ) VS . checkOperation ( c , class , method , operation , err ) audit := VS . getAuditFromCentral ( c , newObject , IDboth , Modified ) modified := VS . dynamicAuditChange ( c , newObject , oldObject , audit . ID ) if modified { VS . registerAuditAndEvent ( c , audit , newObject , IDboth ) } }
This method edit the element into the DB and takes care about all the changes and the audits
ID service is the ID where occur the transaction
This method edit the element into the DB and takes care about all the changes and the audits ID service is the ID where occur the transaction
// Here we save the changes