コード例 #1
0
ファイル: tsh_Stock.cs プロジェクト: windygu/ger20160318
        public static void Update(tsh_StockDataset.tsh_StockRow row)
        {
            if (row.RowState == DataRowState.Detached)
            {
                ((tsh_StockDataset.tsh_StockDataTable)row.Table).Addtsh_StockRow(row);
            }

            Update(row.Table);
        }
コード例 #2
0
        /// <summary>
        /// Envia los cambios del tsh_StockRow a la base de datos realizando una validacin previa.
        /// </summary>
        public static void UpdateWithValidation(tsh_StockDataset.tsh_StockRow row)
        {
            ApplicationAssert.Check(row != null, "El argumento row no debe ser nulo.", ApplicationAssert.LineNumber);

            if (RowIsValid(row))
            {
                Update(row);
            }
        }
コード例 #3
0
        /// <summary>
        /// Establece los valores por defecto de tsh_StockRow.
        /// </summary>
        public static tsh_StockDataset.tsh_StockRow SetRowDefaultValues(tsh_StockDataset.tsh_StockRow row)
        {
            row.IdProducto                   = Util.NewStringId();
            row.IdSeccion                    = 0;
            row.Cantidad                     = 0;
            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);
        }
コード例 #4
0
        /// <summary>
        /// Envia los cambios del tsh_StockRow a la base de datos.
        /// </summary>
        public static void Update(tsh_StockDataset.tsh_StockRow row)
        {
            ApplicationAssert.Check(row != null, "El argumento row no debe ser nulo.", ApplicationAssert.LineNumber);

            mz.erp.dataaccess.tsh_Stock.Update(row);
        }
コード例 #5
0
        /// <summary>
        /// Valida un tsh_StockRow.
        /// </summary>
        public static bool RowIsValid(tsh_StockDataset.tsh_StockRow row)
        {
            ApplicationAssert.Check(row != null, "El argumento row no debe ser nulo.", ApplicationAssert.LineNumber);


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

            if (!IdSeccionIsValid(row.IdSeccion))
            {
                return(false);
            }

            if (!CantidadIsValid(row.Cantidad))
            {
                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);
        }