Questions tagged as 'c#'

1
answer

Consuming Protheus webservice in C # (array)

I have two webservices developed in Protheus (TOTVS) that will be consumed in my C # application in VS2013 (Windows form). The first one always returns a string and is working fine, the second one returns an array and that I can not consume a...
asked by 18.11.2014 / 19:52
2
answers

Search between two dates in my database

I wanted to know if you could help me solve a problem that I'm having trouble solving. The problem is this: I have a database with a table of values that I keep: date : dateTime value : int equipment : int (foreign key that comes f...
asked by 19.11.2014 / 12:54
2
answers

Automating the execution of an .exe file

I need an application running in the background in the system tray, 3 times a day, at 08:00, 12:00 and 16:00 it runs an .exe file.     
asked by 18.11.2014 / 19:21
1
answer

How to use AutoFit in C #?

I'm exporting data to an Excel spreadsheet and I'm not able to use AutoFit, could anyone help me? Code: public void exportarExcel(InformacaoDB info, string nomeArquivo) { Microsoft.Office.Interop.Excel.Application xlApp = new Microsoft....
asked by 27.01.2015 / 14:27
1
answer

Inheritance with 0: N Relationship using Nhibernate

I have the following situation: Person public class Pessoa { public Pessoa() { Endereco = new List<Endereco>(); } public virtual int IdPessoa { get; set; } public virtual string Nome...
asked by 28.01.2015 / 18:12
1
answer

Change Text attribute of a linkbutton within a table in a repeater

I have this linkbutton: <td><asp:LinkButton ID="lkbEnviarDocumentos" CssClass="acessos" Text="Documentos" runat="server" /></td>} %> When this condition is true if(hdfTipoUsuario.Value == "2") I have to change th...
asked by 27.01.2015 / 17:48
1
answer

Two models and one controller

Following the reasoning this my other question , where I create two models for manipulations, how could I use a controller to do the manipulations in the tables? My intention in doing this is that in the same view I can make a record of...
asked by 06.11.2014 / 19:29
1
answer

Insert tab when printing

I have a code to print each variable of a List . I'm trying to insert a tab in these variables. Take a look at my code that appears in the event printPage : int charactersOnPage = 0; int linesPerPage = 0; var Fonte = new Font("Ari...
asked by 09.11.2014 / 03:03
1
answer

Add values present in a List

I'll explain what I want to do. I have this List : public static List<Cliente> Clientes = new List<Cliente>(); public class Cliente { public string Nome { get; set; } public List<ProdutoComprado> Produtos { ge...
asked by 07.11.2014 / 17:28
1
answer

Problem with popular DataGrid

I'm making the population a DataGrid , but I do not know why it's not showing. Result: Onlyemptyrowsarereturned.Inspection.cspublicclassFiscalizacoes{privateStringConcessionaria{get;set;}privateStringMunicipio{get;set;}privateStringSistem...
asked by 02.12.2014 / 13:20