Questions tagged as 'c#'

1
answer

Create thumbnail without stretching / shrinking image in C #

I have this code that creates thumbnails for my project: //**** INICIO GUARDA THUMB ********** // valores para altura e largura do thumb: int resizeToWidth = 260; //px int resizeToHeight = 260; //px //busca-se a main image Image thu...
asked by 09.01.2017 / 14:24
1
answer

Pass sequence of steps (methods) to window (wpf)

Greetings ... I currently have a screen similar to the one below: This screen uses BackgroundWorker to execute a sequence of steps and inform the user through the messages in the textblock a step by step of the tasks that are currently exe...
asked by 04.01.2017 / 19:42
1
answer

How to recover the last record inserted in Firebird database?

My Sales table has a Code field with auto-increment and I need to retrieve this code to insert into an associative table. string sql = $"INSERT INTO VENDA(NRO_VENDA,DATA_VENDA,VALOR_TOTAL_PRODUTOS,VALOR_ACRESC‌​IMO,VALOR_DESCONTO,V‌​ALOR_TOTAL...
asked by 04.01.2017 / 13:15
3
answers

Insert decimal variable in firebird

I'm doing an Insert in the Firebird database in a UnitUnit (decimal) field, but the decimal places in the table do not appear. C # code: public decimal ValorUnitario { get; set; } produto.ValorUnitario = Convert.ToDecimal(5.50); string sql...
asked by 04.01.2017 / 20:56
1
answer

Overwrite Bootstrap classes with CSS file

I'm having a hard time overriding some Bootstrap classes using a CSS file I created. I'm using the Bundle to make these changes: public static void RegisterBundles(BundleCollection bundles, bool premium =true) { #region Default Web Site...
asked by 04.01.2017 / 17:18
1
answer

WPF Checkbox Combobox direct click button after selection

I have some comboxboxes which I populate with checkboxes. After selecting the items click on search, however the first click is used to compress the combo and then I click again to activate the button. Is there any way to avoid having to give...
asked by 28.12.2016 / 13:34
1
answer

AutoMapper Relationship One to Many - Model to ViewModel (and vice versa)

MVC scenario, where Controller talks to Application that talks to Domain. I'm trying to do a one-to-many mapping with AutoMapper. This is my Model: public class Estado { public Guid EstadoId { get; set; } public string Nome { get...
asked by 29.01.2017 / 18:10
1
answer

What implementation would I use to initialize the data in the bank using 1: N relationship?

My intention is to initialize a SubCategoria , but it needs a Categoria first (1: N). I wanted to know what implementation I would use for this relationship to work fine in the database? I'm using the Seed method of EntityFra...
asked by 18.01.2017 / 19:58
1
answer

Show image when mouseover in gridview row

On an HR management site, there is a readiness history query. Here's how the page was made: ASPX FILE <%@ Page Language="C#" AutoEventWireup="true" CodeFile="historicoProntidao.aspx.cs" Inherits="historicoProntidao" %> <!DOCTYPE h...
asked by 13.12.2016 / 13:51
2
answers

ICollectionobject - how to create and use objects within the collection

I'm working on a project using MVC5 and EntityFramwork 6. I followed a tutorial to create a database from my templates. Example of a template: public class Side { public Side() { } public int ID { get; set; } public I...
asked by 13.12.2016 / 18:00