Questions tagged as 'c#'

0
answers

How to set parameters in a crystal report report

For example: I want to generate a report of the employee that I select, and in the report it is generating only the employee of enrollment 1, regardless of the employee selected.     
asked by 24.11.2014 / 23:51
0
answers

Error 501 when connecting to FTP

I have a C # (Windows Forms) application that accesses the company's FTP to download some files and / or upload. Only, on two specific clients, the application can not access FTP. It gives the following error:    The remote server returned...
asked by 24.11.2014 / 18:26
1
answer

Error object reference not set to an instance of an object

I can not find the error of this code when saving the image of webCam, whenever I click save as and type the file name it returns me with this error using System; using System.Drawing; using System.Windows.Forms; namespace WindowsFormsApplica...
asked by 27.10.2017 / 17:37
2
answers

ToList () returning read-only

Follow the code below: using (var db = new Entities()) { var result = db .Tabela1 .Select(x => new { x.Coluna1, x.Coluna2 }) .ToList(); foreach (var item in result)...
asked by 30.10.2017 / 22:26
2
answers

How do I change the contents of a UserControl by using a button on another UserControl?

A window with a grid, and with two content areas, "ContentArea" and "ContentMenu". "ContentArea" starts blank, "ContentMenu" starts with the Navigation buttons, which make "ContentArea" change its content. In each of these "ContentXXXX" you a...
asked by 12.12.2016 / 23:08
2
answers

BubbleSort random numbers

The numbers are randomly generated in the vector, however when I call the bublle function to sort the result it returns 0. Can someone help me ???? using System; namespace BubbleSort_CSharp { class Program { static void Main(s...
asked by 26.11.2016 / 18:24
2
answers

Comparing two objects and copying conditionally

I have the following classes: public class Pessoal { public int ID { get; set; } public string CPF { get; set; } public string PIS { get; set; } public string NOME { get; set; } ... ... ... } public class Dominio...
asked by 16.10.2017 / 15:45
3
answers

How to make a combo With the days of the month?

What is the best way to do a comboBox with the days of the month? In other words, the combo has to take from 1 to 31 days. On the HTML side I have a label called "drpDia", and I need to load this label with numbers from 1 to 31. I know if...
asked by 16.02.2017 / 15:12
1
answer

There is no ViewData item of type 'IEnumerable' that has the key 'Categories' [duplicate]

I'm having a problem with dropdownlist . I populated it with information that was in my DB. controller code: public ActionResult NovoProduto() { ViewBag.categorias = new SelectList(db.Categoria, "CategoriaId", "Nome...
asked by 31.01.2017 / 07:53
2
answers

Can not implicit convert type 'System.Collections.Generic.IEnumerable' to 'System.Collections.Generic.List'

I have the following method below for the purpose of returning notifications that should be displayed for a given client and notifications that should be served to all clients. public List<TNotification> GetNotifications(TClient client)...
asked by 14.12.2016 / 11:59