Posts by Guilherme Padovam • 437 points
44 posts
-
0
votes0
answers31
viewsQ: Not pulling XML information
At the moment where I import XML information, it does not separate and play to the XML_List, for continuity to the code, it returns no value in that part of the code: XDocument xDoc =…
-
0
votes0
answers391
viewsQ: Automatic Text Break
I’m trying to remove the Line Break from this table, but I don’t know how to effect it, I wanted to let the full name be written and without the line break. Code: #customers { font-family:…
-
1
votes2
answers23
viewsQ: Changing the Button Source
Guys wanted to know how I could make my button not turn purple because of the hyperlink. I wanted to leave in this appearance the button more or less. Code: <button class="button">…
-
1
votes1
answer83
viewsQ: Add Dropdownlist value to the database
I wanted to put a dropdownlist in my view where his List value went to the database, but I only know how to add values to DropDownlist with data from a table, wanted to make a DropDownlist with…
-
1
votes2
answers116
viewsQ: Hide Menu tab
I am trying to hide the Nav menu bar when it enters a specific form, would be to give some example? This is the index of my form: @using PagedList.Mvc; @model…
-
2
votes0
answers88
viewsQ: It’s not overwriting the value
I’m wanting the final calculation information to overwrite what is already saved in the Stock table, as it would be to do this, because Save, is overwriting correctly, I tried to apply in the…
-
0
votes0
answers75
viewsQ: Does not update value
Calculus and values return me all right, but when overriding the previous value and add the new one it does not change, keep the old one. Compra Controller: public ActionResult Update(CompraModel…
-
1
votes1
answer97
viewsQ: Problem saving
Only a form that is returning me this mistake, the question that I do not know what can be or how to fix, some ask to cascade the relationship that is already. Nhibernate.Transientobjectexception:…
-
0
votes1
answer446
viewsQ: Error Adding IIS in windows 7
I’m trying to add IIS 10.0 to my Windows 7 Ultimate(64x), but when I go to Enable and Disable Windows Features and it appears written on the screen Please wait... but then returns me a totally white…
-
-1
votes1
answer1906
viewsQ: Error: The model item passed into the Dictionary is of type X but this Dictionary requires a model item of type Y
Error starting query and generating list with results: Error: System.Invalidoperationexception: The model item passed into the Dictionary is of type…
-
3
votes2
answers2261
viewsQ: I need to do a SUM inside Group BY in Lambda
I’m trying to create a summary report where it consists of making a GROUP BY with SUM, i want to know how I could do it in c# with lambda or hql(Nhibernate), I managed to do a GROUP BY, but I can’t…
-
1
votes1
answer89
viewsQ: Error when placing SUM
I’m trying to implement the SUM within those lines of code to sum the two columns Litro and TotalGasto Code: var teste = consulta.Where(i => i.DtAbastecido >= dataInicio &&…
-
1
votes2
answers528
viewsA: How to use the SUM aggregation function in a NHIBERNATE query?
I put this next line of code in the controller, and I was able to add Group By, but I still can’t do SUM var teste = consulta.Where(i => i.DtAbastecido >= dataInicio && i.DtAbastecido…
-
2
votes2
answers528
viewsQ: How to use the SUM aggregation function in a NHIBERNATE query?
My consultation consists in knowing the NumCarroId, TotalGasto and VlrUnit, in Sql I managed to do that but when I play in HQL returns the following error: Application of GROUP BY next to the SUM to…
-
0
votes1
answer274
viewsQ: Margin problem when generating pdf
I am making a report, when generating the pdf, I tried to implement the margin, but continues to cut the table in the middle and continues on the other page. This is happening in the margin, even…
-
1
votes1
answer40
viewsQ: I’m trying to dropdown html
I’m trying to implement a DropDownList in a View mine that serves for form, but I need the selected value to go to a ViewBag. This is my View there where it is "Car Selected", I would need to turn…
-
0
votes2
answers67
viewsA: Trying to search with specific id in a period
I managed to solve the problem, I did some SQL testing in my query was like this My HQL: public IList<Abastecimento> ConsultaPeriodo(int carro, DateTime dataInicio, DateTime dataFinal) {…
-
1
votes2
answers67
viewsQ: Trying to search with specific id in a period
I’m trying to get a car specific between dates, because it works in periods, more need to get the element ID, I do not know if I would have to apply some other query or include in it, the bank I use…
-
1
votes1
answer32
viewsQ: Make sum of all searched data
I am making a report, I was able to make him bring me the data of specific dates, but I need now that he brings me the sum of everything that was selected, I made an attempt but does not bring the…
-
2
votes2
answers351
viewsQ: Apply between in an hql in c#
I am trying to apply a between with two fields of a part of my form, are dates and vehicle ids, I do not have much knowledge of how it models this by HQL in nhibernate with c#, I wonder how it would…
-
0
votes1
answer61
viewsQ: It is bringing the whole column and not only a specific id
I’m trying to catch the last mile registered on the seat of a specific vehicle, but it brings me all the miles and not a specific vehicle. My Controller: var Rota =…
-
1
votes1
answer69
viewsQ: Subtract the current value from the previous one
I’m trying to make a supply system, I need it to take the last km registered in the bank of a specific vehicle and be subtracted by the new that will be inserted I’m trying to do so, but it shows no…
-
1
votes2
answers77
viewsQ: distinct use in a dropdownlist
I’m trying to get equal names off my dropdownlist, but they’re different id’s. I wanted where I would have to implant the code if it would be in the view, or in the controller somewhere else. Data…
-
0
votes1
answer319
viewsQ: How to make a query bringing me the last value of a specific id
I’m trying to do a c# query with Mysql, where there are two tables: Compra --> Table where you take the IdProduto and the Product Value. Abastecimento --> Table where the IdProduto and the…
-
1
votes1
answer67
viewsQ: Place the value of an hql on a var
I need to get my two tables to work together, where the Abastecimento take the Product Name(NomeProdutoId), table Compra, I managed to get him to take the Product Name, but I wanted him to bring me…
-
0
votes1
answer56
viewsQ: Error when registering in the form
When you select the value and I will register informs me an error. System.Argumentexception: The value "System.Object[]" is not of type "Blogweb.Models.Compra" and cannot be used in this Generic…
-
0
votes1
answer206
viewsQ: Pick up information using a dropdownlist as select
I need to make a basic supply system, where when selecting the type of fuel, it brings me the last registered value of that product and automatically select and still automatically insert in Textbox…
-
0
votes1
answer329
viewsQ: Quantity Inventory Management
Personal I am trying to do a stock control, my idea is when I consume a product it changes in the table. Ex: Estoque: Produto / Quant Caneta /5 Papel / 10 Lapis / 20 But when I separate these items…
-
0
votes2
answers57
viewsA: Not changing the page when changing the page
I traded the Actionresult for a Viewresult. public ActionResult Index(int? page) { IList<Abastecimento> abastecimento = dao.Lista(); page = 1; int NumRegistro = 10; int NumPag = (page ?? 1);…
-
0
votes2
answers57
viewsQ: Not changing the page when changing the page
When I try to go to page 2, it shows the site loading, but only brings me the first page information of my page 1. My Controller: public ActionResult Index(int? page) { IList<Abastecimento>…
-
0
votes0
answers17
viewsQ: How to leave a maskedbox
How do I leave values as real value, not a common number. I need these values to be as 2.00, if possible leaves R $ 2.00 My Controller: public ActionResult Adiciona(AbastecimentoModel viewModel) {…
-
0
votes2
answers544
viewsQ: Save date and time?
I wanted to know how to save the date and time in the bank, and the time I wanted to pull automatically from the machine or server. So I was able to record the date, but the time is zero. Man…
-
0
votes1
answer48
viewsQ: If it has no value to compare, save without comparing
I’m trying to make my application save if it has no value to compare, however you are always going through the comparison, I tried to put an if but still problem, this is the class that makes the…
-
0
votes2
answers608
viewsA: Error Object Reference not set to an instance of an Object in c#
The import had been deleted when I went to do some tests in my controller, I put another error in the class that makes the query, but I was just making the query to get all the results, the…
-
0
votes2
answers608
viewsQ: Error Object Reference not set to an instance of an Object in c#
I’m in trouble, when I register my route it appears an error at the time the system will make the comparison to see if the Numcarroid that is in Dropdownlist is the same that is in the bank to can…
-
4
votes3
answers759
viewsQ: The null value automatically becomes 0
I’m doing a vehicle registration, I need it to register put that whenever a vehicle is registered the value zero instead of putting the value null, I tried by default, but it does not record the…
-
1
votes1
answer168
viewsQ: Returns query value in a variable
Precise returns the value of a query query in an int variable, to be able to make the comparison with my Textbox, but I cannot make the comparison because I cannot compare integer(textbox) with a…
-
0
votes1
answer83
viewsQ: Error trying to register
Good afternoon, the moment I try to register in the form, I program in the language c# with Asp.net, Razor and Nhibernate. This is my DAO public IList<Rota> Comparacao() { //*string hql =…
-
0
votes1
answer106
viewsQ: Pull the last information from a table
I wanted to know how to pull the last information that was registered in the bank, but I can’t use the ID. in my Route table have the columns Id(PK), Date, Current Km_and Nveiculoid(CK). In this…
-
0
votes1
answer64
viewsQ: Query return problem
I have a problem with my query return. public IList<Rota> Lista() { //* string hql = "SELECT * FROM Rota WHERE ORDER BY Km_Atual ASC"; string hql = "SELECT Km_Atual, MAX(DtLancamento) FROM…
-
0
votes1
answer100
viewsQ: I need to convert a string to int within an hql
I need to change the string to int, however it is located within an hql, I probably have to finish the query, but it error to enter the database, my code is a c# with Asp.net, mvc, nhibernate.…
-
1
votes2
answers40
viewsQ: Pull the information last information you will use for comparison
I have a question in SQL, what I want is the code to pull the last information of this column and compare with a label of my site, but I do not know if the Last Insert Id is better or correct to…
-
0
votes2
answers92
viewsQ: Value conversion
I need the string "hql" that would be my select to convert to int so I can compare values in an if. using System; using System.Collections.Generic; using System.Linq; using System.Web; using…
c#asked Guilherme Padovam 437 -
0
votes0
answers97
viewsQ: If’s condition is not accepting in Asp.net mvc Razor
I want to update on one condition, however, you are updating the data without seeing the if condition using System; using System.Collections.Generic; using System.Linq; using System.Web; using…