Exemplo n.º 1
0
        internal void Update(PayrollBatch parent)
        {
            this.RaiseListChangedEvents = false;

            // update (thus deleting) any deleted child objects
            foreach (Expense obj in DeletedList)
            {
                obj.DeleteSelf(parent);
            }

            // now that they are deleted, remove them from memory too
            DeletedList.Clear();

            // add/update any current child objects
            foreach (Expense obj in this)
            {
                if (obj.IsNew)
                {
                    obj.Insert(parent);
                }
                else
                {
                    obj.Update(parent);
                }
            }

            this.RaiseListChangedEvents = true;
        }
Exemplo n.º 2
0
        public Expense NewItem(PayrollBatch parent, EmployeeInfo empleado)
        {
            Expense item = Expense.NewChild(parent, empleado);

            SetNextCode(item);
            this.AddItem(item);
            return(item);
        }
Exemplo n.º 3
0
        public Payroll NewItem(PayrollBatch parent, EmployeeInfo employee)
        {
            Payroll item = Payroll.NewChild(parent, employee);

            this.AddItem(item);
            SetNextCode(item);
            return(item);
        }
Exemplo n.º 4
0
        public Expense NewItem(PayrollBatch parent, ECategoriaGasto tipo)
        {
            Expense item = Expense.NewChild(parent, tipo);

            SetNextCode(item);
            this.AddItem(item);
            return(item);
        }
Exemplo n.º 5
0
 public void Remove(PayrollBatch parent, Expense item)
 {
     if (item.OidPago != 0)
     {
         return;
     }
     parent.CalculateTotal();
     base.Remove(item);
 }
Exemplo n.º 6
0
        public static void DeleteItems(PayrollBatch parent)
        {
            QueryConditions conditions = new QueryConditions {
                RemesaNomina = parent.GetInfo(false)
            };
            Payrolls list = Payrolls.GetList(conditions, false);

            list.Clear();
            list.Save();
            list.CloseSession();
        }
Exemplo n.º 7
0
        internal void CopyValues(PayrollBatch source)
        {
            if (source == null)
            {
                return;
            }

            _record.CopyValues(source.Base.Record);

            _neto = source.Neto;
        }
        /// <summary>
        /// Devuelve una lista de elementos
        /// </summary>
        /// <returns>Lista de elementos</returns>
        private static PayrollBatchList GetList(string query, bool childs)
        {
            CriteriaEx criteria = Payment.GetCriteria(PayrollBatch.OpenSession());

            criteria.Childs = childs;

            criteria.Query = query;
            PayrollBatchList list = DataPortal.Fetch <PayrollBatchList>(criteria);

            CloseSession(criteria.SessionCode);
            return(list);
        }
        public static PayrollBatchList GetList(bool childs)
        {
            CriteriaEx criteria = PayrollBatch.GetCriteria(PayrollBatch.OpenSession());

            criteria.Childs = childs;

            if (nHManager.Instance.UseDirectSQL)
            {
                criteria.Query = PayrollBatchList.SELECT();
            }

            PayrollBatchList list = DataPortal.Fetch <PayrollBatchList>(criteria);

            CloseSession(criteria.SessionCode);
            return(list);
        }
Exemplo n.º 10
0
 public static string SELECT(PayrollBatch source)
 {
     return(Expense.SELECT(new QueryConditions {
         RemesaNomina = source.GetInfo(false)
     }, true));
 }
Exemplo n.º 11
0
 public Payroll NewItem(PayrollBatch parent)
 {
     return(NewItem(parent, null));
 }
 public static string SELECT(PayrollBatchInfo parent)
 {
     return(PayrollBatch.SELECT(new QueryConditions {
         RemesaNomina = parent
     }, true));
 }
 public static string SELECT(QueryConditions conditions)
 {
     return(PayrollBatch.SELECT(conditions, false));
 }