public string InsertarDetalleServicio(Factura_ServicioBO dto)
        {
            string result = string.Empty;

            try
            {
                using (OracleConnection cn = new OracleConnection(strOracle))
                {
                    cn.Open();
                    using (OracleCommand command = new OracleCommand(providerStoreProcedure.spNameDetalleServ, cn))
                    {
                        command.CommandType = System.Data.CommandType.StoredProcedure;
                        command.Parameters.Add(new OracleParameter("E_COD_SERVICIO", OracleDbType.Decimal)).Value = dto.COD_SERVICIO;

                        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();
                }
                ActualizarValoresFactura();
            }
            catch (Exception e)
            {
                throw e;
            }
            return(result);
        }
        public ActionResult InsertDetalleServ(Factura_ServicioBO dto)
        {
            NegFactura obj = new NegFactura();

            obj.InsertDetalleServ(dto);

            return(RedirectToAction("Listar"));
        }
Beispiel #3
0
        public string InsertDetalleServ(Factura_ServicioBO dto)
        {
            daoFactura dao = new daoFactura();

            return(dao.InsertarDetalleServicio(dto));
        }