Questions tagged as 'c#'

3
answers

Return ListT by Json to JS from c # with class that contains another class

I have a class Localidad that contains an attribute of the class Provincia , wanting to make the combos nested by Ajax with Jquery gives me a:    error 500 - Internal server error -. If I take out the Provincia attribu...
asked by 11.09.2017 / 23:30
1
answer

Error passing decimal data

I have problems passing decimal records to sql from c #. Passes well the fields type int , date , bit , but decimals passes them in 0 (0.00). This is part of the transfer code: while (ReaderMov.Read()) { command.Par...
asked by 05.09.2017 / 19:02
1
answer

When using CONCAT, I get an error saying "The input string does not have the correct format"

It turns out that data charges to DataTable in the following way: private void cargarempresas() { dt_hogar = new DataTable(); String sql = "SELECT CAST(CONCAT(nombre,'-',apellido)AS CHAR) AS nombre,fechacreacion FROM hogar";...
asked by 24.07.2017 / 07:34
1
answer

consume a web service with Rest API with xml input parameters

I have to consume a service REST with C# , but the truth is that I'm a bit lost on this issue. on the one hand, the service to be consumed, requires several XML parameters that have the following format <?xml version="1.0" e...
asked by 22.07.2017 / 03:06
2
answers

Return problem in Enumerable in WebApi

I'm doing a webApi, which has its entities and its context class that it creates through the database, with its respective command. Everything is working perfectly for me, the drama is when I want to return a set of objects in JSON and it onl...
asked by 14.07.2017 / 02:49
1
answer

Random of 10 Seconds

I have a disturbing one and that is how I can make a random event last 10 seconds, what happens is that I am developing a tombola in c # and when creating random numbers in my texboxs, only a single one generates them time. This is the Code that...
asked by 16.07.2017 / 22:30
1
answer

Extract value in datalist

As I can extract the value of the query in my DataList , I have the following fragment in my page aspx <div class="form-group"> <label for="" class="col-md-2">País</label> <div class="col-md-4"><input class...
asked by 28.06.2017 / 17:34
2
answers

Consume web service from c #

I need to consume a web service from .NET; I have to connect to the following webservice: Web service EndPoint: / ext_ws / integration_school / update_debt_by_code Method: POST Params: {api_key}: clave de autorización {codi...
asked by 02.03.2018 / 23:22
2
answers

How to add Rows to a DataGridView that is already linked to data in C #

I have previously created a DataGridView.DataSource="a query" and then I want to add another row to that from another query ' if (result== DialogResult.OK) { DataTable tb1 = ConexionBD.Data("SELECT Id, Nombre, Cantidad as Disponibilidad...
asked by 06.03.2018 / 04:22
1
answer

Help with Microsoft.SqlServer.Management.Smo StoredProcedure C #

I am programming an application in C # to extract the stored procedures from a database and generate the corresponding scripts. The problem I get is that when I get the StoreProcedure objects, it brings me the SystemStoreProcedures as well, I ha...
asked by 22.06.2017 / 23:40