public ActionResult InsertDetalleProd(Factura_ProductoBO dto)
        {
            NegFactura obj = new NegFactura();

            obj.InsertDetalleProd(dto);
            return(RedirectToAction("InsertDetalleServ"));
        }
        public string InsertarDetalleProducto(Factura_ProductoBO dto)
        {
            string result = string.Empty;

            try
            {
                using (OracleConnection cn = new OracleConnection(strOracle))
                {
                    cn.Open();
                    using (OracleCommand command = new OracleCommand(providerStoreProcedure.spNameDetalleProd, cn))
                    {
                        command.CommandType = System.Data.CommandType.StoredProcedure;
                        command.Parameters.Add(new OracleParameter("E_COD_PRODUCTO", OracleDbType.Decimal)).Value         = dto.COD_PRODUCTO;
                        command.Parameters.Add(new OracleParameter("E_CAN_PRODUCTO_VENDIDO", OracleDbType.Decimal)).Value = dto.CAN_PRODUCTO_VENDIDO;

                        command.Parameters.Add(new OracleParameter("S_N_COD_SAL", OracleDbType.Decimal)).Direction        = System.Data.ParameterDirection.Output;
                        command.Parameters.Add(new OracleParameter("S_V_MSJ_SAL", OracleDbType.Varchar2, 4000)).Direction = System.Data.ParameterDirection.Output;
                        command.ExecuteNonQuery();
                        result = Convert.ToString(command.Parameters["S_V_MSJ_SAL"].Value);
                    }
                    cn.Close();
                }
            }
            catch (Exception e)
            {
                throw e;
            }
            return(result);
        }
Exemple #3
0
        public string InsertDetalleProd(Factura_ProductoBO dto)
        {
            daoFactura dao = new daoFactura();

            return(dao.InsertarDetalleProducto(dto));
        }