Questions tagged as 'c#'

1
answer

1: N Fluent API Mapping Cascade

How to model a 1: N relationship, where 1 user can have multiple requests, and in this request we have reference to another entity ? Ex: public class Usuario { public int UsuarioId { get; set; } public string Name {get; set; }...
asked by 21.06.2016 / 23:21
1
answer

As time passes and progresses, the label text changes

Before you start it's just a game not a virus. My goal is when when progressbar reaches 1% put the text as downloading virus and when it reaches 50% put the text as installing virus but instead it changes immediately to installing...
asked by 25.07.2016 / 17:45
2
answers

Capture file name

I have a form that I look for the path of a file in .mdb (Access database), however I wanted to know how I can limit and exactly get the string of the file between the last bar of OpenFileDialog and the point of .mdb . S...
asked by 01.08.2016 / 15:26
1
answer

Generic class for CRUD

I have some common CRUD features in the database such as cadastrar , buscar um registro , buscar todos os registros , and excluir . For this, I am currently implementing a class manager each database table to perform the...
asked by 26.07.2016 / 14:58
1
answer

Precision scale using Entity Framework and SQL Server

I have noticed some strange time saving values double in the SQL Server database with the Entity Framework. I noticed that when reporting a value ex: 12.23 after saving the information is breaking the decimals in more houses ex: 12.225...
asked by 08.08.2016 / 22:22
2
answers

'system.outofmemoryexception' while opening 300 mega .dbf file

I try to open a 300mg .dbf file in my code, but this error appears '$ exception.Message' threw an exception of type 'System.OutOfMemoryException' , a smaller file of 300kb is opened normally, I know the file is too large, but I also know th...
asked by 23.10.2015 / 22:15
2
answers

What is the best way to read a SQL error return?

What is the best way to read a sql server error return in a C # web form application? I have the following .. No sql server; END TRY BEGIN CATCH Raiserror('Erro ao gerar os dados', 18, 1); return; END CATCH; No c # SqlCom...
asked by 29.10.2015 / 19:12
1
answer

Identify if a particular program is the focus by C #

I'm developing an application, which will insert data into another program (using sendkeys, etc.). For this I need to know if the program is what is in focus. For example : The application will open internet explorer, and navigate a site...
asked by 25.08.2016 / 16:42
2
answers

Visual Studio Installer Projects with PostgreSQL

I'm starting a Windows Form C # project, a business application that the user downloads, installs, and uses without any complications. Is it possible to configure Visual Studio Installer Projects to install with PostgreSQL without the user reali...
asked by 10.08.2017 / 05:38
2
answers

Email Differentiating two environments in the system

Personal I need a help, in my system I have two Environments, being one of production and another of homologation. So being on my system, I have a part that sends email, to the user. Could someone help me in order to send the email, the system t...
asked by 04.08.2017 / 16:56