Questions tagged as 'c#'

0
answers

Web API C # - Validate token generated by another server

I have a basic OAth api, it only generates the token, it is in localhost: 1010 / Token I have an api with the business rule methods, it's at localhost: 2020 / api How do I validate if a token is valid within the api: 2020? Thank you.  ...
asked by 15.06.2016 / 00:52
1
answer

Save Log of operations in the bank with system user field

Hello, I would like to know how to by means of triggers in the database I can besides save the operations performed and in which table also performed the user logged in the system (not the user of the bank, if the user of the system) at the m...
asked by 14.06.2016 / 17:29
3
answers

Reading XML NFe?

I'm doing an XML reading from Nfe however, I'm currently reading and playing in a txt , but I can not read those tags below: <?xml version="1.0" encoding="UTF-8"?> <nfeProc xmlns="http://www.portalfiscal.inf.br/nfe" versao="2....
asked by 16.12.2014 / 17:05
1
answer

Uploading 2 files via ashx

I have the screen below: Ineedtheusertoselectasongandacover,butI'mnotfindingawaytosendthetwofilesatonceandstillvalidateifMusicandCoverhavebeenselected.UntilthenIfollowedtheexamplebelow,butJSonlytakesthecontentofthe(upFoto)input,howeverIcreate...
asked by 24.11.2015 / 00:46
1
answer

Format the value of the ComboBox pulled from the SQL database (LINQ) in Project C # (WPF)

I need a help in the code below ... I need to get the SQL database float value to be in the Brazilian Real Number Set format in a C # (WPF) project in a ComboBox (such as Double). That is, bring it as String in the IntemsSource and not be in thi...
asked by 25.03.2016 / 14:10
0
answers

AccessViolationException When I type ALT or TAB C # WINDOWS FORM [closed]

I have a form where the Form calls the form (Call), in this Form Call has a list of students and a Panel that is with visible = false, in that same screen I call a class where it makes recognition I have a problem with the following: See...
asked by 23.11.2015 / 19:21
2
answers

Convert Json to XML

I have this code: using System; using System.Collections.Generic; using System.Linq; using System.Windows.Forms; using System.Diagnostics; using System.Xml; using Newtonsoft.Json; using System.Net; using System.Xml.Linq; using Newtonsoft.Json....
asked by 23.11.2015 / 00:13
1
answer

LINQ to SQL InheritanceMappingAttribute property Code

What is the purpose of the Code property of the InheritanceMappingAttribute attribute? The documentation describes this way:    This property holds a value that appears in the database table in the% col% of column to indicate...
asked by 22.04.2016 / 16:46
2
answers

Problem with ValueObject in the Entity framework

I'm having a difficulty with a mapping and would like to know if it's possible to do this: I have a Contact class with two fields that are ValueObject of type "Phone", the fields are Phone and Cell. public Telefone Telefone { get; set; } pu...
asked by 06.04.2016 / 18:41
1
answer

SqlConnection failed in C #

SqlConnection ABC = new SqlConnection( "Data Source=(local);Initial Catalog=Database1;Integrated Security=SSPI"); SqlCommand command = new SqlCommand(); SqlDataReader dataRead; I'm using this code to make a save button on...
asked by 27.04.2016 / 16:49