Questions tagged as '.net'

1
answer

Remove printer and driver

I have the following code: private void btnDeletar_Click(object sender, RoutedEventArgs e) { string nomeImpressora = null; if(cmbImpressoras.SelectedIndex != -1) nomeImpressora = cmbImpressoras.SelectedItem.ToString(); else...
asked by 14.11.2014 / 13:32
1
answer

Retrieving malformed string when containing accented words

In my application I'm having trouble fetching the data in the PostgreSQL database, accented words being retrieved from the database and dealing with DataReader are coming poorly formatted as in the image below. In the correct formatte...
asked by 03.11.2014 / 22:01
2
answers

Handling different returns from JSON

I'm working on an API integration with JSON. I have not implemented anything yet in my C # code, I am currently studying the API but I have already had a question. I have a login method that if successful returns me a type of response, and if...
asked by 18.06.2015 / 16:42
1
answer

Doubt when generating a .doc file with C #

The method below downloads the document that is generated dynamically, however when the file is opened it shows a file conversion option, leaving the Unicode (UTF-8) checked by default. What do you do to not show this message? public...
asked by 15.01.2015 / 19:53
2
answers

Retrieve data from a SQL Linq query with Join

In the presentation layer I call a consLaboratorio method that is in a separate namespace where all data access is performed. This method returns an object MiddleOneReturn with: error_code (0-if run without errors) and execution...
asked by 21.11.2014 / 21:06
1
answer

Edit list of objects with form POST in MVC C #

I have both classes below. I know how to make a screen to enter the data, and get the data of PERSON and PHONE, by% with% and by% with%. But how to do this on an editing screen? I want to display the data of model and the list of Li...
asked by 27.08.2014 / 02:57
1
answer

Print arrays with line break

I want to print the various variables of a List . I am trying to use foreach but it has not worked. The variables are written one over the other instead of a line break. Look at my code in the printPage event: int charac...
asked by 07.11.2014 / 14:59
1
answer

C # Do select and display in a combobox

I'm creating an application in C # windows form and wanted to know how to do a select from a table and displayed a list of clients in a combobox.     
asked by 10.05.2014 / 15:33
2
answers

Override XmlTextWriter - Serialize Class to XML absolutely all attributes

I have my class: public class Pessoa { public int Id {get;set;} public string Nome {get;set;} } I'm trying to serialize to XML this my class. public static string CreateXML(object o) { XmlSerializer xmlSer...
asked by 11.03.2014 / 21:00
2
answers

how to extract zip files in C # to a folder where the system is installed

How to extract zip files in c # to a folder where is the system installed? using System; using System.IO.Compression; using System.Windows; using System.Xml; namespace TestXml { /// <summary> /// Interaction logic for MainWind...
asked by 27.03.2014 / 14:04