Ejemplo n.º 1
0
        public static void Update(tsa_PedidosDetDataset.tsa_PedidosDetRow row)
        {
            if (row.RowState == DataRowState.Detached)
            {
                ((tsa_PedidosDetDataset.tsa_PedidosDetDataTable)row.Table).Addtsa_PedidosDetRow(row);
            }

            Update(row.Table);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Envia los cambios del tsa_PedidosDetRow a la base de datos realizando una validacin previa.
        /// </summary>
        public static void UpdateWithValidation(tsa_PedidosDetDataset.tsa_PedidosDetRow row)
        {
            ApplicationAssert.Check(row != null, "El argumento row no debe ser nulo.", ApplicationAssert.LineNumber);

            if (RowIsValid(row))
            {
                Update(row);
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Establece los valores por defecto de tsa_PedidosDetRow.
        /// </summary>
        public static tsa_PedidosDetDataset.tsa_PedidosDetRow SetRowDefaultValues(tsa_PedidosDetDataset.tsa_PedidosDetRow row)
        {
            row.IdPedido                     = 0;
            row.IdProducto                   = Util.NewStringId();
            row.Renglon                      = 0;
            row.Cantidad                     = 0;
            row.Resuelto                     = 0;
            row.AceptaVariante               = false;
            row.FechaCreacion                = 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);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Envia los cambios del tsa_PedidosDetRow a la base de datos.
        /// </summary>
        public static void Update(tsa_PedidosDetDataset.tsa_PedidosDetRow row)
        {
            ApplicationAssert.Check(row != null, "El argumento row no debe ser nulo.", ApplicationAssert.LineNumber);

            mz.erp.dataaccess.tsa_PedidosDet.Update(row);
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Valida un tsa_PedidosDetRow.
        /// </summary>
        public static bool RowIsValid(tsa_PedidosDetDataset.tsa_PedidosDetRow row)
        {
            ApplicationAssert.Check(row != null, "El argumento row no debe ser nulo.", ApplicationAssert.LineNumber);


            if (!IdPedidoIsValid(row.IdPedido))
            {
                return(false);
            }

            if (!IdProductoIsValid(row.IdProducto))
            {
                return(false);
            }

            if (!RenglonIsValid(row.Renglon))
            {
                return(false);
            }

            if (!CantidadIsValid(row.Cantidad))
            {
                return(false);
            }

            if (!ResueltoIsValid(row.Resuelto))
            {
                return(false);
            }

            if (!AceptaVarianteIsValid(row.AceptaVariante))
            {
                return(false);
            }

            if (!FechaCreacionIsValid(row.FechaCreacion))
            {
                return(false);
            }

            if (!IdConexionCreacionIsValid(row.IdConexionCreacion))
            {
                return(false);
            }

            if (!UltimaModificacionIsValid(row.UltimaModificacion))
            {
                return(false);
            }

            if (!IdConexionUltimaModificacionIsValid(row.IdConexionUltimaModificacion))
            {
                return(false);
            }

            if (!IdReservadoIsValid(row.IdReservado))
            {
                return(false);
            }

            if (!RowIdIsValid(row.RowId))
            {
                return(false);
            }

            if (!IdSucursalIsValid(row.IdSucursal))
            {
                return(false);
            }

            if (!IdEmpresaIsValid(row.IdEmpresa))
            {
                return(false);
            }
            ;

            return(true);
        }