internal void Update(PayrollBatchs parent) { // if we're not dirty then don't update the database if (!this.IsDirty) { return; } ValidationRules.CheckRules(); if (!IsValid) { throw new iQValidationException(moleQule.Resources.Messages.GENERIC_VALIDATION_ERROR); } SessionCode = parent.SessionCode; PayrollBatchRecord obj = Session().Get <PayrollBatchRecord>(Oid); obj.CopyValues(Base.Record); Session().Update(obj); UpdateAssociatedExpenses(); MarkOld(); }
internal void DeleteSelf(PayrollBatchs parent) { // if we're not dirty then don't update the database if (!this.IsDirty) { return; } // if we're new then don't update the database if (this.IsNew) { return; } Gastos.Clear(); SessionCode = parent.SessionCode; Session().Delete(Session().Get <PayrollBatchRecord>(Oid)); MarkNew(); }
internal void Insert(PayrollBatchs parent) { // if we're not dirty then don't update the database if (!this.IsDirty) { return; } GetNewCode(); ValidationRules.CheckRules(); if (!IsValid) { throw new iQValidationException(moleQule.Resources.Messages.GENERIC_VALIDATION_ERROR); } UpdateAssociatedExpenses(); parent.Session().Save(Base.Record); MarkOld(); }
public static PayrollBatchs GetChildList(int sessionCode, List <long> oid_list, bool childs) { return(PayrollBatchs.GetChildList(sessionCode, oid_list, childs)); }