Questions tagged as 'c#'

1
answer

Write float field in sql server with C #

I'm trying to do this, but I'm not sure how to do this, but I'm not sure how to do this. to float. Follow my code. SqlCommand cmd = new SqlCommand(); cmd.CommandType = CommandType.Text; cmd.Comman...
asked by 12.09.2017 / 15:24
2
answers

Error "NullReferenceExeption was unhandled" when compiling

Follow the code below: public partial class Form1 : Form { public Form1() { button1.Click += Button1_Click; } private void Button1_Click(object sender, EventArgs e) { decimal n1, n2, result; n1 = C...
asked by 08.12.2015 / 00:48
2
answers

Permissions depending on AD groups [duplicate]

Good people, as I mentioned in some questions I'm developing a WebAPP query that needs to have a login through the network using Active Directory users. My goal is for a group to exist and I can declare in the application that only those in th...
asked by 08.02.2017 / 12:24
2
answers

How to put a dropdownlist in a cshtml

I need to put a dropdownlist under the following conditions: It will display the City name (City Table), but it will only record the Employee Code. Using this approach, I can mount the DropDownList: Model public class Cidade { [Key...
asked by 10.08.2018 / 01:00
2
answers

Create bank automatically with Code First

I'm creating an ASP.NET MVC application with Code First. This system is trade management software. I would separate the information from each company, and not leave everything in the same bank. We initially thought of leaving everything the same...
asked by 22.01.2016 / 12:10
1
answer

Starting in C # language [closed]

Now, I'm starting in C # and would like to know what I need to do to make my Desktop systems look the same as Windows 8? For example the reference: using Windows.UI I hope I can help you. Hugs!     
asked by 10.04.2015 / 17:53
2
answers

Select separated by semicolons for xls

I have the following code: var cmd = @"SELECT mt.Id + ';' + mt.Nome + ';' + mt.Cidade AS Resultado FROM MinhaTable mt"; var objectContext = ((IObjectContextAdapter)db).ObjectContext; var resul...
asked by 08.09.2015 / 15:06
2
answers

Problems with routing using asp.net core

When trying to route a core 2.0 application, I can not reach the controller. public class GetClientController : Controller { LoadClient loadClient = new LoadClient(); [HttpGet] public IEnumerable<Cliente> Get...
asked by 18.06.2018 / 23:00
1
answer

Format numerical field with 2 decimal places in datagridview C #

I need to show a column in the datagridview column of gross weight this format 0.00, but I'm not getting it, this column is not created in any database, I created the direct column in the datagridview, I already went in the numeric formatting of...
asked by 17.07.2018 / 22:09
2
answers

Error System.NullReferenceException when trying to pass Value from one Form to another Winforms C #

I have in my application a Customer Registration Form and a Customer Search Form. To send values from one form to another I use the code below, I already used this same code in several other forms and works perfectly, but in that register is not...
asked by 27.06.2018 / 04:59