Questions tagged as 'c#'

1
answer

How to delete the first and last name of a string

Original: string nome = "João da Conceição Lopes"; Expected result: string nomesDoMeio = "da Conceição";     
asked by 01.12.2016 / 12:28
2
answers

Popular class with json

I have this json coming from my service { "CorIndicador":"VERMELHO", "DadosIndicador":"{\"Previsto\":25784.686452608872,\"Realizado\":95258.9557949728}", "TipoIndicador":1 } And I have this class public class FaturamentoRespon...
asked by 08.02.2018 / 19:02
1
answer

How do I get the contents of an HTML Table and convert it to a C # List?

I have a html table that is created dynamically by the user. I need to get all the data inserted by it into the table and generate a List so I can save it later to a database. Project data follows: public class Procedimento { str...
asked by 10.07.2017 / 20:31
2
answers

Calculate difference between dates and change status

I need to create some routine to calculate the difference between two dates directly in the MySql database and change the status of another field according to that difference. The database fields are: Date Calibration, Expiration Calibrati...
asked by 22.06.2016 / 11:50
2
answers

How to send fields of a form by email in the format of a table?

My application takes some data that the user fills in the TextBox fields (txtCompany, txtContact, etc ...) and sends them to a preconfigured email. I can send the data through smtp, but are being sent without formatting. How to format the data t...
asked by 04.11.2016 / 18:11
2
answers

Check if a date is valid

I'm getting a date in the format: string: "01/03/2010 23:00" How can I verify that this date is valid? By validate, disregard questions of days or months having wrong numbers. The validation would only be to see if there are no letters a...
asked by 26.10.2016 / 16:17
4
answers

API project with many layers [closed]

I'm studying about API. I saw a design pattern with these layers: I found the AppServices and DomainServices layers unnecessary. For me the ideal would be to create only one layer of Services where my entire business rule would be OR...
asked by 04.11.2016 / 01:47
2
answers

With edit the TabControl in C #?

I want to hide only the part of TabControl that comes with the name of the tab in C #, as shown below. Is it possible?     
asked by 24.03.2017 / 11:11
2
answers

HTML within a StringBuilder

I have HTML where I am formatting it inside a StringBuilder , where there are "quotation marks" I am passing a slash, but it is not opening the correct HTML. public string CorpoPaginaHtml() { StringBuilder corpoemail...
asked by 21.03.2017 / 18:44
2
answers

Doubt with Try Catch

I have the following code: try { modelOn.pacienteOns.Add(Conversao.pacienteToOn(oObjeto)); oObjeto.online = 1; modelOn.SaveChanges(); modelOff.SaveChanges(); } catch (Exception i) { MessageBox.Show("----------------->>> " + i); } I...
asked by 09.04.2017 / 16:23