Questions tagged as 'c#'

1
answer

How to do Reverse engineering via EntityFramework using a Firebird data source in VisualStudio 2015?

I have a Firebird database already populated and I would like to use this same base for a web project in visual studio 2015. I would like to use a class library and generate the template using EF Code-First - Starting from an existing databas...
asked by 26.01.2016 / 20:35
1
answer

help in adding text from richtextbox 1 with richtextbox2 C #

Hello, I would like to know how I do it, so that when I type in richtextbox1 the text will appear in richtextbox2 , just like if it was a line counter, every time you enter enter, only with a number itself, type a1, a9, b, c4, c5 ......
asked by 08.02.2016 / 21:49
2
answers

SESSION: System confuses users who access it simultaneously

When 2 users access the system at the same time, it somehow confuses users, not just the name, but their permissions too ... I'm assigning the session after logging in to ActionFilter public class UsuarioAttribute : ActionFilterAttribute p...
asked by 04.02.2016 / 13:32
2
answers

How to use MeasureString method?

I have the following code: var font = new Font("Arial", 50); var texto = "Meu texto"; var res = Graphics.MeasureString(texto, font); // Está linha não funciona. When compiling the following error is generated:    An object reference is...
asked by 10.11.2015 / 18:14
1
answer

Too much trouble putting up an update with linq

I have done some updates with linq without problem. but the way my code is, I'm having trouble. What's the rule: 1) I have a screen where I make some report requests. Soon I can have n requests in progress. 2) These requests, I fill in som...
asked by 10.11.2015 / 11:47
1
answer

How to write data in a one-to-many table?

I have a question that still persists after doing some searches. It is as follows, assuming I have a form, where I register multiple emails for a single user, how do I record these multiple emails in their table? Here are the examples: (if y...
asked by 10.11.2015 / 13:35
1
answer

Open external application as a child form in C #

I need to call an external application through my current application, in which this external application is being opened outside of my application and I would like it to be opened as a child form of my parent form. This is my current code that...
asked by 29.10.2015 / 21:34
1
answer

Transparent image and background color

I have the following code: FileStream fs = new FileStream(@"\path\imagem1.png", FileMode.Open, FileAccess.Read); Image image = Image.FromStream(fs); fs.Close(); Bitmap b = new Bitmap(image); Graphics graphics = Graphics.FromImage(b); graphic...
asked by 10.11.2015 / 19:05
1
answer

Entity Framework + Fluent API + Web API?

I'm having trouble mapping the category within a product, when I'm ready the products the category ( virtual class ) comes empty, even with CategoryId filled. Product public class Product { public Product() { th...
asked by 29.10.2015 / 21:33
1
answer

Report Viewer with object dataset

Hello, I am trying to create a report in ReportViewer but I wanted to use an object as a data source, I saw some articles on the internet but I can not get ReportViewer to find my object to select, it finds other classes of the project but the my...
asked by 27.10.2015 / 13:18