Questions tagged as 'c#'

1
answer

How to change the name of the target database when performing the restore? (Class Restore C # .NET)

I am backing up and restoring a SQL Server database using the C # .NET Backup and Restore classes, with Smo. The problem is that after performing the backup of the database with the name, for example "Test", I can not restore the database with a...
asked by 20.01.2015 / 12:45
1
answer

List files from a directory by approach

I have a screen where listo files of a certain folder. I have a search bar that uses the same method to find the files, but I can not list by approximation. Example: I have this file Papel_timbrado.docx . If I search "Paper" I find t...
asked by 27.01.2015 / 14:58
1
answer

Error exporting to Excel (Corrupted file)

I am making an application to export the result of a sql query to Excel. After the file created the time I'm going to open it it gives a corrupted file error. SaveFileDialog sfd = new SaveFileDialog(); sfd.Filter = "Execl files (*.xls)|*.xls...
asked by 26.01.2015 / 15:23
1
answer

Implementing Interfaces

I have the abstract class ClasseA and 2 child classes ClasseB and ClasseC , then I have an interface IClasse that is implemented in ClasseA and ClasseB . In the interface I have the metodo1 method...
asked by 22.01.2015 / 18:46
1
answer

How to add items in an Jquery array from an IENUMERABLE in .Net MVC?

How do I add items from a IEnumerable<T> to a JavaScript array? View: @using Colecao.ViewModels @model ConfiguracoesViewModel @foreach (var equipamento in @Model.Equipamentos) { //Gostaria de adicionar...
asked by 23.03.2015 / 13:08
1
answer

Trigger events remotely

What is the best way to remotely trigger / receive an event in C# ? Example: When you click a button on PC1, perform a certain task on the other PCs that own the app. I thought of 3 solutions: Socket Query the database in...
asked by 19.03.2015 / 20:27
1
answer

Save data to the client for later use

I have a web form application where the user enters some values to perform an analysis. There are two item and quantity values, this data is in List<> which is used as DataSource of a GridView . They can have up to 50 i...
asked by 23.12.2014 / 15:16
2
answers

Subtract dates and compare with value

I have two dates: DataAcesso and DataAtual of type DateTime . I have one more field called TempoAtualizacaoAutomatica of typo byte . I need to subtract these dates and compare the result with TempoAtualizac...
asked by 29.12.2014 / 12:47
1
answer

Click event. Display message in current form and open new form

I need to make the click event of a button on a form open another modal form. While the other form is loaded, I need to display the user a message on a StatusLabel from a StatusStrip. (a msg of type ... Wait for the configuration to be loaded .....
asked by 30.10.2014 / 13:47
1
answer

How do I insert any file extension into a SQL database? [closed]

I have always worked by attaching only images to my BDD tables, I remember converting to MemoryStream and then to Byte and inserting ... But I need to insert any kind of file extension into my database.     
asked by 11.12.2014 / 19:54