public static string Ingresar(Det_Evento_Servicio value) { string rpt = "ok"; SqlConnection cn = new SqlConnection(Conexion.cn); try { DynamicParameters dp1 = new DynamicParameters(); dp1.Add("@IdEvento", value.IdEvento); dp1.Add("@IdServicio", value.IdServicio); dp1.Add("@Descripcion", value.Descripcion); cn.Execute("itData.SP_I_DETEVENTO_SERVICIOS", dp1, commandType: CommandType.StoredProcedure); } catch (Exception e) { rpt = "Excepción ocurrida: " + e.Message; } finally { cn.Close(); cn.Dispose(); } return(rpt); }
public string Insertar(Det_Evento_Servicio value) { return(DAO.Det_Evento_ServicioDAO.Ingresar(value)); }
// POST: api/DetEvento_Servicios public string Post([FromBody] Det_Evento_Servicio value) { return(gestorDetEvento_Servicio.Insertar(value)); }