Example #1
0
        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();
        }
Example #2
0
        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();
        }
Example #3
0
        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();
        }
Example #4
0
 public static PayrollBatchs GetChildList(int sessionCode, List <long> oid_list, bool childs)
 {
     return(PayrollBatchs.GetChildList(sessionCode, oid_list, childs));
 }