Questions tagged as 'c#'

1
answer

MVC error 404 POST method

This is my controller : [HttpPost] public ActionResult TestePost(int id1) { ViewData["Teste"] = "O método POST funcionou, você digitou: " + id; return View("Index"); } [HttpGet] public ActionResult TesteGet(int id) {...
asked by 01.06.2016 / 04:06
2
answers

Error trying to add a self-incrementing column to a datagridview

I'm trying to add a autoincrementable column in a datagridview but I can not figure out what's missing to work properly. My program reads the data from a database table and displays it in datagridview . I need to add a autoincrem...
asked by 30.05.2016 / 18:53
0
answers

Error trying to insert data from a mixed table

I'm starting an MVC project and I'm having a problem that I can not fix. [Table("InfoGeralEmpresa")] public class InfoGeralEmpresa { [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInC...
asked by 08.06.2016 / 23:11
2
answers

Saving report to disk in PDF

I took a legacy code here and I have no WindowsForms experience. The case is, a report is generated and saved inside an object of type PrintDocument. Then it seems to populate another object, of type PrintPriviewDialog, and already calls t...
asked by 18.05.2016 / 15:44
1
answer

List Entity Framework

I am creating action from Edit to edit the data of my models . What happens is that I use ViewModel to "join" several models into one. Okay, I can get data from models which are not List<> , ie models that are not a li...
asked by 09.06.2016 / 05:32
1
answer

Field formatting DateEdit devExpress Windows forms

I'm having a date formatting problem next to the date component dateEdit of devExpress . I need the field date formatted as follows: 01/01/2016. And when typing the values, go to the next character without typing the "/" to move to...
asked by 09.06.2016 / 20:42
1
answer

How to check if a checkbox in a form has been selected through another form?

I want to check if a checkbox is selected on a form, since I'm working with several forms. Using the following code does not work: frmPrincipal f = new frmPrincipal(); if (f.chkNotificacao.Checked == true) {...
asked by 11.06.2016 / 02:57
0
answers

Creating routes (controller / id / action) in C #

I'm trying to create a very specific route on a page of my project. As usual, the routes in .NET are controller/action/id but in a specific page I would like it to be controller/id/action . What I got was: routes.MapRoute(...
asked by 07.06.2016 / 20:35
0
answers

UWP InkCanvas medium rubber

I'm doing a UWP application where I have InkCanvas, and I've implemented the eraser to erase the designs I've done, but the Erasing mode is like OneNote's trait rubber, however what I need would be the Average Rubber OneNote also, which would ju...
asked by 13.05.2016 / 21:15
1
answer

Customizing datagridview in C #

I'm doing a project and I'm having customization issues in my datagrid, as the information in the two textbox returns in the same datagrid I can not customize the header of the two, but rather just one, does anyone know how to sort it wit...
asked by 13.05.2016 / 01:36