Questions tagged as 'c#'

1
answer

Expiring user usage time Mysql

I'm doing a C # sign-in system where the user is logged in to verify their login, password and how much time they have left to use the system. Even the part of checking login and password I managed to do, but I'm having trouble checking the usag...
asked by 24.02.2017 / 13:25
1
answer

Find the index of dataRow

I'm traversing a DataTable with a foreach using a variable of type DataRow , however I'm having to retrieve the index of the DataRow I'm traversing. foreach(DataRow row in DataTable.Rows) { string descricao = Co...
asked by 23.02.2017 / 15:17
2
answers

Read a BLOB corresponding to an image

The following code uses MySqlDataReader to obtain a specific database record: string cmd = string.Format("Select * from socios.socio WHERE idSocio={0}", chave); MySqlCommand comandoMySQL = new MySqlCommand(cmd, ligacaoBD); MySqlDataReader read...
asked by 23.02.2017 / 11:20
1
answer

How to restrict formats in C #

I'm new to programming and I have perhaps a very simple question. I'm doing a hands-on work in college and in 4 textbox the consistencies of the notes should be handled and I wanted to restrict the textbox from accepting that note format ("010")...
asked by 16.02.2017 / 00:26
1
answer

How to pass the name of a wpf window as a parameter

I use% custom% to show userControl and when I double-click on a line, I call a register window, which is expecting to send Data Grid of the selected line as a parameter, I wanted to simplify passing this method of all screens from...
asked by 26.03.2017 / 20:57
1
answer

Unity 2d - Enemy following player [closed]

Well, I'm having trouble making the enemy follow the player, I made the code below: public class folow : MonoBehaviour { public Transform target;//set target from inspector instead of looking in Update public float speed = 3f; private Transfo...
asked by 07.03.2017 / 16:43
1
answer

Ajax sending model to controller

I would like to know if it is possible for me to pass a "Model" object via ajax to my controller. $.ajax({ type: "POST", url: "@Url.Action("CadastrarSementesVariedades", "SementesLevantamentoVariedades")",...
asked by 07.03.2017 / 22:11
1
answer

Error converting object type to int

I'm doing a select in the database, using ExecScalar returning an object but I can not make a cast of this returned value to integer. public static int ConsultaPDVsAtivos() { NpgsqlCommand sql = new NpgsqlCommand(); sql.CommandText = "...
asked by 09.02.2017 / 13:03
1
answer

Xamarin Mac Agent Limited

I'm trying to program for iOS using Xamarin, but I'm already starting to get frustrated. When I open Xamarin Studio on the Mac, I can view the layout of my layout normally, but when I try to view it using Visual Studio on Windows, I get the foll...
asked by 24.01.2017 / 20:28
1
answer

Can not implicitly convert type list to an object

Good evening, I'm doubtful of the following error:    Can not implicitly convert type   'System.Collections.Generic.List'   to   'ITCore.FlowCredit.Business.Entities.ProductAmortizacaoCreditoDiasSearch' The Code: private void LoadDia...
asked by 07.02.2017 / 23:42