コード例 #1
0
        public static void Update(tfi_FormasDePagoDataset.tfi_FormasDePagoRow row)
        {
            if (row.RowState == DataRowState.Detached)
            {
                ((tfi_FormasDePagoDataset.tfi_FormasDePagoDataTable)row.Table).Addtfi_FormasDePagoRow(row);
            }

            Update(row.Table);
        }
コード例 #2
0
        public static void UpdateWithValidation(tfi_FormasDePagoDataset.tfi_FormasDePagoRow row)
        {
            ApplicationAssert.Check(row != null, "El argumento row no debe ser nulo.", ApplicationAssert.LineNumber);

            if (RowIsValid(row))
            {
                Update(row);
            }
        }
コード例 #3
0
 /// <summary>
 /// Obtiene un registro de la tabla tfi_FormasDePago que luego puede ser persistido en la base de datos.
 /// </summary>
 public static tfi_FormasDePagoDataset.tfi_FormasDePagoRow GetByPk(string IdFormaDePago)
 {
     tfi_FormasDePagoDataset.tfi_FormasDePagoRow row = mz.erp.dataaccess.tfi_FormasDePago.GetByPk(IdFormaDePago);
     foreach (DataColumn dc in row.Table.Columns)
     {
         if (row[dc] == System.DBNull.Value)
         {
             row[dc] = Util.DefaultValue(dc.DataType);
         }
     }
     return(row);
 }
コード例 #4
0
        /// <summary>
        /// Establece los valores por defecto de tfi_FormasDePagoRow.
        /// </summary>
        public static tfi_FormasDePagoDataset.tfi_FormasDePagoRow SetRowDefaultValues(tfi_FormasDePagoDataset.tfi_FormasDePagoRow row)
        {
            row.IdFormaDePago      = Util.NewStringId();
            row.IdTDCompTesoreria  = string.Empty;
            row.IdMoneda           = string.Empty;
            row.IdEntidad          = string.Empty;
            row.Cuotas             = 0;
            row.Recargo            = 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.IdEmpresa   = Security.IdEmpresa;
            row.IdSucursal  = Security.IdSucursal;

            return(row);
        }
コード例 #5
0
        /// <summary>
        /// Valida un tfi_FormasDePagoRow.
        /// </summary>
        public static bool RowIsValid(tfi_FormasDePagoDataset.tfi_FormasDePagoRow row)
        {
            ApplicationAssert.Check(row != null, "El argumento row no debe ser nulo.", ApplicationAssert.LineNumber);
            bool   isValid = true;
            string mensaje;


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

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

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

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

            if (!RecargoIsValid(row.Recargo, out mensaje))
            {
                row.SetColumnError("Recargo", 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 (!IdEmpresaIsValid(row.IdEmpresa, out mensaje))
            {
                row.SetColumnError("IdEmpresa", mensaje);
                isValid = false;
            }

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

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

            return(isValid);
        }
コード例 #6
0
        /// <summary>
        /// Envia los cambios del tfi_FormasDePagoRow a la base de datos.
        /// </summary>
        public static void Update(tfi_FormasDePagoDataset.tfi_FormasDePagoRow row)
        {
            ApplicationAssert.Check(row != null, "El argumento row no debe ser nulo.", ApplicationAssert.LineNumber);

            mz.erp.dataaccess.tfi_FormasDePago.Update(row);
        }