Questions tagged as 'c#'

2
answers

ASP.Net - Make Page.UICulture return culture in "pt-BR" format

Globalization was defined in Web.config : <globalization requestEncoding="utf-8" responseEncoding="utf-8" culture="pt-BR" uiCulture="pt-BR"/> However, when I read Page.UICulture , I get "Português (Brasil)" , I want to return...
asked by 24.07.2017 / 15:00
1
answer

Windows service using async method, is there any need?

On my system, I have some auxiliary routines, which are triggered at set times, out of work. These routines are run by a Windows service program. Would you need to run these asynchronous services? That is, using methods async ? As...
asked by 22.07.2017 / 15:52
2
answers

View Mapping with Entity Framework

I'm wondering how to map a View created in Oracle Database 11G with Fluent-API. Here is an excerpt from the view with alias: tran.id_transporte AS "ID Navio", tran.ds_nome_transporte AS "Navio", pemb.id_porto AS "ID Porto Embarque", pemb.ds...
asked by 08.02.2018 / 17:29
1
answer

How to do a split by numbers within the string?

Follow string: 1No começo Deus criou os céus e a terra. 2A terra era um vazio, sem nenhum ser vivente, e estava coberta por um mar profundo. A escuridão cobria o mar, e o Espírito de Deus se movia por cima da água. 3Então Deus disse: — Que haj...
asked by 11.10.2017 / 15:49
1
answer

I made a sum with lambda and it is not working as expected

I need to do a general sum for total and profit. If I made a sale with 4 items, I'm seeing in my grid four sum and that's not it, even if it repeated 4 times, but it should be just a sum. I need this to generate a graph where someone will see th...
asked by 17.10.2017 / 21:07
1
answer

HttpPostedFileBase always empty when passing to the controller

I am sending a form to my Controller by passing a HttpPostedFileBase as a parameter. The problem is that it always comes empty. HTML : <form action="@Url.Action("Import","Importacao")" method="post" class="form-horizontal"> &l...
asked by 20.07.2017 / 20:29
1
answer

Protect Excel worksheet in C #

In a C # application, it can take from 1 to 2100 hours of data gathering. The data is saved in a CSV Excel spreadsheet every minute. With the code below we can hide and show the file. #region string diret=saveFileDialog1.FileName;...
asked by 13.07.2017 / 11:09
1
answer

C # How to rename MANY files faster or at the same time?

So, I'm creating a program here to rename files, the code I've made is very slow and only renames one file at a time, and can not create a code to rename all at once because they are distinct numbers and not is in sequence which might make it eas...
asked by 23.05.2017 / 01:52
1
answer

PrintScreen in C #

I want to make a program that takes printscreen from a window defined by me in C # So far I've made this code: private void btPrintScreenEcra_Click(object sender, EventArgs e) { //Definimos qual a dimensão do bitmap...
asked by 26.05.2017 / 04:41
2
answers

Refresh ListView c #

Good morning. I have a Form1 with several methods. In one of the methods I create another form2. On Form1, I have a listView with values from the Database. In form2 I will insert new values. I wanted it in form1, I updated the ListView, but I ca...
asked by 10.05.2017 / 12:33