Questions tagged as 'c#'

1
answer

WPF C # Doubt - SetFocus in a Text and leave a button disabled

I am having difficulty in C # because when I click on a button, it has to disable a button and leave the focus in a txt. But I do not know how to reference an object in wpf (xaml) in the encoding file (cs) private void View(object param...
asked by 28.02.2018 / 13:25
2
answers

How to center panel inside groupbox?

How can I centralize panel1 in groupbox ? Follow the code below: private void Form1_Load(object sender, EventArgs e) { // aqui defino novo size do panel1 panel1.Size = new Size(591, 423); } The problem is that pan...
asked by 24.11.2017 / 00:34
1
answer

How do I hide or clear the url while giving a get in asp.net mvc?

I would like to know how to clean or hide data that I pass through a URL to a webapi so that the data does not become apparent and does not get in the way of my routes. follows example: http://localhost:65286/Cliente/Login?Email=alguem%40...
asked by 15.11.2017 / 21:09
1
answer

How to make a query bringing me the last value of a specific id

I'm trying to make a query through C # with MySQL, where it has two tables: Compra - > Table where you get the IdProduto and the Product Value. Abastecimento - > Table where the IdProduto will go and the P...
asked by 09.11.2017 / 18:53
1
answer

Error in passing parameters C #

I have the following error: Error 1 Cannot implicitly convert type 'System.DateTime' to 'string' In the following code: t.Codigo = GetValorDateTime(tabela, i, "DataDeContrato", DateTime.MinValue); public DateTime GetValorDateTime...
asked by 08.11.2017 / 12:44
1
answer

Real-type fields on the bank with loading problems Model

Some 3 or 4 months ago I had this same problem, that after I remapped all my Model, it solved. And now it's back to the same problem. It used to be float and now it's Real . In my Model is decimal and gives the error. I have already changed t...
asked by 09.11.2017 / 11:05
1
answer

How to load TextBoxFor after onchange from a DropDownListFor?

How can I load a TextBoxFor after choosing a DropDownListFor element? I load the DropDownListFor with a list and the par from this list I want to filter an object to load the balance according to the selected DropDownListFor id. <div cla...
asked by 08.11.2017 / 16:59
1
answer

Is it possible to define an HTML tag in a C # string? [closed]

I have the following string written in C #: string Descricao = "Você ficou muito tempo inativo, e por isso sua sessão caiu. Retorne para a página inicial para continuar." I would like to put the% wrapper of the string inside an HTML tag, so...
asked by 31.10.2017 / 15:30
2
answers

Show "Loading ..." during page navigation

When I make a call ajax I can already show / hide a loading gif like this: $(document).ajaxStart(function () { $('#loadingFull').fadeIn(); }).ajaxStop(function () { $('#loadingFull').fadeOut(); }); However, several calls on the...
asked by 24.10.2017 / 18:32
1
answer

Create a list with a Model and an Int in C #

I have the following class: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Dynamic; namespace Model { class PromocaoQtdeVendidaModel { private int idPromocaoQtdeVendida;...
asked by 24.10.2017 / 16:59