Posts by Luã Govinda Mendes Souza • 1,072 points
41 posts
-
0
votes4
answers2850
viewsA: Selenium cannot find by id
I’ve had many problems of this kind, especially with IE. You can try to find the element by attribute. By.cssSelector("input[id=idRoleCheck:0]");
-
0
votes4
answers318
viewsA: How to return an object from a dynamic reference in Javascript?
You can use the val() In practice the val() executes a string as if it were javascript code. var x = 10; var y = 20; var a = eval("x * y") + "<br>"; var b = eval("2 + 2") + "<br>"; var c…
-
3
votes3
answers2130
viewsA: Close page when printing
For anyone to stumble upon this reply from Google, let me try to clarify things: As Ajay pointed out, there are two events that are fired for printing but they are not well supported; as far as I…
javascriptanswered Luã Govinda Mendes Souza 1,072 -
0
votes2
answers170
viewsA: How can I create events in a safer way?
DDD - Domain Events There is a specific project pattern for this issue, called DDD - Domain Events. This pattern has as its scope the layers communicate by events. What is ? "Domain Events, are…
-
1
votes1
answer455
viewsA: Filter database-level results Entity Framework
SQL Server Profiler It is normal to have this type of doubt with EF or any other ORM tool. To facilitate your analysis it would be interesting to use the SQL Profiler. This tool can intercept all…
-
3
votes3
answers1566
viewsA: Convert World/Excel to PDF
There are several Frameworks for this solution, what I most used was the Eeplus (which is only one DLL and does not need to be installed), but there are many others like: Closexml Open XML SDK (see…
c#answered Luã Govinda Mendes Souza 1,072 -
1
votes2
answers3899
viewsA: Lock Printscreen function
You cannot disable the screen by grabbing from the web browser, it would only be possible by installing additional software on the user’s PC. There are some IRM (Information Rights Management) tools…
-
3
votes4
answers810
viewsA: SQL LIKE clause does not work with Sqlparameter
Substitute: cnxCli.sel = "Select * from cliente WHERE Nome like '%@Nome%'"; For: cnxCli.sel = "Select * from cliente WHERE Nome like '%' + @Nome + '%'"; Reference 1 Reference 2…
-
1
votes2
answers5016
viewsA: Session C# how does it work?
What would be a session of a system ? Session is usually used to store user data. It is done this way because the data stays on the server, not allowing other users to have access. You can save your…
-
-1
votes3
answers1233
viewsA: How to login to desktop application via web application?
For authentication achievements the most elegant way to do would be using Claims. With Claims there is a possibility to do what you need, as we have the possibility of third party authentication.…
-
-1
votes4
answers957
viewsA: Multiple Contexts Migrations Entity Framework
One differential of EF6 is that it was released with the functionality to support multiple contexts. I found some answers to your problem : Tutorial :…
-
18
votes2
answers48433
viewsA: Using WITH AS command in Sql Server
The reserved word 'WITH' is used in SQL to create a CTE (Common Table Expression) Explanation : "We can think of a common table expression (CTE) as a temporary result set defined in the execution…
sql-serveranswered Luã Govinda Mendes Souza 1,072 -
1
votes3
answers2741
viewsA: Send Javascript Array to Controller via POST
You can do it this way : var countryArray = [1,2,3,4]; $.ajax({ type: "POST", url: "../Home/SaveTable", contentType: 'application/json', data: JSON.stringify({ MeuParametro : countryArray}), }); I…
-
1
votes1
answer432
viewsA: View table by foreign key in C#
You could join the Employee table with Customer and Order. Ex: SELECT CLIENTE.NOME, CLIENTE.ID, FUNCIONARIO.NOME, FUNCIONARIO.ID, PEDIDO.ID FROM PEDIDO INNER JOIN CLIENTE ON CLIENTE.ID =…
-
1
votes1
answer1351
viewsA: Close the browser only after running all tests with Selenium Webdriver c#
The best way I could find was to implement the Singleton standard for the Iwebdriver object. Ex: Base class: public class Base { public readonly IWebDriver driverIe; public Base() { driverIe =…
-
1
votes1
answer145
viewsA: Ignored await in asynchronous method c#
For asynchronous methods that return Task<object> in your case Task<bool>, you have to access the "Result" property Example: Method public static async Task<int> test() { Task t =…
-
5
votes1
answer2202
viewsA: How to implement token to reset password?
First you will need a table to store the password change requests, we will call it password_change_requests and in it you will need to have the following information. Table id (recommended to be a…
-
1
votes3
answers7358
viewsA: How to avoid calculation error in SQL Server?
You can use "Case" and replace "zero" with another number: Ex: SELECT a.totalcustoprodutos, a.datanota, a.numeronota, a.cfop, ((a.totalnota / (CASE a.totalcustoprodutos WHEN 0 THEN 1 ELSE…
-
1
votes1
answer808
viewsA: ASP.NET MVC and DDD
Following the DDD standard, business rules always stay in the Domain layer. "Domain - represents the concepts, rules and business logic. The whole focus of DDD is on this layer. Our work, from now…
-
1
votes3
answers285
viewsA: How to serialize a class to file in C#?
You can implement a methods that receives a generic entity and performs Serialization. /// <summary> /// Serializes an object to an XML/Extensible Markup Language string. /// </summary>…
-
3
votes2
answers2346
viewsQ: Generate txt file according to the predefined layout in c#
I need to export data from a class according to a specific layout consisting of size and position. For easy maintenance, I need simple layout change. Follow down my class: public class…
-
2
votes2
answers525
viewsA: Removing strings from html files
Do the following : int indexIni = 0; int indexFim = 0; string html = @"<div> dfklçbndflçbndfblçdfnmblçdfmblçdfmblçdmfblçdfbmç<!-- saved from…
-
2
votes2
answers188
viewsA: c# query with cycles
Hello, do the following : SqlConnection conn = new SqlConnection(@"Data Source=HUGO-PC\HUGO;Initial Catalog=fatura;User ID=sa;Password=hugostoso07"); conn.Open(); SqlCommand cmd = new…
-
1
votes3
answers139
viewsA: Exchanging link as input text
You can do this with jQuery. For example: Quantidade: <input type="text" name="qtd"><br> <input id="botao" type="button" value="Go to Google" /> <script>…
-
0
votes4
answers815
viewsA: Reflection of an Object that is owned by another
Hello, What you can also do is take the "Displayname" attribute from the property. Ex : Extension method: public static T GetAttributeFrom<T>(this object instance, string propertyName) where T…
-
1
votes1
answer121
viewsA: Export to database
Mysql is fully capable of saving special characters. I advise you instead of using string concatenation to form a script. Ex : string script = "INSERT INTO TABELA (ID, NOME, IDADE) VALUES ("+ id…
-
2
votes2
answers2315
viewsA: How to send two actions in a single form?
Hello, You can only submit the form once to the given url. To resolve your problem you can submit these requests via ajax.…
-
8
votes1
answer347
viewsQ: How to create an html log with log4net
I have a project that already uses log4net, but I would like to show this log in HTML. I searched several sites and nobody implemented this solution. Does anyone have any idea how to do that?…
-
1
votes2
answers606
viewsA: Number of lines per page reporter Viewer c#
Hello, Unfortunately "reportviewer" does not work this way. It itself determines the amount of information that will be displayed on the page. In case you need more functionality, I recommend you…
-
0
votes3
answers1833
viewsA: Delete Relate Record using Entity Framework
Hello, You can enable "EF cascading deletion". Entity Framework auto relationship enable cascading delete But I don’t particularly think it’s a good idea since you can add a table as a daughter and…
-
2
votes0
answers125
viewsQ: Multi-platform mobile development
I am developer . Net (MVC, WPF, MCF) and need to develop a project mobile cross-platform, I did a search and verified that there are several framework’s that resolve the issue as Phonegap, Apache…
-
3
votes1
answer78
viewsA: C# - Entityframework | Database Comparison
We can use 2 strategies with the RU: Code First and Database First. Code-First http://www.devmedia.com.br/entity-framework-code-first/29705 Db-First…
-
4
votes3
answers11042
viewsA: how to Fill a Dropdownlistfor
Hello, Basically for the creation of a Dropdownlistfor you will need to declare the parameters below @Html.Dropdownlistfor(, ) Model: public class Veiculo { public int ID { get; set; } public string…
-
1
votes2
answers2052
viewsA: Update page(View) automatically in Asp.Net MVC
hello, You can return a Json by stating the amount of vacancies for your View. Following example : http://www.guj.com.br/27920-como-obter-objeto-json-de-retorno-da-requisicao-ajax-jquery-aspnet-mvc-…
-
2
votes1
answer350
viewsQ: Desktop applications developed in HTML CSS and Javascript
I have a MVC web application on .Net. I need to migrate there to desktop. However I would like to keep my application with Web Views. I know that for Android app and IOS it is possible to reuse the…
-
-2
votes3
answers1923
viewsA: What is a microservice architecture?
Hello, Thinking of distributed processing the ideal is to have several functionalities of the system decoupled in service mode. For example, we have an application that only "Displays", "Updates",…
-
1
votes5
answers2182
viewsA: How to select a full xml/html tag with Regular Expression even if there are identical tags internally?
Hello, I’m not sure I understand your problem. We usually only use ER for data validation. Regular expressions: introduction http://turing.com.br/material/regex/introducao.html When we need to…
-
1
votes2
answers637
viewsA: Problem with table width
Hello, I met someone who had exactly your problem : It is possible to add an overflow behavior with scroll only in tbody of a table? But the proposed solution does not resize the header according to…
-
1
votes1
answer49
viewsA: How to create a Helper for creating Datepicker
I checked that I can install in my project via Nuget this helper. @Html.DatePickerFor(model => model.Date) https://www.nuget.org/packages/DatePickerHTMLHelper/…
-
3
votes1
answer49
viewsQ: How to create a Helper for creating Datepicker
I would like to create an MVC Helper for the creation of a Datepicker. Example: @Html.DatePicker();
-
0
votes1
answer199
viewsA: Dataannotation validations do not work on properties with Notmapped attribute in EF6
Hello, We usually use a standard to meet View needs. When the View is strongly typed directly with the model we use the so-called Viewmodel.…