/// <summary> /// Valida un st_EstadisticaOrdenReparacionMotivoOrdenReparacionRow. /// </summary> public static bool RowIsValid(st_EstadisticaOrdenReparacionMotivoOrdenReparacionDataset.st_EstadisticaOrdenReparacionMotivoOrdenReparacionRow row) { ApplicationAssert.Check(row != null, "El argumento row no debe ser nulo.", ApplicationAssert.LineNumber); bool isValid = true; string mensaje; if (!IdOrdenReparacionIsValid(row.IdOrdenReparacion, out mensaje)) { row.SetColumnError("IdOrdenReparacion", mensaje); isValid = false; } if (!IdMotivoIsValid(row.IdMotivo, out mensaje)) { row.SetColumnError("IdMotivo", mensaje); isValid = false; } if (!EsVerdaderoIsValid(row.EsVerdadero, out mensaje)) { row.SetColumnError("EsVerdadero", 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 (!RowIdIsValid(row.RowId, out mensaje)) { row.SetColumnError("RowId", mensaje); isValid = false; } ; return(isValid); }
public static void UpdateWithValidation(st_EstadisticaOrdenReparacionMotivoOrdenReparacionDataset.st_EstadisticaOrdenReparacionMotivoOrdenReparacionRow row) { ApplicationAssert.Check(row != null, "El argumento row no debe ser nulo.", ApplicationAssert.LineNumber); if (RowIsValid(row)) { Update(row); } }
public static void Update(st_EstadisticaOrdenReparacionMotivoOrdenReparacionDataset.st_EstadisticaOrdenReparacionMotivoOrdenReparacionRow row) { if (row.RowState == DataRowState.Detached) { ((st_EstadisticaOrdenReparacionMotivoOrdenReparacionDataset.st_EstadisticaOrdenReparacionMotivoOrdenReparacionDataTable)row.Table).Addst_EstadisticaOrdenReparacionMotivoOrdenReparacionRow(row); } Update(row.Table); }
/// <summary> /// Establece los valores por defecto de st_EstadisticaOrdenReparacionMotivoOrdenReparacionRow. /// </summary> public static st_EstadisticaOrdenReparacionMotivoOrdenReparacionDataset.st_EstadisticaOrdenReparacionMotivoOrdenReparacionRow SetRowDefaultValues(st_EstadisticaOrdenReparacionMotivoOrdenReparacionDataset.st_EstadisticaOrdenReparacionMotivoOrdenReparacionRow row) { row.IdOrdenReparacion = 0; row.IdMotivo = 0; row.EsVerdadero = false; row.FechaCreacion = DateTime.Now; row.IdConexionCreacion = Security.IdConexion; row.UltimaModificacion = null; row.IdConexionUltimaModificacion = Security.IdConexion; row.RowId = Guid.Empty; return(row); }
/// <summary> /// Obtiene un registro de la tabla st_EstadisticaOrdenReparacionMotivoOrdenReparacion que luego puede ser persistido en la base de datos. /// </summary> public static st_EstadisticaOrdenReparacionMotivoOrdenReparacionDataset.st_EstadisticaOrdenReparacionMotivoOrdenReparacionRow GetByPk(long IdOrdenReparacion, long IdMotivo) { st_EstadisticaOrdenReparacionMotivoOrdenReparacionDataset.st_EstadisticaOrdenReparacionMotivoOrdenReparacionRow row = mz.erp.dataaccess.st_EstadisticaOrdenReparacionMotivoOrdenReparacion.GetByPk(IdOrdenReparacion, IdMotivo); if (row != null) { foreach (DataColumn dc in row.Table.Columns) { if (!dc.Caption.ToUpper().Equals("ROWID")) { if (row[dc] == System.DBNull.Value) { row[dc] = Util.DefaultValue(dc.DataType); } } } } return(row); }
/// <summary> /// Envia los cambios del st_EstadisticaOrdenReparacionMotivoOrdenReparacionRow a la base de datos. /// </summary> public static void Update(st_EstadisticaOrdenReparacionMotivoOrdenReparacionDataset.st_EstadisticaOrdenReparacionMotivoOrdenReparacionRow row) { ApplicationAssert.Check(row != null, "El argumento row no debe ser nulo.", ApplicationAssert.LineNumber); mz.erp.dataaccess.st_EstadisticaOrdenReparacionMotivoOrdenReparacion.Update(row); }