/// <summary> /// Envia los cambios del tsa_CuentasDataset a la base de datos. /// </summary> public static void Update(tsa_CuentasDataset dataSet) { ApplicationAssert.Check(dataSet != null, "El argumento dataSet no debe ser nulo.", ApplicationAssert.LineNumber); ApplicationAssert.Check(dataSet.tsa_Cuentas.Rows.Count > 0, "La tabla dataSet.tsa_CuentasDataTable debe poseer alguna fila.", ApplicationAssert.LineNumber); mz.erp.dataaccess.tsa_Cuentas.Update(dataSet); }
public void FlushSaldoCuentaCorriente(Process process, string IdTransaction, SentenciasReplicacion Replication) { if (datasetsPorProceso.ContainsKey(process)) { tsa_CuentasDataset dataCuentas = (tsa_CuentasDataset)datasetsPorProceso[process]; mz.erp.dataaccess.tsa_Cuentas.Update(dataCuentas.tsa_Cuentas, IdTransaction, Replication); } }
public static string GetPkByUk(string Uk) { if (Uk != null && !Uk.Equals(string.Empty)) { tsa_CuentasDataset data = GetListByUK(Uk); if (data.tsa_Cuentas.Rows.Count == 1) { return(((tsa_CuentasDataset.tsa_CuentasRow)data.tsa_Cuentas.Rows[0]).IdCuenta); } } return(string.Empty); }
public void CommitSaldoCuentaCorriente(Process process, string IdCuenta, decimal Importe, string IdTipoDeComprobante) { if (process != null) { tsy_TiposDeComprobantesDataset.tsy_TiposDeComprobantesRow rowTC = tsy_TiposDeComprobantes.GetByPk(IdTipoDeComprobante); if (this.TipoDeComprobanteAfectaCtaCte(rowTC.TipoCtaCte)) { if (!datasetsPorProceso.ContainsKey(process)) { datasetsPorProceso.Add(process, new tsa_CuentasDataset()); } tsa_CuentasDataset dataCuentas = (tsa_CuentasDataset)datasetsPorProceso[process]; tsa_CuentasDataset.tsa_CuentasRow rowCuenta = dataCuentas.tsa_Cuentas.FindByIdCuenta(IdCuenta); switch (rowTC.TipoCtaCte) { case 1: { if (rowCuenta == null) { rowCuenta = tsa_Cuentas.GetByPk(IdCuenta); rowCuenta.SaldoCtaCte = rowCuenta.SaldoCtaCte + Importe * -1; dataCuentas.tsa_Cuentas.ImportRow(rowCuenta); } else { rowCuenta.SaldoCtaCte = rowCuenta.SaldoCtaCte + Importe * -1; } break; } case 2: { if (rowCuenta == null) { rowCuenta = tsa_Cuentas.GetByPk(IdCuenta); rowCuenta.SaldoCtaCteDV = rowCuenta.SaldoCtaCteDV + Importe * -1; dataCuentas.tsa_Cuentas.ImportRow(rowCuenta); } else { rowCuenta.SaldoCtaCteDV = rowCuenta.SaldoCtaCteDV + Importe * -1; } break; } } } } }