Questions tagged as 'c#'

1
answer

Many-to-many Relationship Query with LINQ to Entities

I've created a database that has two tables called Teachers and Courses . A teacher can teach in many courses and a course can have many teachers. I've created the Teacher Courses table to match both. When using the Entity Framework wizard...
asked by 09.12.2016 / 23:54
1
answer

I can not register dates

I have a Form with two dates, however, when I register them I get the following error:    String was not recognized as a valid DateTime. What can it be? This application is made in four layers: The modelos layer is where the...
asked by 09.12.2016 / 23:45
1
answer

Put a slash at the end of Url?

I'm doing a mapping in web.config for when the person accesses the project root, already loading ~ / Default.aspx <urlMappings enabled="true"> <add url="~/" mappedUrl="~/Default.aspx" /> </urlMappings> Mapped URL> lin...
asked by 06.12.2016 / 19:55
1
answer

Conversion of value from database into monetary value with error

In the database ( SQL ) I have a field named Valor which is a decimal and contains the following value: 21581 that would be $ 215,81 However when doing casting of this value it is returning $"{reader["valor"]:c}" "R$...
asked by 09.12.2016 / 17:19
1
answer

Display photo in ToolbarItem Xamarin Forms

I need to display the photo on the right side of the menu with ToolbarItem . I return the photo of the database for the "Photo" property of type string . Convert the photo string to Base64 and assignment to component...
asked by 07.12.2016 / 13:15
0
answers

Losing data from Designer.cs file when opening form - C # Windows Form Application

I have a custom editor that adds buttons to a collection. This procedure is working fine, the data is serialized in the Designer file, but when I reopen the form or do a project build, the data that was in the Designer disappears. What before...
asked by 07.12.2016 / 12:12
0
answers

Error "Object reference not set to an instance of an object."

I'm developing a Windows service that installs normal, but every time I start it, it throws the following error:    PCService Error on: 12/15/2016 10:53:13 Object reference not set to an instance of an object.   in DataLayer.Repository.Confi...
asked by 15.12.2016 / 14:07
0
answers

Interrogation in place of C # accent and SQL Server

Good afternoon guys, I have an application in C # with SQL Server database, the problem is that words that have accented letters, instead of those letters appear lozenges with a question mark in the middle as in the image below, when I enter and...
asked by 14.12.2016 / 21:10
1
answer

Transfer the image from one Image control to another of the same type

I have these three controls: <Button x:Name="btn" /> <Image x:Name="imagem01" /> <Image x:Name="imagem02" /> Let's say I upload an image in " imagen01 " using: OpenFileDialog ofdImage = new OpenFileDialog(); ofdImage.Fil...
asked by 14.12.2016 / 17:02
1
answer

"Conflict" of ID within the Datalist

Good afternoon everyone. Well, I have a datalist. Then I put a repeater inside, so far so good. But then, at the time I execute, only the first repeater appears stylized the way I want it. The rest I think should change the id, and ends up appea...
asked by 02.12.2016 / 20:16