Questions tagged as 'c#'

1
answer

I would like to verify in the customer registry if the code you entered already exists. How do I do?

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace AtFinal { class Program { struct Cliente { public int cod_cli; public...
asked by 25.08.2016 / 05:41
2
answers

Json Multidimensional for Object in C #

I'm learning C # and am having some difficulty passing a multidimensional json to an object doing a deserialize. I'm not sure how to resolve this. See my json string json2 = @"[ {...
asked by 31.08.2016 / 21:05
1
answer

View Field When Selecting Dropdownlist and Savar

I have the following scenario: In a form I have a field called Load-Time , which is a Dropdownlist with a list of time loads. In this drop an option called another. When the "Other" option is selected a new field is opened to enter thi...
asked by 23.08.2016 / 16:37
1
answer

Xamarin.Forms.Xaml.XamlParseException [closed]

I'm creating a Xamarin project for study, I have a MasterPage and inside it I have the code below: I'm compiling for Android and I see that the problem is in this line: xmlns:pages="clr-namespace:MyOrders.Pages;assembly=MyOrders" If you...
asked by 24.08.2016 / 19:16
1
answer

Hiding form fields that will be required

Hello, I have a form that depending on what is going to be selected in a select will hide or display fields. The problem is that some of these fields will be of the required type and the submit will not complete if they are hidden and with no...
asked by 14.10.2016 / 15:12
1
answer

How to send a character (char) via bluetooth

I would like to send the number 1 via bluetooth on android, I already did the connection part missing to send    - this is the source code public void conectar(ProgressBar loading, BluetoothSocket socket) { loading.Visibility...
asked by 14.10.2016 / 18:08
1
answer

Object List (with some objects as attributes) for DataGridView - C # [duplicate]

How do I show the Street or Zip Code from the list below in the DataGridView. People List ( to show in datagridview ) List<Pessoa> Pessoas; Person Class using System; public class Pessoa { public int id { get; set; } p...
asked by 13.10.2016 / 20:43
1
answer

Kill external process when closing form [closed]

I created a form that executes an external program when I click on a button load program, but when I close the form I wanted it to give it a kill process in the task manager. But he says he has access denied when I close the form, it seems th...
asked by 13.10.2016 / 22:45
1
answer

DataDirectory C #

I need a flexible connection string so that it automatically searches the program folder for the .mdf file . My following code looks like this: public Form1() { string relative = @"..\..\Database1.mdf"; string absolute...
asked by 04.10.2016 / 05:44
1
answer

Reduce code that references the same object?

Here the code, would you have any way to reduce it? (For learning purposes only) worksheet.Row(1).Style.Font.FontColor = ClosedXML.Excel.XLColor.White; worksheet.Row(1).Style.Font.Bold = true; worksheet.Row(1).Style.Alignment.SetHorizontal(XLA...
asked by 17.10.2016 / 01:19