Questions tagged as 'c#'

2
answers

Paint a frame in c #

I'm in class and our teacher is making us create a basic framework for what would be a snake game, I'm just going for the function that the frame should paint, but I have a certain problem, and that is that the right side, it is painted right ne...
asked by 30.03.2017 / 19:25
1
answer

Error exporting data to Excel from C #

I need to export the data from a DataGriedView to an Excel sheet. I have the following code: public void exportar(DataGridView dgv) { try { SaveFileDialog fichero = new SaveFileDialog(); fichero.Filter = "Excel (...
asked by 30.01.2017 / 17:42
1
answer

How to send data from a dataGrid that is constantly changing to an SQL table

is constantly changing because it gets its information with different excel files.  with this code. public partial class PM : Form { private BindingSource bindingsource1 = new BindingSource(); private SqlDataAdapter dataAdapter = new S...
asked by 30.03.2017 / 18:48
1
answer

Get OUTPUT of Stored Procedure

I have for example this stored procedure ALTER PROCEDURE dbo.PersonaDoc @cDocumento varchar (20) AS SELECT Ruta_Line FROM Persona WHERE (documento= @cDocumento) What difference would there be to consuming it in C # using ExecuteNonQuery, E...
asked by 03.02.2017 / 20:05
1
answer

Can not open database "Real Estate" requested by the login

Good morning people. Before formatting my pc a few days ago I was doing a project in MVC C # and everything worked perfectly, now it turns out that I get the following error:    Can not open database "Real Estate" requested by the login. The...
asked by 05.02.2017 / 15:39
1
answer

Report viewer does not show the report when it runs on the server, but does it in local mode

Good. I'm working with asp.net. It turns out that I have a report that I generate in this way: private void MostrarReporte() { //reset rptViewerActaVolante.Reset(); //dataSource int idMateria = Convert.ToInt...
asked by 17.04.2017 / 21:05
2
answers

How can I filter the records of one table that are not in another with linq C #?

For example I have a table "table1" with the fields id and name. I have another table "table2" with the fields id, idtabla1 and description. What I'm looking for is to make a query with linq that returns the records in table1 that do not appear...
asked by 17.04.2017 / 22:13
1
answer

Click event for button matrix

I am creating an array of buttons using this code. private void Prueba_Load(object sender, EventArgs e) { int num = Negocios_Categorias_Menu.NroCategorias(); DataTable ListaCat; ListaCat = Negocios_Categoria...
asked by 14.01.2017 / 05:46
2
answers

error when trying to read data from the database (Connection must be valid and open). C #

What I would like to do is to be able to read record by record as the table is advanced, just to be able to extract the record that I want whenever I want, add a Mysql reader for that, but I do not know why motive marks me the following error:...
asked by 18.01.2017 / 16:29
2
answers

How to get the value of the DropDownList Id?

I am working with ASP.NET MVC 5, I am in need of getting the value of Id of Item selected from DropDownList , when I say value I refer to Id not to Descripción . The DropDowList is loaded as follows: Co...
asked by 18.01.2017 / 22:24