Example #1
0
        public static void ModificarModVenta(ModVentaType m)
        {
            int r = PModVentaType.ModificarModVentaType(m);

            if (r == -1)
            {
                throw new ExcepcionesPersonalizadas.Logica("No existe una modalidad de venta con ese identificador");
            }
        }
Example #2
0
        public static void BajaModVenta(int id)
        {
            int r = PModVentaType.BajaModVentaType(id);

            if (r == -1)
            {
                throw new ExcepcionesPersonalizadas.Logica("No hay una modalidad de venta con ese id");
            }
        }
Example #3
0
        public static List <ModVentaType> ListarModVenta()
        {
            List <ModVentaType> r = PModVentaType.ListarModVentaType();

            if (r == null)
            {
                throw new ExcepcionesPersonalizadas.Logica("No se pudo listar las modalidades de venta");
            }
            return(r);
        }
Example #4
0
        //Buscar
        public static ModVentaType BuscarModVenta(int id)
        {
            ModVentaType retorno = PModVentaType.BuscarModVentaType(id);

            if (retorno == null)
            {
                throw new ExcepcionesPersonalizadas.Logica("No se encontrĂ³ esa modalidad de venta");
            }
            return(retorno);
        }
Example #5
0
        //Alta
        public static void AltaModVenta(ModVentaType m)
        {
            ValidarModVentaType(m);
            int e = PModVentaType.AltaModVentaType(m);

            if (e == -1)
            {
                throw new ExcepcionesPersonalizadas.Logica("Ya hay una modalidad de venta con ese identificador");
            }
            if (e == -3)
            {
                throw new ExcepcionesPersonalizadas.Logica("Ya hay una modalidad de venta con ese nombre");
            }
        }