Questions tagged as 'c#'

1
answer

Delete record in table with relation much to much EF 6

I am trying to delete a record from an intermediate table, that is, from a table with a many-to-many relation. I would like to know how I can delete a record from that table because when I try to save the record I do not get an error, but the re...
asked by 01.07.2017 / 00:59
2
answers

Pass data from cs to cshtml MVC

I manage a project which must generate the body of a personalized email message (HTML) for this I have an auxiliary .cshtml file which is taken as the body of the message. To fill this body in the controller I have a class that obtains the selec...
asked by 03.07.2017 / 18:09
0
answers

Do not open http: // localhost Visual Studio 2015

In visual studio 2015 I create a web and I execute it without having put some code I get this in the browser: Code: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication1.WebForm1" %&g...
asked by 21.07.2017 / 11:49
1
answer

How can I list with GridView avoiding duplicates?

Good morning, my problem is as follows. I'm making a system in which I have to add Containers, and those containers have materials in turn. The data when being registered are stored in a database. Choose to create a "material" table...
asked by 29.06.2017 / 19:23
1
answer

Delete fix

static bool elimino(int[] lista, string[] nombre, string nom, ref int tope) { nom = Console.ReadLine() bool e = false; for (int i = 0; i < tope; i++) { if (nom == nombre[i]) { for (int j = i; j <...
asked by 30.06.2017 / 00:22
1
answer

Change background and font color of GridView (Windows 10 App)

I have a GridView with several numbers and I have a click event on the items in this GridView. I would like the items that were already clicked to change the colors of the background and the text, to indicate to the user that they have already c...
asked by 29.06.2017 / 19:43
2
answers

Delegates C # help

I need help with this exercise /* Defina el delegado PrecioCambiadoEventHandler, la clase PrecioCambiadoEventArgs y la clase Articulo de tal forma que el programa siguiente genere la siguiente salida por consola Articulo 1 valia 0 y ahora v...
asked by 12.07.2017 / 00:26
2
answers

Close parent window from PopUp in WPF

How about, in my application I have a Cancel button, when you click on it, a Pop Up window appears that asks if you want to cancel or not, when you click on it, you must close the Pop Up window and the window in the one that was and send me to t...
asked by 12.07.2017 / 15:34
1
answer

How to find all the objects that implement ICollection?

Given this property: Public Overridable Property Collecions As ICollection(Of String) Which we could instantiate like this: variable.Collecions = New List(Of String) Or like this: variable.Collecions = New LinkedList(Of String) Th...
asked by 12.07.2017 / 17:48
0
answers

Handling objects that inherit from a class

Hello, I am in the development of a program where I have to manage the users in a single logic, I have two types of user, Administrator and Reader, my problem is when I want to find a type that is of the other type, it generates the error that C...
asked by 04.07.2017 / 21:57