Esempio n. 1
0
        public static void Update(tsa_CuentasCondicionesDeVentaDataset.tsa_CuentasCondicionesDeVentaRow row, SqlTransaction trx, SentenciasReplicacion replicacion)
        {
            if (row.RowState == DataRowState.Detached)
            {
                ((tsa_CuentasCondicionesDeVentaDataset.tsa_CuentasCondicionesDeVentaDataTable)row.Table).Addtsa_CuentasCondicionesDeVentaRow(row);
            }

            Update(row.Table);
        }
Esempio n. 2
0
        public static void Update(tsa_CuentasCondicionesDeVentaDataset.tsa_CuentasCondicionesDeVentaRow row)
        {
            if (row.RowState == DataRowState.Detached)
            {
                ((tsa_CuentasCondicionesDeVentaDataset.tsa_CuentasCondicionesDeVentaDataTable)row.Table).Addtsa_CuentasCondicionesDeVentaRow(row);
            }

            Update(row.Table);
        }
        public static void UpdateWithValidation(tsa_CuentasCondicionesDeVentaDataset.tsa_CuentasCondicionesDeVentaRow row)
        {
            ApplicationAssert.Check(row != null, "El argumento row no debe ser nulo.", ApplicationAssert.LineNumber);

            if (RowIsValid(row))
            {
                Update(row);
            }
        }
        /// <summary>
        /// Obtiene un registro de la tabla tsa_CuentasCondicionesDeVenta que luego puede ser persistido en la base de datos.
        /// </summary>
        public static tsa_CuentasCondicionesDeVentaDataset.tsa_CuentasCondicionesDeVentaRow GetByPk(string IdCuenta, string IdCondicionDeVenta)
        {
            tsa_CuentasCondicionesDeVentaDataset.tsa_CuentasCondicionesDeVentaRow row = mz.erp.dataaccess.tsa_CuentasCondicionesDeVenta.GetByPk(IdCuenta, IdCondicionDeVenta);
            if (row == null)
            {
                return(null);
            }

            foreach (DataColumn dc in row.Table.Columns)
            {
                if (row[dc] == System.DBNull.Value)
                {
                    row[dc] = Util.DefaultValue(dc.DataType);
                }
            }
            return(row);
        }
        /// <summary>
        /// Valida un tsa_CuentasCondicionesDeVentaRow.
        /// </summary>
        public static bool RowIsValid(tsa_CuentasCondicionesDeVentaDataset.tsa_CuentasCondicionesDeVentaRow row)
        {
            ApplicationAssert.Check(row != null, "El argumento row no debe ser nulo.", ApplicationAssert.LineNumber);
            bool   isValid = true;
            string mensaje;


            if (!IdCuentaIsValid(row.IdCuenta, out mensaje))
            {
                row.SetColumnError("IdCuenta", mensaje);
                isValid = false;
            }

            if (!IdCondicionDeVentaIsValid(row.IdCondicionDeVenta, out mensaje))
            {
                row.SetColumnError("IdCondicionDeVenta", mensaje);
                isValid = false;
            }

            if (!ValorIsValid(row.Valor, out mensaje))
            {
                row.SetColumnError("Valor", mensaje);
                isValid = false;
            }

            if (!FechaCreacionIsValid(row.FechaCreacion, out mensaje))
            {
                row.SetColumnError("FechaCreacion", mensaje);
                isValid = false;
            }

            if (!IdConexionCreacionIsValid(row.IdConexionCreacion, out mensaje))
            {
                row.SetColumnError("IdConexionCreacion", mensaje);
                isValid = false;
            }

            if (!UltimaModificacionIsValid(row.UltimaModificacion, out mensaje))
            {
                row.SetColumnError("UltimaModificacion", mensaje);
                isValid = false;
            }

            if (!IdConexionUltimaModificacionIsValid(row.IdConexionUltimaModificacion, out mensaje))
            {
                row.SetColumnError("IdConexionUltimaModificacion", mensaje);
                isValid = false;
            }

            if (!IdReservadoIsValid(row.IdReservado, out mensaje))
            {
                row.SetColumnError("IdReservado", mensaje);
                isValid = false;
            }

            if (!RowIdIsValid(row.RowId, out mensaje))
            {
                row.SetColumnError("RowId", mensaje);
                isValid = false;
            }

            if (!IdSucursalIsValid(row.IdSucursal, out mensaje))
            {
                row.SetColumnError("IdSucursal", mensaje);
                isValid = false;
            }

            if (!IdEmpresaIsValid(row.IdEmpresa, out mensaje))
            {
                row.SetColumnError("IdEmpresa", mensaje);
                isValid = false;
            }
            ;

            return(isValid);
        }
        public static void Update(tsa_CuentasCondicionesDeVentaDataset.tsa_CuentasCondicionesDeVentaRow row)
        {
            ApplicationAssert.Check(row != null, "El argumento row no debe ser nulo.", ApplicationAssert.LineNumber);

            mz.erp.dataaccess.tsa_CuentasCondicionesDeVenta.Update(row);
        }
        /// <summary>
        /// Obtiene un registro de la tabla tsa_CuentasCondicionesDeVenta que luego puede ser persistido en la base de datos. Metodo Sobrecargado
        /// </summary>

/*		[ atMethodGetByPkRow ]
 *              public static tsa_CuentasCondicionesDeVentaDataset.tsa_CuentasCondicionesDeVentaRow GetByPk( object IdCuenta, IdCondicionDeVenta )
 *              {
 *                      return GetByPk( ( string )IdCuenta, ( string )IdCondicionDeVenta );
 *              }*/

        /// <summary>
        /// Establece los valores por defecto de tsa_CuentasCondicionesDeVentaRow.
        /// </summary>
        public static tsa_CuentasCondicionesDeVentaDataset.tsa_CuentasCondicionesDeVentaRow SetRowDefaultValues(tsa_CuentasCondicionesDeVentaDataset.tsa_CuentasCondicionesDeVentaRow row)
        {
            row.IdCuenta           = Util.NewStringId();
            row.Valor              = 0;
            row.FechaCreacion      = mz.erp.businessrules.Sistema.DateTime.Now;
            row.IdConexionCreacion = Security.IdConexion;
            //row.UltimaModificacion = null;
            row.IdConexionUltimaModificacion = Security.IdConexion;
            row.IdReservado = 0;
            row.RowId       = Guid.Empty;
            row.IdSucursal  = 0;
            row.IdEmpresa   = 0;

            return(row);
        }