protected override void DataPortal_Update() { if (!IsDirty) { return; } WorkReportRecord obj = Session().Get <WorkReportRecord>(Oid); obj.CopyValues(Base.Record); Session().Update(obj); MarkOld(); }
public virtual void CopyValues(WorkReportRecord source) { if (source == null) { return; } Oid = source.Oid; _oid_owner = source.OidOwner; _oid_expedient = source.OidExpedient; _serial = source.Serial; _code = source.Code; _status = source.Status; _date = source.Date; _from = source.From; _till = source.Till; _hours = source.Hours; _total = source.Total; _category = source.Category; _comments = source.Comments; }
internal void Update(WorkReports parent) { // if we're not dirty then don't update the database if (!this.IsDirty) { return; } ValidationRules.CheckRules(); if (!IsValid) { throw new iQValidationException(Library.Resources.Messages.GENERIC_VALIDATION_ERROR); } SessionCode = parent.SessionCode; WorkReportRecord obj = Session().Get <WorkReportRecord>(Oid); obj.CopyValues(Base.Record); Session().Update(obj); MarkOld(); }