コード例 #1
0
        public static Object Anular(string NumFAC)
        {
            FacturaControllers FC = new FacturaControllers();
            int a = FC.Anular(NumFAC);

            return(FC.GetDetalleFactura(a));
        }
コード例 #2
0
        public static Object GuardarProducto(int Id, string CodFactura, string DatosCliente,
                                             int IdProAlmacenDet, int Cantidad, string Descuento, int Precio, int DiasGarantia)
        {
            DataModel.TblFactura        _TblFactura        = new DataModel.TblFactura();
            DataModel.TblDetalleFactura _TblDetalleFactura = new DataModel.TblDetalleFactura();
            FacturaControllers          FC = new FacturaControllers();

            _TblFactura.Id              = Id;
            _TblFactura.IdMoneda        = 1;
            _TblFactura.CodFactura      = CodFactura;
            _TblFactura.DatosCliente    = DatosCliente;
            _TblDetalleFactura.Cantidad = Cantidad;
            if (string.IsNullOrEmpty(Descuento) || Descuento == "Seleccione el Descuento")
            {
                _TblDetalleFactura.Descuento = 0;
            }
            else
            {
                _TblDetalleFactura.Descuento = Convert.ToInt32(Descuento);
            }

            _TblDetalleFactura.PrecioxUnd   = Precio;
            _TblDetalleFactura.GarantiaDias = DiasGarantia;
            //Guardamos el maestro detalle
            int parametro = FC.GuardarMaestroDetalle(_TblFactura, _TblDetalleFactura, IdProAlmacenDet);


            //retornamos el detalle
            return(FC.GetDetalleFactura(parametro));
        }
コード例 #3
0
        public static Object ListarFactura(int id)
        {
            FacturaControllers FC = new FacturaControllers();

            //retornamos el detalle
            return(FC.GetDetalleFactura(id));
        }
コード例 #4
0
        public static Object EliminarDetalle(int idPam, int IdDet, int Cant)
        {
            FacturaControllers PC = new FacturaControllers();
            bool Revertir         = PC.RevertirDetalleAlmacen(IdDet); //hay que revertir el codfactura y estado del detallealmacen.
            bool bandera          = PC.EliminarDetalle(IdDet, idPam, Cant);

            return(PC.GetDetalleFactura(idPam));
        }
コード例 #5
0
        public static Object Procesar(int idPam, int Parametro, string Efectivo, string Vuelto)
        {
            FacturaControllers PA = new FacturaControllers();

            if (Parametro == 0)
            {
                return(PA.EliminarMaestroDetalle(idPam));
            }
            else
            {
                return(PA.Facturar(idPam, Efectivo, Vuelto));
            }
        }
コード例 #6
0
        public static Object Actualizar(int IdCat, int IdDetalleFactura, int Cantidad, string Descuento, int IdModelo)
        {//Tipo = Accesorios u otros
            int intDescuento = 0;

            if (string.IsNullOrEmpty(Descuento) || Descuento == "Seleccione el Descuento")
            {
                intDescuento = 0;
            }
            else
            {
                intDescuento = Convert.ToInt32(Descuento);
            }
            FacturaControllers FC = new FacturaControllers();
            int parametro         = FC.ActualizarDetalle(IdCat, IdDetalleFactura, Cantidad, intDescuento, IdModelo);

            //retornamos el detalle
            return(FC.GetDetalleFactura(parametro));
        }
コード例 #7
0
        public static Object Buscar(string Parametro)
        {
            FacturaControllers FC = new FacturaControllers();

            return(FC.ListarFacturasxParametro(Parametro));
        }
コード例 #8
0
        public static Object ProductoGarantia()
        {
            FacturaControllers FC = new FacturaControllers();

            return(FC.ProducosGarantia());
        }
コード例 #9
0
        public static Object ListarFacturas()
        {
            FacturaControllers FC = new FacturaControllers();

            return(FC.ListarFacturas());
        }
コード例 #10
0
        public static Object ValidarExistencia(int IdModelo)
        {
            FacturaControllers FC = new FacturaControllers();

            return(FC.CalcularExistencia(IdModelo));
        }
コード例 #11
0
        public static Object ListarModelos(string IdProducto)
        {
            FacturaControllers FC = new FacturaControllers();

            return(FC.GetModelosxProducto(IdProducto));
        }
コード例 #12
0
        public static Object CargarNumFacFecha()
        {
            FacturaControllers FC = new FacturaControllers();

            return(FC.retornarFechaCodProd());
        }
コード例 #13
0
        public static Object BuscarModelo(string Parametro, string IdProducto)
        {
            FacturaControllers MC = new FacturaControllers();

            return(MC.GetProductosxParametro(Parametro, IdProducto));
        }
コード例 #14
0
ファイル: Reportes.aspx.cs プロジェクト: OscarLica/SMARTZONE
        public List <ProductosMasVendidos> ReporteProdMasVendidos()
        {
            FacturaControllers ServiceReporte = new FacturaControllers();

            return(ServiceReporte.ProducosMasVendidos());
        }