Questions tagged as 'c#'

1
answer

Click windows form transparent C # [closed]

I have a transparent windows form for drawing on other screens. For transparency, I've used the following code: BackColor = Color.Red; TransparencyKey = Color.Red; It worked for a while, but now it does not recognize clicks on the screen, i...
asked by 29.05.2017 / 18:38
1
answer

Alter the cell color of the DataGrid

I have a DataGrid in C # WPF, and I need to change the color of some cells according to a condition. For example I have the Inventory column and if the Inventory is less than a specific value I put the color of it in red. how can I do this, retr...
asked by 29.05.2017 / 01:25
1
answer

Update Many To Many Entity Framework

I'm having trouble updating with many to many relationship. I want the update method to update all fields of the itemEntity as well as the providers. For example, I just put the description field and vendors according to the screen image....
asked by 26.05.2017 / 16:19
1
answer

Relationship 1: N using EF using Data Anotation

I am trying to map between these two classes, where in championship I have a list of all steps related to the championship Follow the classes, [Table("ETAPA")] public class Etapa { [Key] public int Id { get; set; } [Column("ETAP...
asked by 21.04.2017 / 20:52
1
answer

Repeated Nodes xml c #

Hello, I needed some help. I have this code: XmlNodeList xnList = doc.GetElementsByTagName("Line"); foreach (XmlNode xn in xnList) { string salescode = xn["ProductCode"].InnerText; if (salescode == code) { Console.WriteLine...
asked by 26.04.2017 / 16:44
1
answer

How to include if statement when adding a new object in a list?

I use this command to save a new pessoa list: class pessoa { string nome; int idade; int sexo; } List<pessoa> pessoas.add(new pessoa() { nome = "italo rodrigo", idade = 34, sexo = 1 }); To show the user...
asked by 24.04.2017 / 00:46
1
answer

Create controls dynamically in WPF

I need to create checklists that depend on previous entries and processing. How do I create these checklists dynamically in WPF? (a code snippet, please).     
asked by 13.03.2017 / 13:47
1
answer

Many-to-Many Update with EF 6

My problem is when I try to update an entity that has a child class that in turn has other children. The structure is this: public class Diagrama { [Key] public int Numero_Diagrama { get; set; } public virtual List<Transicao>...
asked by 13.03.2017 / 03:17
1
answer

Download View instead of displaying it

Is there any way to instead of returning a view and displaying it on the screen for the user, I return it but instead of displaying it I save the .html file on the computer? The code is as follows: return View("~/Views/Item/Item.cshtml", model...
asked by 09.03.2017 / 20:31
1
answer

C # add controls to my form

How do I dynamically add controls to my form? During the program depending on what happens I would like controls (button, textbox) to be added to my program.     
asked by 13.03.2017 / 20:20