/// <summary> /// Actualiza el registro en la base de datos /// </summary> /// <param name="parent">Lista padre</param> /// <remarks>La utiliza la BusinessListBaseEx correspondiente para actualizar elementos<remarks/> internal void Update(Familias parent) { // if we're not dirty then don't update the database if (!this.IsDirty) { return; } try { ValidationRules.CheckRules(); if (!IsValid) { throw new iQValidationException(moleQule.Resources.Messages.GENERIC_VALIDATION_ERROR); } SessionCode = parent.SessionCode; FamilyRecord obj = Session().Get <FamilyRecord>(Oid); obj.CopyValues(this._base.Record); Session().Update(obj); } catch (Exception ex) { iQExceptionHandler.TreatException(ex); } MarkOld(); }
public void AddFamilyRecordDoc_ReturnsRequestWithCorrectCount() { //Arrange var req = CreateRequestInstance(); FamilyRecord doc = new FamilyRecord(); //Act req.AddFamilyRecordDoc(doc); //Assert Assert.Equal(1, req.FamilyRecords.Count); }
protected override void DataPortal_Update() { if (IsDirty) { try { FamilyRecord obj = Session().Get <FamilyRecord>(Oid); obj.CopyValues(this._base.Record); Session().Update(obj); MarkOld(); } catch (Exception ex) { iQExceptionHandler.TreatException(ex); } } }