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; }
public Expense NewItem(PayrollBatch parent, EmployeeInfo empleado) { Expense item = Expense.NewChild(parent, empleado); SetNextCode(item); this.AddItem(item); return(item); }
public Payroll NewItem(PayrollBatch parent, EmployeeInfo employee) { Payroll item = Payroll.NewChild(parent, employee); this.AddItem(item); SetNextCode(item); return(item); }
public Expense NewItem(PayrollBatch parent, ECategoriaGasto tipo) { Expense item = Expense.NewChild(parent, tipo); SetNextCode(item); this.AddItem(item); return(item); }
public void Remove(PayrollBatch parent, Expense item) { if (item.OidPago != 0) { return; } parent.CalculateTotal(); base.Remove(item); }
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(); }
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); }
public static string SELECT(PayrollBatch source) { return(Expense.SELECT(new QueryConditions { RemesaNomina = source.GetInfo(false) }, true)); }
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)); }