Questions tagged as 'c#'

3
answers

Do not open more than one form at a time in C #

I am developing a system that is practically a CRUD. My problem is this: when I open a screen of my system, if I click the menu to open again, you have two windows open, ie if I click several times in the menu you will have several windows op...
asked by 24.02.2017 / 20:32
1
answer

Create a background server

It is very simple, this code works, but only once, after the first time it is started, no other request is answered, as if after it runs once the StreamSocketListener has stopped. public void Run(IBackgroundTaskInstance taskInstance) { va...
asked by 24.02.2017 / 04:22
2
answers

Catch a selected item in Dropdownlistfor using an ASP.NET MVC ViewModel

I'm trying to register a Subcategory that needs a Category. I have the SubCategoryViewModel, where I created the public IEnumerable<CategoriaViewModel> Categorias { get; set; } and public Guid CategoriaId { get; set; } fields...
asked by 17.02.2017 / 01:06
1
answer

How to do a select from a select using the Entity Framework ado.net

I'm developing a system in ASP.NET MVC that defaults to but I'm in need of a select over another select , and I do not know how to do this with Entity . The SQL code you would like to use is the following: select * from pedidos as...
asked by 06.02.2017 / 20:59
1
answer

Display text coming from the database query in @ Html.Actionlink ()

Well, I have the following scenario: I query the database and I bring a IEnumerable<> to View : <section class="container"> <article class="row"> @foreach (var item in Model) {...
asked by 03.02.2017 / 03:52
1
answer

WPF using MVVM - Whose responsibility is it to open a new window?

In MVVM we have Views, ViewModels and Models. All the business logic of my application is in models, where I use viewModels to manage them, as well as binds and commands that are sent from Views. But now I have a problem, I need to open a new...
asked by 06.02.2017 / 17:18
1
answer

Mult Mapping Dapper [duplicate]

I'm having problems with dapper's Mult Mapping, when I try to execute the following query it is not mapping the ids of the objects, the select is this: var sql = @" SELECT ofi.id_oficina, ofi.codigo,...
asked by 27.01.2017 / 13:10
1
answer

How to make a form never disappear?

How can I make an invisible form only with text appearing, without the buttons only one text, never fade when another window is selected? a print: link When I select another window it disappears, can it always appear? Obviously for the a...
asked by 08.03.2017 / 21:52
1
answer

ControllerContext Null

I have the following code: PDFController Ctrl = new PDFController(); byte[] ArquivoPDF = Ctrl.GerarPDF(xml); This part above is in WebApi, where I create a new instance of the Controller to use the function that is in it. The c...
asked by 10.03.2017 / 18:21
2
answers

Cryptography SHA512 - XAMARIN

Good afternoon, I'm trying to encrypt a string with SHA512, in project [PCL], I'm not getting it, can anyone show an example of how to do it? The idea was to do something like: public string Encripty(DateTime dataAtual, string stringQueQuer...
asked by 03.03.2017 / 18:29