public void Guardar(Regalo regalo) { if (regalo == null) { throw new ArgumentException("No se a creado Un Regalo"); } if (regalo.Id < 0) { throw new ArgumentException("El ID tiene que ser mayor a Cero"); } if (regalo.Nombre.Equals(" ")) { throw new ArgumentException("Ingrese el Nombre"); } if (regalo.Cantida <= 0) { throw new ArgumentException("La cantidad tiene que ser mayor que Cero"); } if (regalo.Descripcion.Equals(" ")) { throw new ArgumentException("Ingrese una descripción"); } datos = new Regalo_Datos(); datos.Guardar(regalo); }
public static List <Regalo> ObtenerTodos_PorParticipante(int id) { return(Regalo_Datos.Obtener_Regalos_PorParticipante(id)); }
public int ultimo() { return(Regalo_Datos.ObtenerUltimo()); }
public static Regalo ObtenerPorId(int id) { return(Regalo_Datos.ObtenerPorId(id)); }
public static List <Regalo> ObtenerTodos() { return(Regalo_Datos.ObtenerTodos()); }