Questions tagged as 'c#'

3
answers

Execute DELETE only when returning SELECT

I have a routine where I update the local database with data from another database. I simply run a DELETE and then INSERT INTO tblX (SELECT * FROM tblY (tblY is a linked table)) , as below. The problem is that there is a time between DE...
asked by 25.04.2017 / 00:24
1
answer

The INSERT statement conflicted with the FOREIGN KEY C #

I have this code to insert values into a table: conn.Open(); comm.CommandText = @"INSERT INTO ArticleBarCode(Code, Code_Article, BarCode, CreatedBy, CreatedOn, ModifiedBy, ModifiedOn, IsDeleted) VALUES (@code, @codearticle,...
asked by 28.04.2017 / 12:00
1
answer

Encryption AES128 / 256 C # .net E SQL 2008/2012

Greetings, Does anyone know of any implementation of AES encryption compatible between C # and SQL? I want to encrypt in C # and decrypt in SQL.     
asked by 29.09.2015 / 19:04
1
answer

Validating form data in ASP.NET MVC

Is there any quicker and simpler way to validate a form's data in ASP.NET? so I do not have to be doing as many treatments as in the example below: [HttpPost] public ActionResult Attempt(string email, string password, Entities db) { ViewBa...
asked by 02.03.2016 / 22:30
1
answer

Program that opens Notepad in the background [closed]

I need to make a program that, when the user presses a button, the program opens the notepad and inserts a message previously programmed by me in the code. How could I have the part of the program insert the text of the message in Notepad?     
asked by 16.10.2015 / 17:27
1
answer

Difference between Render Partial and Render Action

I'd like some help to better understand these types of partial view rendering.     
asked by 05.03.2016 / 16:38
2
answers

Start multiple threads in a repeat command

I have a project where I need to start 30 times a thread that will execute the same method, and wanted to do this in a repeat command, for example: for (int i = 0; i < 30; i++) { Thread t = new Thread(MetodoVoid);...
asked by 10.03.2016 / 13:00
3
answers

Breaking a txt file into multiple items in a string list

I have a txt file with 2000 names. When I load in a list, the count is 1 and not 2000. Of course, since it is a text file it is only 1. It turns out that the file is organized with \n\r inside it. Even though I'm giving Split() , I...
asked by 01.03.2016 / 17:21
1
answer

View with 2 models within a ViewModel

Objective : Manipulate 2 models in the view using a ViewModel. I made a ViewModel to encapsulate the 2 models, but I can not use one of them. ViewModel: public class BoletoConfigViewModel { public Boleto Boletos { get; set; }...
asked by 25.01.2016 / 21:33
2
answers

C # Challenge Exchange Variable Values

Recently I made a very simple challenge:    Change the value of two variables without using a third variable. int a = 5; int b = 3; a += b; // a = 8 b = a - b; // b = 5; a -= b; // a = 3; It is simple because they are arithmet...
asked by 20.01.2016 / 13:42