Questions tagged as 'c#'

0
answers

Word Web Add-in - Alignment of Footer content

Hello I'm developing an add-in for Word, following the template in visual studio. Today, with the following code, I have the result almost finished. However, in Footer, I can not at all (of which I have already tried and researched) to ali...
asked by 29.10.2018 / 21:35
1
answer

Error handling exceptions - "Object reference not set to an instance of an object"

public String IdentificarAcessoDAL(FuncionarioDTO acesso) { try { conexao.cmd.Connection = conexao.conexao; string recuperar = "SELECT CARGO.NOME_CARGO FROM LOGIN INNER JOIN FUNCIONARIO ON FUNCIONARIO.C...
asked by 21.10.2018 / 07:51
1
answer

How to decrease the size of the .zip file generated by DotNetZip?

Using the library DotNetZip , I'm ziping a folder with two image files (it can be JPEG, EPS, or AI) exactly the same (for test effect), each with 7.25 MB. I get the .zip file with the size of 14.3 MB. Apparently the compression is not being...
asked by 19.10.2018 / 17:08
0
answers

Use the first part of the split [closed]

I would like to know if you have to use split to do just one division, for example , I have the following text: dia_24_06_18 . I wanted you to sort by _ in the array like this: [0] - dia [1] - 24_06_18     
asked by 16.12.2018 / 01:30
0
answers

dataGridView with line break, however when exporting to excel it does not break

Galera, I have a dataGridView that I used the following code snippet to break the text: dataGridView1.Columns[0].DefaultCellStyle.WrapMode = DataGridViewTriState.True; dataGridView1.Columns[1].DefaultCellStyle.WrapMode = DataGridV...
asked by 23.10.2018 / 17:52
1
answer

Create DropDownList with ViewBag

I'm getting the following error:    InvalidOperationException: There is no ViewData item of type 'IEnumerable' that has the 'Office' key. Here I look for the database: public IEnumerable<SelectListItem> GetAllOfficeAsync(Guid user...
asked by 01.11.2018 / 14:43
0
answers

Use 2 models in a View, but separate them in the form submission

I'm getting the following error:    'AddEmployeeViewModel' does not contain a definition for 'OfficeEmployee' and in the extension method 'OfficeEmployee' accepting the first argument of type 'AddEmployeeViewModel' could be found > Inside...
asked by 01.11.2018 / 18:18
0
answers

Is it possible to simulate a FTP server in C #? [closed]

I need to run automated integration tests in an application whose functionalities have external dependencies such as FTP. I would like to know if it is possible to simulate an FTP as it is possible to simulate a database with Moq, for example....
asked by 16.10.2018 / 19:05
1
answer

Save xml as UTF8

I'm consuming a Webservice, where return is an XML. Save The XML in a directory to another system read. how do I save this XML as UTF-8? The other system read the content but the special character is unconfigured. WSHP.XMLServer ws = new WS...
asked by 09.10.2018 / 13:30
0
answers

Understanding the algorithm of CrossWord Puzzle

I have this algorithm below, I wanted to know if I made a correct understanding, if it is very superficial and so there is something else to add. My understanding of the algorithm is being made explicit in the comments. static char[][] cro...
asked by 06.12.2018 / 13:28