Posts by Luciano Azevedo • 402 points
13 posts
-
1
votes1
answer24
viewsA: Decimal value formatting . NET Framework
Would that be ? decimal x = 0.7777M; var y = x.ToString("0.0000", CultureInfo.CreateSpecificCulture("en-US")); Console.WriteLine(y);
-
0
votes0
answers23
viewsQ: Receiving null parameters Httppatch Odata V4
Salve Foks, I’m having trouble passing values to the controller using the verb Httppath controller: [EnableQuery] [HttpPatch] public async Task<Document> Patch( [FromODataUri] int key1,…
-
1
votes1
answer108
viewsQ: How to convert Enum to int by filling with zero on the left?
Ladies and gentlemen, I have a question here of converting a enum in a string, but I need the conversion to be filled with zero to keep 2 digits. Example public enum System { Unknown = 0, Mirror =…
-
3
votes4
answers766
viewsA: How do I capture only the last 2 digits of the current year?
Hello Could you try this DateTime date = new DateTime(2019, 1, 30); string onlyTwo = date.ToString("yy");
c#answered Luciano Azevedo 402 -
1
votes1
answer23
viewsQ: Relationship 1:N using EF using Data Annotationion
I’m trying to map between these two classes, where in championship I have a list of all stages related to the championship Follows the classes, [Table("ETAPA")] public class Etapa { [Key] public int…
-
1
votes3
answers752
viewsA: Comparison between objects through loop, If and Else?
you can’t compare whether person is greater than zero because he is a person-like object, what Voce can do is check the return of your save method if it is true // Esse é o loop e o objeto pessoa!…
-
5
votes3
answers2715
viewsA: Is there any way to display the size of the string in a MYSQL result?
I don’t know if that’s what you’re looking for SELECT nome, LENGTH(nome) as tamanho FROM ....
mysqlanswered Luciano Azevedo 402 -
1
votes4
answers6317
viewsA: Empty field and zero value check
There was a piece of your code that was outside the keys to the ELSE. protected void BT_Cadastrar_Click(object sender, EventArgs e) { if (!string.IsNullOrEmpty(TB_Peso.Text)) LBL_Peso.Visible =…
-
2
votes3
answers579
viewsA: How to join data from another table
follows an example of how to do, I know it is right to use INNER JOIN: $sql = "SELECT c.nome, d.nome_cidade, c.nome_status FROM cidades c, dados d, inativo i WHERE d.cidade = c.id AND d.status =…
-
3
votes2
answers621
viewsA: Return default value in mysql query
If the fields in your table are of type INT, the result of this operation will be 0, as there is no NULL in the INTEGER fields SELECT COALESCE(valor * t1.PBRT, 0) AS C_MP FROM....…
mysqlanswered Luciano Azevedo 402 -
1
votes5
answers758
viewsA: How to embed CSS in HTML tags?
Hello some email servers do not support CSS, inline only visit this site http://beaker.mailchimp.com/inline-css that converts your html to CSS inline…
-
2
votes2
answers213
viewsA: Show data and click on it to open
You should create a redirect to another page and filter in your database with the id of the previous page. while($exibe = mysql_fetch_array($qr)) { echo '<p><h2><a…
phpanswered Luciano Azevedo 402 -
7
votes2
answers4310
viewsQ: How to prevent a property from being mapped to an entity in the Entity Framework?
I need to enter a property in the model class, but when I enter the code first, it says the table already exists and changes have been made. My code: public class Data { [Key] public int Id { get;…