Posts by Diego Rafael Souza • 2,900 points
108 posts
-
0
votes1
answer348
viewsA: Xamarin Forms Android - Change Toolbar Background
Specifically responding to the code you posted, the red Arja behind the title is because of that block in style: <style name="MyTitleTextAppearance"…
-
1
votes1
answer44
viewsA: How to add a span to an htmlhelper?
That answer of @David in the ONLY suggests using the Url.Action instead of the ActionLink. Would look like this: <li> <a href="@Url.Action("Register", "Account")"> <span…
-
2
votes3
answers929
viewsA: How to build JSON with a list of stores separated by categories?
Just pack the data of the categories into a root array. You can give a name for the field that will hold the root (in the example I used dados), or as was suggested in the other answer, transform…
-
4
votes2
answers319
viewsA: What is considered when ordering a varchar field? Being filled in by numbers
The data were sorted as text (alphanumeric ordering) upwards, as is the type of data in the column. It is the known alphabetical order. There are algorithms that optimize the sorting process, but…
-
1
votes1
answer104
viewsA: Builder without parameters is not working, is leaving the object as null
If with such a simple flow it was possible to reach this complexity of this size, the destination of this program will surely be the disposal. A problem is quite trivial, but the path you have…
-
0
votes1
answer151
viewsA: Login Screen Error - Xamarin Forms Visual Studio 2017 Android
The only requirements for you to use an element defined via XAML in the codebehind are: Declare ownership x:Name element with the name that will be used as variable Use a unique name for each…
-
1
votes1
answer79
viewsA: Select Mysql with 3 arrays
If I understand correctly you’re wanting every column match To within the whole X is in the same position in the set as the next column B in the other set Y. In SQL there is no way you express this,…
mysqlanswered Diego Rafael Souza 2,900 -
0
votes2
answers257
viewsA: Add gridview dynamic checkbox
It happens because he’s making one ToString() in the check (Checkbox) you are adding. That one ToString() is probably being done by column data type "Quitar" of his DataTable. According to that…
-
0
votes1
answer175
viewsA: Loss of focus on Entry in Xamarin
As @Wictorchaves said, your question is very broad. But, broadly speaking too, you can manage the event Unfocused of the component Entry. Take an example: Declaring via XAML <Entry Text={Binding…
-
0
votes1
answer22
viewsA: Return values if any record does not exist
I don’t know how to declare the Join clause how you used it (tabelaUm AS t1 LEFT JOIN tabelaDois AS t2 ON1), but, ignoring this, the result is not according to what you expect because although you…
-
1
votes1
answer325
viewsA: Xamarin Forms - Error CS1061
TL;DR; This build error already shows you where and what the problem is. 'Mapviewdetail.Ibaseurl' does not contain a Definition for 'Baseurl' and no Extension method 'Baseurl' Accepting a first…
-
0
votes1
answer151
viewsA: How to open a cshtml local webview in Xamarin Forms
It’s not gonna happen. cshtml is a project file extension that needs to be compiled, published on an Asp.net server so that at the time of the web request is processed and only then the HTML page is…
-
14
votes5
answers35616
viewsA: SELECT condition WHERE with multiple values in the same column
You want to bring the person and all its characteristics if they meet the filter (which will be cumulative). If you are using the version 8 from Mysql, This is gonna be like a walk in the park.…
-
1
votes1
answer43
viewsA: Doubt about Xamarin-Forms
Unable to build views with drag-and-drop components as there is no layout editor for this. The method of building the views is actually through XAML (and is much better than it looks on a first…
-
0
votes3
answers1439
viewsA: Difference between SQL SERVER dates
To avoid using subselect in clause select, you can cross table data using one ranking per customer. Thus: SELECT SOURCE.ID, SOURCE.CLIENTE, SOURCE.FASE, SOURCE.DATA, DATEDIFF(DAY, QUERY.DATA,…
-
1
votes1
answer322
viewsA: Title in Masterdetail - Xamarin Forms
By your code, on startup of the app you must be doing something like this: App.Current.MainPage = new NavigationPage(new FoodSuppy.Principal()); And that’s why you needed to 'hide the…
-
3
votes3
answers2216
viewsA: SQL - Bring only 1 year records back
As noted by the staff, if you include the date of sale on SELECT the customer will appear once for each sale he has had before the set deadline (1 year ago). In that case, it is necessary to remove…
-
1
votes2
answers52
viewsA: Loading when searching JSON
Using AbsoluteLayout, the property LayoutBounds receives the arguments in that order: Horizontal positioning Vertical positioning Width Height These values can be relative (to the parent element) or…
-
1
votes2
answers104
viewsA: Problems Making Simple Insert in Bank - Unexpected Token
Using the syntax INSERT INTO <<table_name>> VALUES ((...)) you must provide literal values, rather than functions such as NOW(). This is defined in official Mysql documentation: The…
-
1
votes1
answer1199
viewsA: Physical back button in Xamarin Forms
Back a page by clicking the button ← is already the native behavior of Xamarin when you are navigating between pages, unless you have overwritten the Onbackbuttonpressed event for some reason and…
-
1
votes1
answer811
viewsA: ERROR 1215: Cannot add Foreign key Constraint (Mysql Workbench)
As its name suggests Foreign Key (foreign key) is the column(s) that identifies(m) the parent in from the child table. You are trying to add the FK in the father’s reference to the daughter table…
-
-1
votes2
answers539
viewsA: Find consecutive numbers in a string in C#
It is possible to scan the characters with a single loop, (Example in dotnetfiddle): string input = "Abc111de2234"; string output = string.Empty; // Desejado: "Abc1de234"; char[] numbers = new []{…
-
1
votes2
answers86
viewsA: Comparison of dates with custom date class
You can simplify comparisons by turning 'date/time' into strings, as long as you follow the progression hierarchy and a fixed format. To simplify, I have created a method that puts the…
-
0
votes1
answer895
viewsA: Application opens and closes
If uninstalling the application manually solves the problem, it is possible that something is cached or with corrupted references. Tries to change the deployment configuration in the properties of…
-
10
votes2
answers545
viewsA: Query DELETE taking too long to load
Before we answer, let’s put a few points on is: I made a select with these same conditions, and something absurd happened, he repeated several records, which do not exist, eg for the auction with ID…
-
2
votes1
answer3156
viewsA: How to add one Form inside another?
This is because, by default, a form is "an independent program", which has "domain of itself" in relation to user interaction. When you use it as part of another form, in practice it ceases to be…
-
1
votes3
answers536
viewsA: How to show quantity of sales per month payment in SQL Server
You can do it like this: SELECT MONTH(DataVenda) AS 'Mes', Sum( CASE WHEN FormaPagamento = 1 THEN 1 ELSE 0 END) AS 'Boleto', Sum( CASE WHEN FormaPagamento = 2 THEN 1 ELSE 0 END) AS 'Cartão', Sum(…
-
1
votes3
answers86
viewsA: Conditional with if and Else
As @Caiqueromero said, you’d better separate the functions, otherwise you’ll need to identify which button was clicked before you know which logic should be executed. It’s gonna be something like…
-
2
votes1
answer701
viewsA: Concatenate arrays accumulating content in C#
You used an extra loop, which ended up creating problem for you. It’s simpler to solve this way: string[] one = new string[] { "XXXXX-X-XXX", "YYYYY-Y-YYY" }; string[] two = new string[] { "1", "2",…
c#answered Diego Rafael Souza 2,900 -
1
votes4
answers706
viewsA: Help in portugol
I think that’s what you tried to do: Var salario:real pretencao:inteiro media:real Inicio escreval("Entre com o salario") leia(salario) escreval("Pretençao de parcela") leia(pretencao) media <-…
portugolanswered Diego Rafael Souza 2,900 -
4
votes2
answers487
viewsA: Take only the return value in a Dapper
In this case, Dapper should return an object of the type dynamic. Just do it like this: var teste = _connection.Query(sQuery.ToString(), par).FirstOrDefault().UF; Like the guy dynamic is an…
-
2
votes1
answer72
viewsQ: Is it possible to obtain a parent attribute when the class defines the child attribute?
Assuming I have the following hierarchy: [AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = true)] public class GrandpaAttribute : Attribute { public GrandpaAttribute() {}…
-
3
votes1
answer36
viewsA: Join SQL Tables
Just select the courses that have no record in the settings table. So: SELECT * FROM `curso` c WHERE NOT EXISTS(SELECT 1 FROM `curso_configurar` cc WHERE cc.cur_id = c.cur_id ) Post Script: As in…
sqlanswered Diego Rafael Souza 2,900 -
1
votes5
answers1602
viewsA: Change return /Date(1386295200000)/ to date format
On the server side the date is probably correct. Usually this happens in the conversion of DateTime for Json (and we usually treat the return in JavaScript, I don’t know if that’s your case, the…
-
2
votes4
answers95
viewsA: Optimization in sql
It is good you check if it compensates with respect to the performance for your real case, but for the presented example would be the following: SELECT NOME, COR, TAMANHO FROM ( SELECT P.NOME AS…
-
4
votes3
answers87
viewsA: Put date in American format with substring
If you prefer to use less verbose code, you can try this way: EstData = DateTime.ParseExact( EstData, "ddMMyyyy", System.Globalization.CultureInfo.CurrentCulture) .ToString("yyyy-MM-dd");…
c#answered Diego Rafael Souza 2,900 -
0
votes2
answers114
viewsA: Search with null value, mysql
When writing selects with criteria this way, I recommend using parentheses to make explicit the conditions, to make a reading clearer. I believe that’s what you need: SELECT * FROM clientes WHERE (…
-
3
votes2
answers21
viewsA: Swap Tag for another SQL Tag
If it is SQL Server: Update tabela set email = REPLACE(email, "meusite.com.br", "seusite.com.br") Where email like '%meusite.com.br'
sqlanswered Diego Rafael Souza 2,900 -
2
votes1
answer103
viewsA: Center a label on a badge
Just change the HorizontalOptions and VerticalOptions Label inside the Grid for Center. I would also recommend to make clear in the elements within the Grid their position: <Grid…
-
0
votes2
answers329
viewsA: What’s wrong with my code?
You are adding to the list of null files the contents of the file, instead of its path. Also, I believe you don’t need that internal loop reading every byte of the file... As it is, it is quite…
-
1
votes1
answer121
viewsA: When I charge my App class is not recognized
In the class where you use a component that is not from the platform itself Xamarin.Forms, you must first import the namespace in XAML, similar to what you do in C# (using MeuProjeto.Views.Badge;).…
-
2
votes1
answer136
viewsA: Create and show a badge on an Xamarin page
Actually two components are being created. The first of them is the CircleView for which you need a renderer on the platform. The second is Badgeview which - once again - is not a page is only a…
-
1
votes1
answer30
viewsA: collect Tables from one mysql database and insert into another
Of course yes! From the target bank (bank2), you can do so: INSERT INTO username (coluna1, coluna2) SELECT coluna1, coluna2 FROM banco1.nome
mysqlanswered Diego Rafael Souza 2,900 -
0
votes2
answers114
viewsA: Why is there the term "Private" in . NET?
In addition to the reply referred by @Jeffersonquesado, which already largely clarifies the subject, I would add an answer on an exclusive question that Oce proposed. In a free interpretation of the…
-
5
votes1
answer62
viewsA: Create Actions list with parameters and then run it
Before replying, two comments: The delegate with return would be Func instead of Action; When you delegate a method, who 'provides' the values of the parameters is the class that holds the…
-
1
votes1
answer80
viewsA: Incompatibility problems with BLE Plugin with Xamarin project
This message is usually presented as a compatibility alert, not an error. This means that the package in question was developed to target that type of project and if any functionality is dependent…
-
1
votes1
answer81
viewsA: How to create the ATTACHMENT field in a form in Xamarin Forms?
Xamarin.Forms does not yet provide in your package a component for file selection. However, there are some implementations (including open source) in this sense, since it is a very common need in…
-
1
votes1
answer249
viewsA: Wrong date format on Xamarin Forms, how to resolve?
Binding supports setting the string format you want to present. Just change the label binding in your XAML to the following: <Label Text="{Binding DataAtual, StringFormat='{0:dd/MM/yyyy…
-
1
votes1
answer102
viewsA: web api, how to do this login correctly?
Usually the property tested on result.IsSuccessStatusCode actually concerns the communication itself, whether or not there was success in sending the request. If it fails, fine, you need to inform…
-
1
votes1
answer47
viewsA: error using waitActivityIndicator, how to resolve?
It is necessary to declare the ActivityIndicator in your XAML, stating the name as you want to use. In your case it would be something like this: <ActivityIndicator x:Name="waitActivityIndicator…